mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-04 22:31:02 +00:00
Belt: index apron layers into the first layer's nozzle map
Apron bands looked up their filament and nozzle config slot with a running counter, while object layers use Layer::id(), so band N read the map of object layer N. They precede layer 0 and now use its assignment. Raised in Hanif Koh's review of #14394.
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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<coordf_t> 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
|
||||
|
||||
Reference in New Issue
Block a user