diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index d8ea742b18..df3b1205fb 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -5326,7 +5326,9 @@ LayerResult GCode::process_belt_brim_layer( break; } - m_cur_layer_idx = m_belt_brim_layer_idx ++; + // Apron bands precede object layer 0 and have no layer id of their own; they take the + // filament and nozzle assignment in effect at the first object layer. + m_cur_layer_idx = 0; // Publish the band's Z for _extrude()'s first-layer-plane probe, and make sure // it cannot leak past this layer even if an extrusion throws. diff --git a/src/libslic3r/GCode.hpp b/src/libslic3r/GCode.hpp index 5d99c219c6..3356219037 100644 --- a/src/libslic3r/GCode.hpp +++ b/src/libslic3r/GCode.hpp @@ -843,9 +843,6 @@ protected: // _extrude() needs for the first-layer-plane probe is published here instead. // Scoped by BeltBrimZGuard in process_belt_brim_layer(), never left set. std::optional m_belt_brim_z; - // Counter standing in for Layer::id() on apron layers, which precede layer 0. - size_t m_belt_brim_layer_idx{0}; - // Belt brim only. Brim and coincident apron bands are emitted before m_layer // is switched to their object, so belt_height_above_floor() would otherwise // read the previously visited object's belt description -- making a brim's