From a985771c9b319aa69dd99769d5920762b4352844 Mon Sep 17 00:00:00 2001 From: supermerill Date: Tue, 9 Oct 2018 19:16:00 +0200 Subject: [PATCH] bugfix thin_wall --- xs/src/libslic3r/MedialAxis.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xs/src/libslic3r/MedialAxis.cpp b/xs/src/libslic3r/MedialAxis.cpp index 27b77e197..4fbbf5344 100644 --- a/xs/src/libslic3r/MedialAxis.cpp +++ b/xs/src/libslic3r/MedialAxis.cpp @@ -624,11 +624,15 @@ MedialAxis::extends_line(ThickPolyline& polyline, const ExPolygons& anchors, con new_back = polyline.points.back(); } else { (void)this->expolygon.contour.first_intersection(line, &new_back); + // safety check if no intersection + if (new_back.x == 0 && new_back.y == 0) return; polyline.points.push_back(new_back); polyline.width.push_back(polyline.width.back()); } Point new_bound; (void)bounds.contour.first_intersection(line, &new_bound); + // safety check if no intersection + if (new_bound.x == 0 && new_bound.y == 0) return; /* if (new_bound.coincides_with_epsilon(new_back)) { return; }*/