From 781a9535dbd56c5ed8104bf825665961963cb2c6 Mon Sep 17 00:00:00 2001 From: Vojtech Bubnik Date: Fri, 19 Aug 2022 15:03:39 +0200 Subject: [PATCH] Fixed performance issue at backgorund processing update with a large number of modifier meshes: Bounding box of a chain of modifier meshes overlapping with an object bounding box was not correctly calculated (bounding boxes were unioned instead of intersected). --- src/libslic3r/PrintApply.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libslic3r/PrintApply.cpp b/src/libslic3r/PrintApply.cpp index 4c085728c..1cae900e7 100644 --- a/src/libslic3r/PrintApply.cpp +++ b/src/libslic3r/PrintApply.cpp @@ -626,7 +626,8 @@ PrintObjectRegions::BoundingBox find_modifier_volume_extents(const PrintObjectRe const PrintObjectRegions::VolumeRegion &parent_region = layer_range.volume_regions[parent_region_id]; const PrintObjectRegions::BoundingBox *parent_extents = find_volume_extents(layer_range, *parent_region.model_volume); assert(parent_extents); - out.extend(*parent_extents); + out.clamp(*parent_extents); + assert(! out.isEmpty()); if (parent_region.model_volume->is_model_part()) break; parent_region_id = parent_region.parent;