mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-12-03 18:27:59 -05:00
Allow spiral vase on a model painted all over with one filament (#17073)
Painting a whole model with a filament other than its own (T3 on a Snapmaker U1, for example) and turning on spiral vase failed validation with "Spiral (vase) mode does not work when an object contains more than one material", although only the painted filament prints. When every facet of every model part is painted, the check now uses the painted filaments instead of the object's own. It still refuses when mmu_segmented_region_max_width or mmu_segmented_region_interlocking_depth is above 0, because the paint then covers only a band near the walls and the rest prints with the object's filament. Segmentation ignores both settings when beam interlocking is on, so that case is allowed. Fixes #17072 Co-authored-by: raistlin7447 <kris.austin@gmail.com>
This commit is contained in:
1 parent
d43eb75ba8
commit
7c5db9e7c1
4 files changed
+73
-1
No files matched your search
+19
-1
@@ -2521,7 +2521,25 @@ StringObjectException Print::validate(std::vector<StringObjectException> *warnin
|
||||
// spiral vase cannot print.
|
||||
const auto &is_mixed = m_config.filament_is_mixed.values;
|
||||
for (const PrintObject *object : m_objects) {
|
||||
const auto used_filament_ids = object->object_extruders();
|
||||
auto used_filament_ids = object->object_extruders();
|
||||
// Painted all over, the object prints only its painted filaments, unless the segmented region
|
||||
// max width or interlocking depth limits the paint to a band and fills the rest with its own filament.
|
||||
// Beam interlocking turns that band off.
|
||||
const PrintObjectConfig &object_config = object->config();
|
||||
const ModelVolumePtrs &volumes = object->model_object()->volumes;
|
||||
if ((object_config.interlocking_beam.value ||
|
||||
(object_config.mmu_segmented_region_max_width.value == 0. &&
|
||||
object_config.mmu_segmented_region_interlocking_depth.value == 0.)) &&
|
||||
std::all_of(volumes.begin(), volumes.end(), [](const ModelVolume *volume) {
|
||||
return !volume->is_model_part() || volume->is_mm_painted_everywhere();
|
||||
})) {
|
||||
used_filament_ids.clear();
|
||||
for (const ModelVolume *volume : volumes)
|
||||
if (volume->is_model_part())
|
||||
for (size_t filament_id : volume->get_extruders_from_multi_material_painting())
|
||||
used_filament_ids.push_back(static_cast<unsigned int>(filament_id));
|
||||
sort_remove_duplicates(used_filament_ids);
|
||||
}
|
||||
if (used_filament_ids.size() > 1 ||
|
||||
std::any_of(used_filament_ids.begin(), used_filament_ids.end(), [&is_mixed](unsigned int filament_id) {
|
||||
return filament_id < is_mixed.size() && is_mixed[filament_id];
|
||||
|
||||
Reference in new issue
Block a user