More progress on 'wipe into dedicated object' feature (e.g. new value in object settings)

This commit is contained in:
Lukas Matena 2018-06-06 18:24:42 +02:00
parent 4830593cac
commit 73452fd79d
7 changed files with 52 additions and 29 deletions

View file

@ -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();
}
}
}
}
}