62 Commits

Author SHA1 Message Date
Martin Šach
b287bbc5dc Remove obsolete cmake find script and also remove Fill.hpp 2024-01-08 10:27:38 +01:00
Lukáš Hejl
7e889bbe7c SPE-2054: Fixed missing infills on multi-part models caused by 3cb2f5f58f952bc104260c84292411894f957552 reported in #11721.
The temporary variable used for reordering ExPolygons wasn't cleared, and it contained empty ExPolygons from previous reordering. This caused those empty ExPolygons replaced actual ExPolygons for infill.

Another issue was that m_fill_expolygons was reordered, but m_fill_expolygons_bboxes were left untouched.
2024-01-03 18:14:15 +01:00
ps_copyright
f32859c302 final copyright headers 2023-09-01 14:49:07 +02:00
Vojtech Bubnik
9da03dfc9f Fixed wrong Miter limit when offsetting contours to build a Z-graph
of layer islands.
Partial fix of SPE-1729 #10632
2023-08-29 15:57:31 +02:00
Pavel Mikus
053f7e6344 SPE-1769: fix issue https://github.com/prusa3d/PrusaSlicer/issues/10786
Split regions if dynamic overhang settings differ.

I also tried the same with bridge_speed, but for some reason it does not work at all.
2023-06-13 15:38:43 +02:00
Vojtech Bubnik
2424f9826f Fixed some compilation warnings. 2023-05-25 12:52:47 +02:00
Vojtech Bubnik
fdac21b807 Fix of SPE-1658 GH #9665 Crash at macOS when Orgnanic Support selected
Reworked (again!) connecting of islands into a Z-graph.
Implemented various heuristics to handle self-intersecting and
mutually intersecting ExPolygons on the same layer.
2023-04-18 12:57:27 +02:00
Vojtech Bubnik
bceed00ae8 Fix of Layer::build_up_down_graph() for non-manifold inputs
by shrinking the input expolygons before intersecting them.
GH #10150, #10158, SPE-1621, SPE-1612
2023-04-12 17:03:10 +02:00
PavelMikus
b61a6f293d fix problem with missing lslice Links - detection could occasionally fail, issue 9744 2023-03-17 12:58:29 +01:00
Vojtech Bubnik
978f5c8b47 Merge remote-tracking branch 'remotes/origin/master' into vb_ensurovani 2023-02-17 15:20:47 +01:00
Vojtech Bubnik
2d4e3ef4fe Fixed inconsistency between 1st layer islands and ordering vector
leading to crashes.
Fixes SPE-1495
2023-02-17 14:03:00 +01:00
Vojtech Bubnik
43ce4d1894 Follow-up to f78a2c0bf662af807bacc938b005279448a1aab9 2023-02-16 18:13:55 +01:00
Vojtech Bubnik
f78a2c0bf6 Making the Z graph of layer islands more robust for degenerate inputs.
Partial fix of #9679
2023-02-16 16:31:29 +01:00
Vojtech Bubnik
340b685a0d Patching the new Layer::sort_perimeters_into_islands() for super
ugly models.
Fixes #9561, #9562
2023-02-07 13:58:20 +01:00
Vojtech Bubnik
3cb2f5f58f Fix of Layer::sort_perimeters_into_islands()
Fixes #9466 #9511
2023-02-02 16:43:25 +01:00
Vojtech Bubnik
001358cbba Merge remote-tracking branch 'remotes/origin/master' into vb_ensurovani 2023-02-02 09:53:14 +01:00
PavelMikus
d0c86403a5 Fix lslices ordering - keep topological ordering from clipper, and separate print ordering into vector of indices 2023-01-26 15:50:18 +01:00
Vojtech Bubnik
b70571cd79 Fixed Layer::sort_perimeters_into_islands() for fuzzy skin
Follow-up to 52ea2edf842e81e0f81fcd8303b69d288d903ae3
1) There was a bug in accessing the "perimeter is external" property,
   ExtrusionCollection returns "mixed", the embedded ExtrusionPath
   has to be queried directly.
2) The search bounding box has to be extended by the maximum offset
   introduced by fuzzy skin algorithm. For Arachne the fuzzy skin
   algorithm observes fuzzy_skin_point_dist.
