Commit Graph

26 Commits

Author SHA1 Message Date
Vojtech Bubnik
9aa520baf3 Fix of previous commit: Mixed up ClipperLib::pftPositive and pftNonZero 2021-06-01 12:33:14 +02:00
Vojtech Bubnik
20ba7c0a1f New parameter "Slicing Mode" for supporting 3DLabPrint airplane models.
S3D's strategy for merging self intersecting models is "Even / Odd"
which PrusaSlicer now supports as an alternative to "Positive" rule.
Also added a "Close Holes" option to fill in all internal structures.
3D-Labprint Models aren't sliceable (till years) #3062 #3708
2021-06-01 11:10:12 +02:00
Vojtech Bubnik
b5aa09e5ba WIP: Integration of MMU painting into the slicing back-end. 2021-05-27 14:29:51 +02:00
Vojtech Bubnik
980ca195f5 Merge remote-tracking branch 'remotes/origin/lh_multi_material_segmentation' into vb_print_regions 2021-05-26 15:23:35 +02:00
Vojtech Bubnik
7d4b3f2992 Fix of safety_offset() after ClipperUtils refactoring.
Fixes Solid infill where there should be none #6482
Also the safety offsetting was revised to be enabled only where needed,
the "do safety offset" is now easy to discover by
a new ApplySafetyOffset::Yes enum, and safety offset over union, which
is better done by offset() / offset_ex() has been replaced with
new union_safety_offset() / union_safety_offset_ex() functions, which
better convey their meaning and which could be better optimized than
union() with the safety offset applied.
2021-05-05 12:16:47 +02:00
Vojtech Bubnik
7563c885a1 Fixing compiler warnings 2021-05-03 15:00:23 +02:00
Vojtech Bubnik
96f8744e05 Another fix for C++ conformant compilers 2021-05-03 11:55:23 +02:00
Vojtech Bubnik
09a80d954c Further rework of ClipperUtils: Replaced many to_polygons() /
to_expolygons() calls with templated ClipperUtils variants to avoid
memory allocation and copying.
2021-05-03 11:39:53 +02:00
Vojtech Bubnik
9fbba855ef Clipper optimization:
1) Removed the already commented-out scaling / unscaling when doing
   "safe offsetting"
2) Removed some of the "safe offsetting" at calls where it never was used.
3) Reworked Clipper & ClipperUtils to pass Polygons / ExPolygons / Surfaces
   as input parameters without conversion to ClipperLib::Paths. This
   should save a lot of memory allocation and copying.
4) Reworked conversions from ClipperLib::Paths & PolyTree to Polygons /
   ExPolygons to use the move operator to avoid many unnecessary allocations.
5) Reworked some "union with safe ofsetting" to "offset_ex", which should
   be cheaper.
2021-04-30 11:49:57 +02:00
Vojtech Bubnik
38bb7d2950 1) New methods PrintObject::num_regions() and ::has_region() to make
the code more readable and to highlight where PrintObject::region_volumes
   are actually set and consumed.
2) Replaced Slic3r::clamp() with std::clamp(). They differ in the order
   of their parameters, thus hopefully no new bugs were introduced.
3) Some refactoring of MultiMaterialSegmentation for efficiency.
2021-04-22 11:41:26 +02:00
Vojtech Bubnik
7112ac61b6 Replacing ClipperLib::IntPoint with Eigen point as a first step to
make the ClipperLib paths and polygons compatible with Slic3r paths
and polygons without conversions and memory allocations.
2021-04-14 09:22:51 +02:00
Vojtech Bubnik
e8643125d8 Clipper / ClipperUtils:
1) Let Clipper use int32_t for representing its coordinates. This
   reduces memory and allows to skip conversion between Slic3r Polygon
   and Clipper polygon.
2) Disable additional offset before executing the Clipper Offset algorithm.
   We don't see any reason for that and it required 64bit Clipper coordinates,
   which were disabled with 1).
2021-04-13 11:31:54 +02:00
Vojtech Bubnik
3c9f3d2b66 Fixing the infill order for concentric infill to outside-in.
Relies to:
Concentric Fill Start Point - New Feature Request #4948
Feature Request: Archimedean Chords - Option to define direction of travel (Inside-Out or Outside-In) #5214
2021-01-06 11:05:32 +01:00
Vojtech Bubnik
62bdc192d8 Fix of [2.3.0-alpha4] Crash - several models cause crash when slicing #5208
Fixed some issues in internal anchors of the Adaptive Cubic infill.
The ugly and dangerous implicit casting operators in Line, MultiPoint,
Polyline and Polygon were made explicit.
2020-11-24 16:01:08 +01:00
bubnikv
17170b81b5 Clean-up of Shiny profiler integration, so that the intrusiver profiling
can be controlled per module.
2020-08-27 12:14:49 +02:00
bubnikv
dfbae648bf Follow up on 6deb6a776d:
Fixed orientation of contours after Elephant Foot Compensation.
2020-02-19 12:58:03 +01:00
tamasmeszaros
42ffc4e3c5 Fix polytree traversal.
Put back old traverse_pt and union_pt_chained
2019-12-19 11:27:19 +01:00
bubnikv
dd59945098 Fix of a typo in KDTreeIndirect.
Improvement of the infill path planning.
Regression fix of Gyroid infill crashes.
Some unit tests for elephant foot and path planning.
2019-11-14 17:02:32 +01:00
bubnikv
4c735192ef Bugfixes of the new adaptive elephant foot compensation. 2019-11-04 11:26:36 +01:00
bubnikv
a72ac57fab adaptive elpehant foot compensation, fixing
GH issues #1757 #2085 #2132 #2423 #2502 #2156 #2773 #2828 #2998 #3001
2019-11-01 19:59:09 +01:00
bubnikv
5e8572a196 New functions for variable offsets of polygons / expolygons.
Test cases for the above.
Improvements of older test cases.
2019-10-25 13:34:37 +02:00
tamasmeszaros
e4247f9856 libslic3r core enhancements
* ClipperUtils extended with ExPolygon to clipper paths conversion and improved PolyTree traversal
* Added ExPolygon constructor with Polygon argument
* Removed BoundingBox warnings on clang
* Removed Geometry warnings on clang
2019-10-01 14:58:37 +02:00
bubnikv
d06831076d WIP: Consolidation of shortest path calculations,
various chaining algorithms are replaced with the improved TSP
algorithm.
2019-09-26 17:30:03 +02:00
tamasmeszaros
1534356268 Call Line conversion operator explicitly. 2019-04-03 11:17:15 +02:00
tamasmeszaros
7b414fe34a Get rid of unnecessary copies and moves in ClipperUtils
This is up to a code review session.
2019-04-03 10:17:57 +02:00
bubnikv
0558b53493 WIP: Moved sources int src/, separated most of the source code from Perl.
The XS was left only for the unit / integration tests, and it links
libslic3r only. No wxWidgets are allowed to be used from Perl starting
from now.
2018-09-19 11:02:24 +02:00