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
This commit is contained in:
Filip Sykala - NTB T15p 2023-04-03 10:14:25 +02:00
parent 0384d631d6
commit f9c784dd41

View File

@ -506,9 +506,9 @@ bool priv::remove_self_intersections(ExPolygons &shape, unsigned max_iteration)
hole.translate(p); hole.translate(p);
holes.push_back(hole); holes.push_back(hole);
} }
// union overlapped holes // Union of overlapped holes is not neccessary
if (holes.size() > 1) // Clipper calculate winding number separately for each input parameter
holes = Slic3r::union_(holes); // if (holes.size() > 1) holes = Slic3r::union_(holes);
shape = Slic3r::diff_ex(shape, holes, ApplySafetyOffset::Yes); shape = Slic3r::diff_ex(shape, holes, ApplySafetyOffset::Yes);
// TODO: find where diff ex could create same neighbor // 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.push_back(hole);
} }
holes = Slic3r::union_(holes);
shape = Slic3r::diff_ex(shape, holes, ApplySafetyOffset::Yes); shape = Slic3r::diff_ex(shape, holes, ApplySafetyOffset::Yes);
// prepare for next loop // prepare for next loop