diff --git a/src/libslic3r/Polyline.cpp b/src/libslic3r/Polyline.cpp index 18ec759e0..c706aa50b 100644 --- a/src/libslic3r/Polyline.cpp +++ b/src/libslic3r/Polyline.cpp @@ -132,12 +132,17 @@ template void Polyline::simplify_by_visibility(const ExPoly void Polyline::split_at(const Point &point, Polyline* p1, Polyline* p2) const { - if (this->size() < 2 || this->points.front() == point) { + if (this->size() < 2) { *p1 = *this; p2->clear(); return; } + if (this->points.front() == point) { + *p1 = point; + *p2 = *this; + } + auto min_dist2 = std::numeric_limits::max(); auto min_point_it = this->points.cbegin(); Point prev = this->points.front();