From 4c9ea5241dd2e1856f3e6f573b35ca46bafa9780 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Wed, 24 Nov 2021 21:25:20 +0100 Subject: [PATCH] Fixup of a996f33 (When modifiers were used, slicing was cancelled immediately after if began): The algorithm checking for dummy VolumeRegions jumped over one element and always returned that regions need to be regenerated --- src/libslic3r/PrintApply.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/libslic3r/PrintApply.cpp b/src/libslic3r/PrintApply.cpp index 84ff55598..1467aaea0 100644 --- a/src/libslic3r/PrintApply.cpp +++ b/src/libslic3r/PrintApply.cpp @@ -662,11 +662,10 @@ bool verify_update_print_object_regions( // if the visited modifier did not modify their properties. Now the visited modifier's configuration may have changed, // which may require new regions to be created. it_model_volume_modifier_last = it_model_volume; - int this_region_id = int(®ion - layer_range.volume_regions.data()); - int next_region_id = this_region_id + 1; + int next_region_id = int(®ion - layer_range.volume_regions.data()); const PrintObjectRegions::BoundingBox *bbox = find_volume_extents(layer_range, *region.model_volume); assert(bbox); - for (int parent_region_id = this_region_id - 1; parent_region_id >= 0; -- parent_region_id) { + for (int parent_region_id = next_region_id - 1; parent_region_id >= 0; -- parent_region_id) { const PrintObjectRegions::VolumeRegion &parent_region = layer_range.volume_regions[parent_region_id]; assert(parent_region.model_volume != region.model_volume); if (parent_region.model_volume->is_model_part() || parent_region.model_volume->is_modifier()) {