mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 23:17:35 -06:00
FIX: get correct extruders of object has multicolor volumes
STUDIO-3049 Change-Id: If63a86e12fab9f3bb012d5b2833f7f89caf08c78 (cherry picked from commit fa529c282ed3ecd8fe889b8d9d863af44e0bd19a)
This commit is contained in:
parent
5739d58283
commit
bea2be1e18
1 changed files with 9 additions and 10 deletions
|
@ -3381,19 +3381,18 @@ void ModelInstance::get_arrange_polygon(void *ap, const Slic3r::DynamicPrintConf
|
|||
|
||||
//BBS: add materials related information
|
||||
ModelVolume *volume = NULL;
|
||||
for (size_t i = 0; i < object->volumes.size(); ++ i) {
|
||||
if (object->volumes[i]->is_model_part())
|
||||
{
|
||||
for (size_t i = 0; i < object->volumes.size(); ++i) {
|
||||
if (object->volumes[i]->is_model_part()) {
|
||||
volume = object->volumes[i];
|
||||
break;
|
||||
if (!volume) {
|
||||
BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << "invalid object, should not happen";
|
||||
return;
|
||||
}
|
||||
auto ve = object->volumes[i]->get_extruders();
|
||||
ret.extrude_ids.insert(ret.extrude_ids.end(), ve.begin(), ve.end());
|
||||
}
|
||||
}
|
||||
if (!volume)
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << "invalid object, should not happen";
|
||||
return;
|
||||
}
|
||||
ret.extrude_ids = volume->get_extruders();
|
||||
|
||||
// get per-object support extruders
|
||||
auto op = object->get_config_value<ConfigOptionBool>(config_global, "enable_support");
|
||||
bool is_support_enabled = op && op->getBool();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue