From 966c18cbadb4a45dccf5d0c5c889ef7bd471152c Mon Sep 17 00:00:00 2001 From: Dima Buzdyk <46728448+buzzhuzz@users.noreply.github.com> Date: Fri, 24 May 2024 17:00:09 +0500 Subject: [PATCH] fix slow_down_layers (#5396) Setting slow_down_layers to 2 or more results in wrong number of slowed down layers. Do not increment layer_id since bottom layer (#0) handled separately. --- src/libslic3r/GCode.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index 71614cda04..f0ca33cfe1 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -5195,7 +5195,7 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description, speed = m_config.get_abs_value("initial_layer_speed"); } else if(m_config.slow_down_layers > 1){ - const auto _layer = layer_id() + 1; + const auto _layer = layer_id(); if (_layer > 0 && _layer < m_config.slow_down_layers) { const auto first_layer_speed = is_perimeter(path.role())