From 7b33a7e86bfb7b718c678191525a18cedef1e158 Mon Sep 17 00:00:00 2001 From: igiannakas <59056762+igiannakas@users.noreply.github.com> Date: Tue, 22 Aug 2023 11:36:48 +0100 Subject: [PATCH] ENH: fix conner case of sandwich wall order Updated sandwich mode code to cater for edge case where two sets of internal perimeters were causing the perimeters of another island to not be re-ordered correctly. Github pull request: #2182 Change-Id: Ib58722db8cb76aa6b6474412c71993bb8e4dc007 --- src/libslic3r/PerimeterGenerator.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libslic3r/PerimeterGenerator.cpp b/src/libslic3r/PerimeterGenerator.cpp index 982b3158a..b99e83895 100644 --- a/src/libslic3r/PerimeterGenerator.cpp +++ b/src/libslic3r/PerimeterGenerator.cpp @@ -1608,16 +1608,16 @@ void PerimeterGenerator::process_arachne() outer = arr_i; break; case 1: // first internal wall - if (first_internal == -1 && arr_i > outer) + if (first_internal==-1 && arr_i>outer && outer!=-1) first_internal = arr_i; break; case 2: // second internal wall if (ordered_extrusions[arr_i].extrusion->inset_idx == 2 && second_internal == -1 && - arr_i > first_internal) + arr_i > first_internal && outer!=-1) second_internal = arr_i; break; } - if (second_internal != -1) + if (outer >-1 && first_internal>-1 && second_internal>-1) break; // found all three perimeters to re-order } if (outer > -1 && first_internal > -1 && second_internal > -1) { // found perimeters to re-order?