SPE-2586: Disable replacing the default extruder with a volume extruder during multi-material segmentation.

This partly reverts commits 84e9da9c and 3edec09a (SPE-1841) because it led to ignoring assigned extruders to modifiers.
This commit is contained in:
Lukáš Hejl 2024-12-10 17:51:14 +01:00 committed by Lukas Matena
parent c2e9ad6953
commit e97e17fac0
2 changed files with 5 additions and 2 deletions

View File

@ -1854,7 +1854,7 @@ std::vector<std::vector<ExPolygons>> multi_material_segmentation_by_painting(con
const float interlocking_depth = float(print_object.config().mmu_segmented_region_interlocking_depth.value);
const auto extract_facets_info = [](const ModelVolume &mv) -> ModelVolumeFacetsInfo {
return {mv.mm_segmentation_facets, mv.is_mm_painted(), true};
return {mv.mm_segmentation_facets, mv.is_mm_painted(), false};
};
return segmentation_by_painting(print_object, extract_facets_info, num_facets_states, max_width, interlocking_depth, IncludeTopAndBottomLayers::Yes, throw_on_cancel_callback);

View File

@ -1470,7 +1470,7 @@ Print::ApplyStatus Print::apply(const Model &model, DynamicPrintConfig new_full_
for (size_t state_idx = 1; state_idx < std::min(volume_used_facet_states.size(), used_facet_states.size()); ++state_idx) {
used_facet_states[state_idx] |= volume_used_facet_states[state_idx];
}
#if 0
// When the default facet state (TriangleStateType::NONE) is used, then we mark the volume extruder also as the used extruder.
const bool used_volume_extruder = !volume_used_facet_states.empty() && volume_used_facet_states[static_cast<size_t>(TriangleStateType::NONE)];
if (const int volume_extruder_id = volume->extruder_id(); used_volume_extruder && volume_extruder_id >= 0) {
@ -1479,6 +1479,9 @@ Print::ApplyStatus Print::apply(const Model &model, DynamicPrintConfig new_full_
} else if (const int volume_extruder_id = volume->extruder_id(); volume_extruder_id >= 0) {
used_facet_states[volume_extruder_id] |= true;
}
#else
}
#endif
}
for (size_t state_idx = static_cast<size_t>(TriangleStateType::Extruder1); state_idx < used_facet_states.size(); ++state_idx) {