diff options
Diffstat (limited to 'src/libslic3r/MedialAxis.cpp')
-rw-r--r-- | src/libslic3r/MedialAxis.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/libslic3r/MedialAxis.cpp b/src/libslic3r/MedialAxis.cpp index f9b4c1954..3e85718b7 100644 --- a/src/libslic3r/MedialAxis.cpp +++ b/src/libslic3r/MedialAxis.cpp @@ -1328,16 +1328,11 @@ MedialAxis::ensure_not_overextrude(ThickPolylines& pp) void MedialAxis::simplify_polygon_frontier() { - //simplify the boundary between us and the bounds. - ExPolygon simplified_poly = this->surface; - simplified_poly.contour.remove_colinear_points(SCALED_EPSILON); - for (Polygon &hole : simplified_poly.holes) - hole.remove_colinear_points(SCALED_EPSILON); //it will remove every point in the surface contour that aren't on the bounds contour this->expolygon = this->surface; - this->expolygon.contour.remove_collinear_points(SCALED_EPSILON); + this->expolygon.contour.remove_colinear_points(SCALED_EPSILON); for (Polygon &hole : this->expolygon.holes) - hole.remove_collinear_points(SCALED_EPSILON); + hole.remove_colinear_points(SCALED_EPSILON); if (&this->surface != this->bounds) { bool need_intersect = false; for (size_t i = 0; i < this->expolygon.contour.points.size(); i++) { @@ -1366,9 +1361,9 @@ MedialAxis::simplify_polygon_frontier() } else { //can't simplify that much, reuse the given one this->expolygon = this->surface; - this->expolygon.contour.remove_collinear_points(SCALED_EPSILON); + this->expolygon.contour.remove_colinear_points(SCALED_EPSILON); for (Polygon &hole : this->expolygon.holes) - hole.remove_collinear_points(SCALED_EPSILON); + hole.remove_colinear_points(SCALED_EPSILON); } } } |