USe is_mixed_slot

This commit is contained in:
Ian Bassi
2026-08-12 17:53:21 -03:00
committed by SoftFever
parent 8b20a4b066
commit 51bc06a68a

View File

@@ -6004,9 +6004,16 @@ LayerResult GCode::process_layer(
const WipingExtrusions::ExtruderPerCopy *entity_overrides = nullptr;
if (! layer_tools.has_extruder(correct_extruder_id)) {
// this entity is not overridden, but its extruder is not in layer_tools - we'll print it
// by last extruder on this layer (could happen e.g. when a wiping object is taller than others - dontcare extruders are eradicated from layer_tools)
correct_extruder_id = layer_tools.extruders.back();
// A mixed-color slot is absent from layer_tools.extruders by design:
// resolve_mixed_filaments() replaced it with its physical components,
// and the sublayer block emits its geometry separately. Reassigning it
// to the last extruder here would print it in the wrong colour, so only
// fall back for genuinely stale (dontcare) extruders.
if (!layer_tools.is_mixed_slot(correct_extruder_id)) {
// this entity is not overridden, but its extruder is not in layer_tools - we'll print it
// by last extruder on this layer (could happen e.g. when a wiping object is taller than others - dontcare extruders are eradicated from layer_tools)
correct_extruder_id = layer_tools.extruders.back();
}
}
printing_extruders.clear();
if (is_anything_overridden && use_overrides) {