Merged psSkirt and psBrim
This commit is contained in:
parent
97d95e814f
commit
63566a92b3
@ -157,7 +157,7 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n
|
||||
|| opt_key == "wipe_tower_x"
|
||||
|| opt_key == "wipe_tower_y"
|
||||
|| opt_key == "wipe_tower_rotation_angle") {
|
||||
steps.emplace_back(psSkirt);
|
||||
steps.emplace_back(psSkirtBrim);
|
||||
} else if (
|
||||
opt_key == "nozzle_diameter"
|
||||
|| opt_key == "resolution"
|
||||
@ -201,7 +201,7 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n
|
||||
|| opt_key == "first_layer_speed"
|
||||
|| opt_key == "z_offset") {
|
||||
steps.emplace_back(psWipeTower);
|
||||
steps.emplace_back(psSkirt);
|
||||
steps.emplace_back(psSkirtBrim);
|
||||
} else if (opt_key == "filament_soluble") {
|
||||
steps.emplace_back(psWipeTower);
|
||||
// Soluble support interface / non-soluble base interface produces non-soluble interface layers below soluble interface layers.
|
||||
@ -215,8 +215,7 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n
|
||||
osteps.emplace_back(posPerimeters);
|
||||
osteps.emplace_back(posInfill);
|
||||
osteps.emplace_back(posSupportMaterial);
|
||||
steps.emplace_back(psSkirt);
|
||||
steps.emplace_back(psBrim);
|
||||
steps.emplace_back(psSkirtBrim);
|
||||
} else {
|
||||
// for legacy, if we can't handle this option let's invalidate all steps
|
||||
//FIXME invalidate all steps of all objects as well?
|
||||
@ -239,8 +238,6 @@ bool Print::invalidate_step(PrintStep step)
|
||||
{
|
||||
bool invalidated = Inherited::invalidate_step(step);
|
||||
// Propagate to dependent steps.
|
||||
if (step == psSkirt)
|
||||
invalidated |= Inherited::invalidate_step(psBrim);
|
||||
if (step != psGCodeExport)
|
||||
invalidated |= Inherited::invalidate_step(psGCodeExport);
|
||||
return invalidated;
|
||||
@ -861,7 +858,7 @@ void Print::process()
|
||||
}
|
||||
this->set_done(psWipeTower);
|
||||
}
|
||||
if (this->set_started(psSkirt)) {
|
||||
if (this->set_started(psSkirtBrim)) {
|
||||
m_skirt.clear();
|
||||
m_skirt_convex_hull.clear();
|
||||
m_first_layer_convex_hull.points.clear();
|
||||
@ -869,9 +866,7 @@ void Print::process()
|
||||
this->set_status(88, L("Generating skirt"));
|
||||
this->_make_skirt();
|
||||
}
|
||||
this->set_done(psSkirt);
|
||||
}
|
||||
if (this->set_started(psBrim)) {
|
||||
|
||||
m_brim.clear();
|
||||
m_first_layer_convex_hull.points.clear();
|
||||
if (this->has_brim()) {
|
||||
@ -884,7 +879,7 @@ void Print::process()
|
||||
// Brim depends on skirt (brim lines are trimmed by the skirt lines), therefore if
|
||||
// the skirt gets invalidated, brim gets invalidated as well and the following line is called.
|
||||
this->finalize_first_layer_convex_hull();
|
||||
this->set_done(psBrim);
|
||||
this->set_done(psSkirtBrim);
|
||||
}
|
||||
BOOST_LOG_TRIVIAL(info) << "Slicing process finished." << log_memory_info();
|
||||
}
|
||||
|
@ -45,11 +45,10 @@ enum PrintStep {
|
||||
// psToolOrdering is a synonym to psWipeTower, as the Wipe Tower calculates and modifies the ToolOrdering,
|
||||
// while if printing without the Wipe Tower, the ToolOrdering is calculated as well.
|
||||
psToolOrdering = psWipeTower,
|
||||
psSkirt,
|
||||
psBrim,
|
||||
psSkirtBrim,
|
||||
// Last step before G-code export, after this step is finished, the initial extrusion path preview
|
||||
// should be refreshed.
|
||||
psSlicingFinished = psBrim,
|
||||
psSlicingFinished = psSkirtBrim,
|
||||
psGCodeExport,
|
||||
psCount,
|
||||
};
|
||||
|
@ -1240,7 +1240,7 @@ Print::ApplyStatus Print::apply(const Model &model, DynamicPrintConfig new_full_
|
||||
deleted_objects = true;
|
||||
}
|
||||
if (new_objects || deleted_objects)
|
||||
update_apply_status(this->invalidate_steps({ psSkirt, psBrim, psWipeTower, psGCodeExport }));
|
||||
update_apply_status(this->invalidate_steps({ psSkirtBrim, psWipeTower, psGCodeExport }));
|
||||
if (new_objects)
|
||||
update_apply_status(false);
|
||||
print_regions_reshuffled = true;
|
||||
|
@ -91,7 +91,7 @@ PrintBase::ApplyStatus PrintObject::set_instances(PrintInstances &&instances)
|
||||
[](const PrintInstance& lhs, const PrintInstance& rhs) { return lhs.model_instance == rhs.model_instance && lhs.shift == rhs.shift; });
|
||||
if (! equal) {
|
||||
status = PrintBase::APPLY_STATUS_CHANGED;
|
||||
if (m_print->invalidate_steps({ psSkirt, psBrim, psGCodeExport }) ||
|
||||
if (m_print->invalidate_steps({ psSkirtBrim, psGCodeExport }) ||
|
||||
(! equal_length && m_print->invalidate_step(psWipeTower)))
|
||||
status = PrintBase::APPLY_STATUS_INVALIDATED;
|
||||
m_instances = std::move(instances);
|
||||
@ -674,18 +674,18 @@ bool PrintObject::invalidate_step(PrintObjectStep step)
|
||||
// propagate to dependent steps
|
||||
if (step == posPerimeters) {
|
||||
invalidated |= this->invalidate_steps({ posPrepareInfill, posInfill, posIroning });
|
||||
invalidated |= m_print->invalidate_steps({ psSkirt, psBrim });
|
||||
invalidated |= m_print->invalidate_steps({ psSkirtBrim });
|
||||
} else if (step == posPrepareInfill) {
|
||||
invalidated |= this->invalidate_steps({ posInfill, posIroning });
|
||||
} else if (step == posInfill) {
|
||||
invalidated |= this->invalidate_steps({ posIroning });
|
||||
invalidated |= m_print->invalidate_steps({ psSkirt, psBrim });
|
||||
invalidated |= m_print->invalidate_steps({ psSkirtBrim });
|
||||
} else if (step == posSlice) {
|
||||
invalidated |= this->invalidate_steps({ posPerimeters, posPrepareInfill, posInfill, posIroning, posSupportMaterial });
|
||||
invalidated |= m_print->invalidate_steps({ psSkirt, psBrim });
|
||||
invalidated |= m_print->invalidate_steps({ psSkirtBrim });
|
||||
m_slicing_params.valid = false;
|
||||
} else if (step == posSupportMaterial) {
|
||||
invalidated |= m_print->invalidate_steps({ psSkirt, psBrim });
|
||||
invalidated |= m_print->invalidate_steps({ psSkirtBrim });
|
||||
m_slicing_params.valid = false;
|
||||
}
|
||||
|
||||
|
@ -5704,7 +5704,7 @@ void GLCanvas3D::_load_print_toolpaths()
|
||||
if (print == nullptr)
|
||||
return;
|
||||
|
||||
if (!print->is_step_done(psSkirt) || !print->is_step_done(psBrim))
|
||||
if (! print->is_step_done(psSkirtBrim))
|
||||
return;
|
||||
|
||||
if (!print->has_skirt() && !print->has_brim())
|
||||
|
Loading…
Reference in New Issue
Block a user