From 3961185bcfaeb061eb6caac37a5c4dcbb2a827a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Hejl?= Date: Tue, 23 Feb 2021 20:07:40 +0100 Subject: [PATCH] Fixed wrong orientation of infill and gap-fill extrusion. When an island contains exactly one infill ExtrusionEntity, this extrusion was oriented to maximize travel distance from the end of the previous extrusion of perimeters instead of minimizing it. --- src/libslic3r/ShortestPath.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libslic3r/ShortestPath.cpp b/src/libslic3r/ShortestPath.cpp index df09df956ef..449ff45b532 100644 --- a/src/libslic3r/ShortestPath.cpp +++ b/src/libslic3r/ShortestPath.cpp @@ -75,7 +75,7 @@ std::vector> chain_segments_greedy_constrained_reversals { // Just sort the end points so that the first point visited is closest to start_near. out.emplace_back(0, could_reverse_func(0) && start_near != nullptr && - (end_point_func(0, true) - *start_near).template cast().squaredNorm() < (end_point_func(0, false) - *start_near).template cast().squaredNorm()); + (end_point_func(0, false) - *start_near).template cast().squaredNorm() < (end_point_func(0, true) - *start_near).template cast().squaredNorm()); } else {