ENH: enhance extruder unprintable area detection

1. Detect unprintable area for extruder when slicing
2. Always do filament map again if object pos changed

jira:STUDIO-9473

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: Ic01b8be8e3b08ba6b34efb2d3c451c9e985a03e8
(cherry picked from commit f1445ff0477795e9baf3792348ff27d79ee2308c)
This commit is contained in:
xun.zhang
2025-01-01 09:19:53 +08:00
committed by Noisyfox
parent 3eaeb55f36
commit f127846914
6 changed files with 180 additions and 94 deletions

View File

@@ -1527,8 +1527,13 @@ Print::ApplyStatus Print::apply(const Model &model, DynamicPrintConfig new_full_
} else {
// The PrintObject already exists and the copies differ.
PrintBase::ApplyStatus status = (*it_old)->print_object->set_instances(std::move(new_instances.instances));
if (status != PrintBase::APPLY_STATUS_UNCHANGED)
update_apply_status(status == PrintBase::APPLY_STATUS_INVALIDATED);
if (status != PrintBase::APPLY_STATUS_UNCHANGED) {
size_t extruder_num = new_full_config.option<ConfigOptionFloatsNullable>("nozzle_diameter")->size();
if (extruder_num > 1) {
update_apply_status(this->invalidate_steps({ psWipeTower,psSkirtBrim, psGCodeExport }));
}
update_apply_status(status == PrintBase::APPLY_STATUS_INVALIDATED);
}
print_objects_new.emplace_back((*it_old)->print_object);
const_cast<PrintObjectStatus*>(*it_old)->status = PrintObjectStatus::Reused;
}