mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-13 07:29:04 +08:00
Fixed a crash when functions for preprocessing input polygons produced intersecting polygons. It should also fix another crash caused by a missing twin edge in the post-processing Voronoi diagram (probably some issue in Voronoi diagram post-processing, not in Boost Voronoi generator).
This commit is contained in:
parent
9896721bc8
commit
2cf6a9630f
@ -486,6 +486,12 @@ const std::vector<VariableWidthLines> &WallToolPaths::generate()
|
||||
removeDegenerateVerts(prepared_outline);
|
||||
removeSmallAreas(prepared_outline, small_area_length * small_area_length, false);
|
||||
|
||||
// The functions above could produce intersecting polygons that could cause a crash inside Arachne.
|
||||
// Applying Clipper union should be enough to get rid of this issue.
|
||||
// Clipper union also fixed an issue in Arachne that in post-processing Voronoi diagram, some edges
|
||||
// didn't have twin edges (this probably isn't an issue in Boost Voronoi generator).
|
||||
prepared_outline = union_(prepared_outline);
|
||||
|
||||
if (area(prepared_outline) <= 0) {
|
||||
assert(toolpaths.empty());
|
||||
return toolpaths;
|
||||
|
Loading…
x
Reference in New Issue
Block a user