2023-01-18 12:24:36 +01:00
Vojtech Bubnik
52ea2edf84 Fixed Layer::sort_perimeters_into_islands() for fuzzy skin:
1) An extrusion sample is taken for sorting extrusions into island
   so that a sample deep inside its island is taken with high probability.
2) With fuzzy skin active, the inexact search is done with bounding boxes
   inflated with the fuzzying distance.
2023-01-16 17:01:38 +01:00
Vojtech Bubnik
25dffb9c2f Fix of slicing with modifiers after recent refactoring - sorting
infills into islands.
2023-01-10 12:37:05 +01:00
Vojtech Bubnik
11c0e567a6 WIP "ensure verticall wall thickness" rework:
1) New region expansion code to propagate wave from a boundary
   of a region inside of it.
2) get_extents() extended with a template attribute to work with
   zero area data sets.
3) ClipperZUtils.hpp for handling Clipper operation with Z coordinate
   (for source contour identification)
2022-12-20 09:09:10 +01:00
Pavel Mikus
f730fd21d4 refactoring overhang speed 2022-12-14 14:49:20 +01:00
PavelMikus
17304a6263 minor fixes 2022-12-14 14:49:20 +01:00
Vojtech Bubnik
7f6f63db0f Fixed asserts in connecting islands and in perimeter overhangs
due to self intersections in clipped clipping rectangle.
2022-12-08 13:05:47 +01:00
Vojtech Bubnik
e6d10fc747 Fixed crash on reslicing after infill invalidation.
The crash was introduced with sorting the extrusions into islands.
2022-11-28 10:07:22 +01:00
Vojtech Bubnik
3713f09a8e Follow-up to 30fbdd123525e1ea04d4af7593efc20a4b223147
Fixed one more bug in Z chaining of layer islands.
2022-11-16 18:41:48 +01:00
Vojtech Bubnik
30fbdd1235 Fixed Z chaining of layer islands. 2022-11-16 18:14:42 +01:00
Vojtech Bubnik
8190eb4fe6 Fixed some compilation errors and warnings. 2022-11-15 18:44:38 +01:00
Vojtech Bubnik
9dca8403fe ClipperLib: Optimized PointInPolygon() to calculate cross products
with int64s instead of doubles.
Polygon / ExPolygon: contains() reworked to use ClipperLib::PointInPolygon().
	The Slic3r own implementation was not robust.
Fixed test_perimeters after recent refactoring (sorting of extrusions
	into LayerIslands)
2022-11-14 15:17:04 +01:00
Vojtech Bubnik
5eaec515ba Follow-up to f24b4e86a9612fcf4cba28a5ae9f24db13f1b171:
Refactoring of G-code export to LayerSlices / LayerIslands:
Fixed some bugs
2022-11-07 20:00:34 +01:00
Vojtech Bubnik
28f8997dd3 Follow-up to f24b4e86a9612fcf4cba28a5ae9f24db13f1b171:
Fixed compilation on OSX
Fixed incorrect clear of LayerIslands.
2022-11-07 17:26:48 +01:00
Vojtech Bubnik
8858651bf4 WIP Refactoring of Layers: Reworked G-code export to make use
of Layer->LayerSlice->LayerIsland hierarchy. This should improve
tool path ordering of multiple parts within the same object #5511.

Some shells tests rewritten from Perl to C++.

FIXME: Gap fill extrusions are currently not handled by the initial
G-code preview!
2022-11-07 14:47:43 +01:00
Vojtech Bubnik
409fae6183 WIP Refactoring of Layers: LayerIslands filled in with perimeter
extrusions, gap fill extrusions and fill regions.
2022-11-02 12:59:31 +01:00
Vojtech Bubnik
d041fa6c0c Refactored PerimeterGenerator to output out_fill_surfaces as ExPolygons,
not SurfaceCollection.

Reworked combineinfill.t, 07_extrusionpath.t, 08_extrusionloop.t to c++.
Removed Layer / ExtrusionPath / ExtrusionLoop / ExtrusionEntityCollection
from Perl bindings.
2022-10-27 19:08:43 +02:00
Vojtech Bubnik
ee626eb65a WIP: Layers split into islands, islands overlapping in Z interconnected
into a graph with links to the layer above / below.

