From 69808c3b12cb6a8409eb5499d5c2700f22a084f3 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Sun, 4 Feb 2024 01:08:36 +0100 Subject: [PATCH] Fixed arrange which put the wipe tower slightly out of bed (#11367, #11410, SPE-1966) --- src/slic3r/GUI/3DScene.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/slic3r/GUI/3DScene.cpp b/src/slic3r/GUI/3DScene.cpp index 9b08bc07b22..db588574a72 100644 --- a/src/slic3r/GUI/3DScene.cpp +++ b/src/slic3r/GUI/3DScene.cpp @@ -506,6 +506,15 @@ int GLVolumeCollection::load_wipe_tower_preview( if (height == 0.0f) height = 0.1f; + // Because the GLVolume is also used for arrangement, it must be safely larger + // than the actual extruded tower, otherwise the arranged tower ends up out of bed. + float offset = 0.3; + pos_x -= offset; + pos_y -= offset; + width += 2.f * offset; + depth += 2.f * offset; + brim_width += offset; + static const float brim_height = 0.2f; // const float scaled_brim_height = brim_height / height;