From f9c784dd41e62ff82c727f729c815efea30b0007 Mon Sep 17 00:00:00 2001 From: Filip Sykala - NTB T15p Date: Mon, 3 Apr 2023 10:14:25 +0200 Subject: [PATCH] Remove unneccesarry union of healing holes. Mentioned by @BubnikV. Union of overlapped holes is not neccessary, Clipper calculate winding number separately for each input parameter --- src/libslic3r/Emboss.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/libslic3r/Emboss.cpp b/src/libslic3r/Emboss.cpp index f24775e221..e7055e8105 100644 --- a/src/libslic3r/Emboss.cpp +++ b/src/libslic3r/Emboss.cpp @@ -506,9 +506,9 @@ bool priv::remove_self_intersections(ExPolygons &shape, unsigned max_iteration) hole.translate(p); holes.push_back(hole); } - // union overlapped holes - if (holes.size() > 1) - holes = Slic3r::union_(holes); + // Union of overlapped holes is not neccessary + // Clipper calculate winding number separately for each input parameter + // if (holes.size() > 1) holes = Slic3r::union_(holes); shape = Slic3r::diff_ex(shape, holes, ApplySafetyOffset::Yes); // TODO: find where diff ex could create same neighbor @@ -634,7 +634,6 @@ bool priv::heal_dupl_inter(ExPolygons &shape, unsigned max_iteration) holes.push_back(hole); } - holes = Slic3r::union_(holes); shape = Slic3r::diff_ex(shape, holes, ApplySafetyOffset::Yes); // prepare for next loop