From 7494825038f524a8f22e4d02a7a5bf074c68076e Mon Sep 17 00:00:00 2001 From: Noisyfox Date: Wed, 19 Feb 2025 15:50:15 +0800 Subject: [PATCH] Avoid unnecessary call of `volume_bbox` if bed shape is not rectangle --- src/slic3r/GUI/3DScene.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/slic3r/GUI/3DScene.cpp b/src/slic3r/GUI/3DScene.cpp index 9070887052..598351fb89 100644 --- a/src/slic3r/GUI/3DScene.cpp +++ b/src/slic3r/GUI/3DScene.cpp @@ -1077,14 +1077,15 @@ bool GLVolumeCollection::check_outside_state(const BuildVolume &build_volume, Mo { if (! volume->is_modifier && (volume->shader_outside_printer_detection_enabled || (! volume->is_wipe_tower && volume->composite_id.volume_id >= 0))) { BuildVolume::ObjectState state; - const BoundingBoxf3& bb = volume_bbox(*volume); if (volume_below(*volume)) state = BuildVolume::ObjectState::Below; else { switch (plate_build_volume.type()) { - case BuildVolume_Type::Rectangle: - //FIXME this test does not evaluate collision of a build volume bounding box with non-convex objects. + case BuildVolume_Type::Rectangle: { + //FIXME this test does not evaluate collision of a build volume bounding box with non-convex objects. + const BoundingBoxf3& bb = volume_bbox(*volume); state = plate_build_volume.volume_state_bbox(bb); + } break; case BuildVolume_Type::Circle: case BuildVolume_Type::Convex: