diff options
Diffstat (limited to 'src/libslic3r/ExPolygon.cpp')
-rw-r--r-- | src/libslic3r/ExPolygon.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libslic3r/ExPolygon.cpp b/src/libslic3r/ExPolygon.cpp index f698a3558..12bfa3b35 100644 --- a/src/libslic3r/ExPolygon.cpp +++ b/src/libslic3r/ExPolygon.cpp @@ -80,6 +80,13 @@ bool ExPolygon::is_valid() const return true; } +void ExPolygon::douglas_peucker(double tolerance) +{ + this->contour.douglas_peucker(tolerance); + for (Polygon &poly : this->holes) + poly.douglas_peucker(tolerance); +} + bool ExPolygon::contains(const Line &line) const { return this->contains(Polyline(line.a, line.b)); |