From 5d636ab853aab0fa587a667d24ad8bf81ff44807 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Mon, 22 Mar 2021 13:26:05 +0100 Subject: [PATCH] Wipe tower: respect first_layer_speed --- src/libslic3r/GCode/WipeTower.cpp | 35 ++++++++++++++++++------------- src/libslic3r/Print.cpp | 4 ++-- 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/src/libslic3r/GCode/WipeTower.cpp b/src/libslic3r/GCode/WipeTower.cpp index 81b87f715..8b321a3c8 100644 --- a/src/libslic3r/GCode/WipeTower.cpp +++ b/src/libslic3r/GCode/WipeTower.cpp @@ -526,12 +526,16 @@ WipeTower::WipeTower(const PrintConfig& config, const std::vector cleaning_box.lu.y()-0.5f*m_perimeter_width) break; // in case next line would not fit @@ -1070,7 +1075,7 @@ WipeTower::ToolChangeResult WipeTower::finish_layer() // Slow down on the 1st layer. bool first_layer = m_layer_info == m_plan.begin(); - float speed_factor = first_layer ? 0.5f : 1.f; + float feedrate = first_layer ? m_first_layer_speed * 60.f : 2900.f; float current_depth = m_layer_info->depth - m_layer_info->toolchanges_depth(); box_coordinates fill_box(Vec2f(m_perimeter_width, m_layer_info->depth-(current_depth-m_perimeter_width)), m_wipe_tower_width - 2 * m_perimeter_width, current_depth-m_perimeter_width); @@ -1085,7 +1090,7 @@ WipeTower::ToolChangeResult WipeTower::finish_layer() // inner perimeter of the sparse section, if there is space for it: if (fill_box.ru.y() - fill_box.rd.y() > m_perimeter_width - WT_EPSILON) - writer.rectangle(fill_box.ld, fill_box.rd.x()-fill_box.ld.x(), fill_box.ru.y()-fill_box.rd.y(), 2900*speed_factor); + writer.rectangle(fill_box.ld, fill_box.rd.x()-fill_box.ld.x(), fill_box.ru.y()-fill_box.rd.y(), feedrate); // we are in one of the corners, travel to ld along the perimeter: if (writer.x() > fill_box.ld.x()+EPSILON) writer.travel(fill_box.ld.x(),writer.y()); @@ -1126,14 +1131,14 @@ WipeTower::ToolChangeResult WipeTower::finish_layer() float spacing = (dy-m_perimeter_width)/(n-1); int i=0; for (i=0; i