In addition:
Members of LayerRegion were made private, public interface const only.
this->m_xxx replaced with just m_xxx
SurfacesPtr was made a vector of const pointers.
2022-10-26 18:41:39 +02:00
Vojtech Bubnik
981e249927 Follow-up to c9727b5a57d0e78c386130c1eee5bb330d3b7cee
Fixed incorrect use of a boolean config value
2021-12-08 11:22:43 +01:00
Vojtech Bubnik
c9727b5a57 Fix of Random placment of top fill throughout model #7442
For this particular model, ClipperLib numerical instability causes
one of the internal surfaces to turn into bridging surfaces
on reslicing. The issue was fixed by reverting to untyped slices if possible.
2021-12-08 09:45:59 +01:00
Vojtech Bubnik
26a6cb2129 Fixed ironing over areas with modifier meshes:
1) Areas inside modifier meshes were ironed multiple times.
2) Ironing areas were not properly merged.

Layer::lslices were not always properly merged with modifier meshes
applied, which lead to the ironed surface being split and not fully
ironed, as there were artificial gaps created between regions as if
they were covered by perimeters (we don't iron over perimeters).
2021-12-02 18:19:35 +01:00
Lukáš Hejl
da3a0c6332 Fixed a crash in the multi-material segmentation when projected lines are outside of the BoundingBox used for EdgeGrid. 2021-07-29 11:45:02 +02:00
Vojtech Bubnik
dd72016159 FDM backend refactoring for const correctness, clarity ... 2021-05-06 15:08:57 +02:00
Vojtech Bubnik
ee15f00574 FDM backend refactoring: Return PrintRegion by reference, not by pointer.
Added PrintRegion hashing.
2021-05-05 18:13:58 +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
b327314b02 Layer::make_perimeters() - when merging regions, use OffsetEx instead
of safety offset of UnionEx, which may not be robust.
2021-04-29 11:05:11 +02:00
Vojtech Bubnik
db2d78ff21 Reduction on compiler warnings, mainly on MSVC.
Fix of the new gap_fill_enable flag: Take it into account when comparing
regions.
2021-02-10 17:29:07 +01:00
Vojtech Bubnik
6555b32f5c Squashed commit of the following:
commit 61b3ca0b4b4a0b4cfbbc706ede94ef7ccec4c91f
Author: Vojtech Bubnik <bubnikv@gmail.com>
Date:   Wed Feb 10 15:42:27 2021 +0100

    Fix of fuzzy skin

commit d971ed51a5bb65e8bdfd326bc41b9d7ab2e20834
Author: Vojtech Bubnik <bubnikv@gmail.com>
Date:   Wed Feb 10 14:12:51 2021 +0100

    CMake adjustment of MINIMUM_BOOST_VERSION

commit 5d8aa2c59ecf7e32456f2e43e07dedc7d24eb21c
Author: Vojtech Bubnik <bubnikv@gmail.com>
Date:   Wed Feb 10 14:12:33 2021 +0100

    Fix of debug compilation after warning removal.

commit 5e339b3078f0c9d75b6fac28ed3c295ae9fbbef5
Author: Vojtech Bubnik <bubnikv@gmail.com>
Date:   Wed Feb 10 14:11:34 2021 +0100

    Fuzzy Skin changes:
    1) Moved the parameters to region
    2) Removed experimental code.
    3) Allowed fuzzyfication of both outer perimeter and holes.
2021-02-10 16:02:43 +01:00
Vojtech Bubnik
a2959ec944 Fix of re-slicing with multiple regions.
This is a fix of a bug, which was in Slic3r forever, where raw slices
were not cached, but recalculated from classified regions, where
merging the regions did not produce the original contour reliably.
Fixes [2.3.0-beta2] Odd bad slicing related to infill (?) percentage #5407
2020-12-11 12:21:07 +01:00
bubnikv
a9fc39491e Fix of weird double extrusions with multiple regions and their
parameters being changed between slicing runs.
2020-03-20 13:37:13 +01:00
bubnikv
3d17543d40 Fix of "Don't use bridging perimeters on top of elephant-foot compensation #3011"
If the Elephant foot compensation is applied to the 1st object's layer,
the uncompensated 1st object's slice is newly used for calculation
of bridges, overhans, skirt, brim, raft and supports.

Layer::slices were renamed to Layer::lslices to simplify reading
of the code, to differentiate from LayerRegion::slices.
2020-01-03 14:07:31 +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