From 49ce613be7b64426b29ff1cbca6173a29b8da94b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Hejl?= Date: Mon, 16 Nov 2020 14:37:42 +0100 Subject: [PATCH] Enable previous heuristics which was disabled by mistake --- src/libslic3r/GCode/AvoidCrossingPerimeters.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libslic3r/GCode/AvoidCrossingPerimeters.cpp b/src/libslic3r/GCode/AvoidCrossingPerimeters.cpp index 4e45ed28b..4aafa77fb 100644 --- a/src/libslic3r/GCode/AvoidCrossingPerimeters.cpp +++ b/src/libslic3r/GCode/AvoidCrossingPerimeters.cpp @@ -569,7 +569,7 @@ std::vector AvoidCrossingPerimeters2::sim std::sort(intersections.begin(), intersections.end()); size_t last_border_idx_count = 0; for (const Intersection &intersection : intersections) - if (intersection.border_idx == int(possible_new_next.border_idx)) + if (int(intersection.border_idx) == possible_new_next.border_idx) ++last_border_idx_count; if (last_border_idx_count > 0) @@ -748,9 +748,9 @@ Polyline AvoidCrossingPerimeters2::travel_to(const GCode &gcodegen, const Point std::vector result; auto [start_clamped, end_clamped] = clamp_endpoints_by_bounding_box(use_external ? m_bbox_external : m_bbox, start, end); if (use_external) - travel_intersection_count = this->avoid_perimeters(m_boundaries_external, m_grid_external, start_clamped, end_clamped, false, &result); + travel_intersection_count = this->avoid_perimeters(m_boundaries_external, m_grid_external, start_clamped, end_clamped, true, &result); else - travel_intersection_count = this->avoid_perimeters(m_boundaries, m_grid, start_clamped, end_clamped, false, &result); + travel_intersection_count = this->avoid_perimeters(m_boundaries, m_grid, start_clamped, end_clamped, true, &result); result_pl = to_polyline(result); }