From b5093b0fe3f4ecd5f093af87e3ed00194c19866c Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Mon, 31 Jul 2023 14:02:45 +0200 Subject: [PATCH] Wipe tower: do not apply extra spacing on the first layer purge lines --- src/libslic3r/GCode/WipeTower.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libslic3r/GCode/WipeTower.cpp b/src/libslic3r/GCode/WipeTower.cpp index 00ac858173..b29381350b 100644 --- a/src/libslic3r/GCode/WipeTower.cpp +++ b/src/libslic3r/GCode/WipeTower.cpp @@ -1053,8 +1053,9 @@ void WipeTower::toolchange_Wipe( // the ordered volume, even if it means violating the box. This can later be removed and simply // wipe until the end of the assigned area. - float x_to_wipe = volume_to_length(wipe_volume, m_perimeter_width, m_layer_height); - float dy = m_extra_spacing*m_perimeter_width; + float x_to_wipe = volume_to_length(wipe_volume, m_perimeter_width, m_layer_height) * (is_first_layer() ? m_extra_spacing : 1.f); + float dy = (is_first_layer() ? 1.f : m_extra_spacing) * m_perimeter_width; // Don't use the extra spacing for the first layer. + // All the calculations in all other places take the spacing into account for all the layers. const float target_speed = is_first_layer() ? m_first_layer_speed * 60.f : m_infill_speed * 60.f; float wipe_speed = 0.33f * target_speed;