1
0
mirror of https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git synced 2026-07-23 10:04:26 +00:00

Always fix self-intersecting polygons that Douglas-Peucker might return

This commit is contained in:
Alessandro Ranellucci
2013-03-16 18:42:56 +01:00
parent dc0f706789
commit 33b40eda18
14 changed files with 85 additions and 55 deletions
+10
View File
@@ -92,4 +92,14 @@ sub collapse_ex {
return union_ex([@result]);
}
sub simplify_polygon {
my ($polygon, $pft) = @_;
return @{ Math::Clipper::simplify_polygon($polygon, $pft // PFT_NONZERO) };
}
sub simplify_polygons {
my ($polygons, $pft) = @_;
return @{ Math::Clipper::simplify_polygons($polygons, $pft // PFT_NONZERO) };
}
1;