mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-23 12:49:18 -07:00
More progress on 'wipe into dedicated object' feature (e.g. new value in object settings)
This commit is contained in:
@@ -1210,7 +1210,19 @@ float Print::mark_wiping_infill(const ToolOrdering::LayerTools& layer_tools, uns
|
||||
continue;
|
||||
}
|
||||
|
||||
//if (object.wipe_into_perimeters)
|
||||
ExtrusionEntityCollection& eec = this_layer->regions[region_id]->fills;
|
||||
for (ExtrusionEntity* ee : eec.entities) { // iterate through all infill Collections
|
||||
auto* fill = dynamic_cast<ExtrusionEntityCollection*>(ee);
|
||||
if (fill->role() == erTopSolidInfill || fill->role() == erGapFill) continue; // these cannot be changed - it is / may be visible
|
||||
if (volume_to_wipe <= 0.f)
|
||||
break;
|
||||
if (!fill->is_extruder_overridden(copy) && fill->total_volume() > min_infill_volume) { // this infill will be used to wipe this extruder
|
||||
fill->set_extruder_override(copy, new_extruder);
|
||||
volume_to_wipe -= fill->total_volume();
|
||||
}
|
||||
}
|
||||
|
||||
if (objects[i]->config.wipe_into_objects)
|
||||
{
|
||||
ExtrusionEntityCollection& eec = this_layer->regions[region_id]->perimeters;
|
||||
for (ExtrusionEntity* ee : eec.entities) { // iterate through all perimeter Collections
|
||||
@@ -1223,19 +1235,6 @@ float Print::mark_wiping_infill(const ToolOrdering::LayerTools& layer_tools, uns
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ExtrusionEntityCollection& eec = this_layer->regions[region_id]->fills;
|
||||
for (ExtrusionEntity* ee : eec.entities) { // iterate through all infill Collections
|
||||
auto* fill = dynamic_cast<ExtrusionEntityCollection*>(ee);
|
||||
if (fill->role() == erTopSolidInfill || fill->role() == erGapFill) continue; // these cannot be changed - it is / may be visible
|
||||
if (volume_to_wipe <= 0.f)
|
||||
break;
|
||||
if (!fill->is_extruder_overridden(copy) && fill->total_volume() > min_infill_volume) { // this infill will be used to wipe this extruder
|
||||
fill->set_extruder_override(copy, new_extruder);
|
||||
volume_to_wipe -= fill->total_volume();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user