Skip to content

Commit

Permalink
fix slow_down_layers (#5396)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
buzzhuzz authored May 24, 2024
1 parent 1d5fb94 commit 966c18c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libslic3r/GCode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 966c18c

Please sign in to comment.