mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 23:17:35 -06:00
FIX: auto-arrange fails for multi-color objects
The cost for switching extruders was too big. Change-Id: Ic9de6b6aabb7e69db79a0201f0dbb9d039097df9
This commit is contained in:
parent
06f878f13b
commit
d95e85851c
4 changed files with 46 additions and 19 deletions
|
@ -436,10 +436,12 @@ protected:
|
|||
if (!params.allow_multi_materials_on_same_plate)
|
||||
score += LARGE_COST_TO_REJECT * (item.extrude_id != p.extrude_id);
|
||||
}
|
||||
|
||||
// for layered printing, we want extruder change as few as possible
|
||||
// this has very weak effect, CAN NOT use a large weight
|
||||
if (!params.is_seq_print) {
|
||||
extruder_ids.insert(item.extrude_id);
|
||||
score += 0.2 * LARGE_COST_TO_REJECT * std::max(0, ((int)extruder_ids.size() - 1));
|
||||
score += 1 * std::max(0, ((int)extruder_ids.size() - 1));
|
||||
}
|
||||
|
||||
return std::make_tuple(score, fullbb);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue