mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-02-20 11:32:31 -07:00
ENH: seperate reorder from toolorder construct
1.Only do reorder if requseted.In by object mode,we only need to collect the filaments in the object for filament grouping jira:NONE Signed-off-by: xun.zhang <xun.zhang@bambulab.com> Change-Id: Id88f2449c6d3c5d45b9ff87513308d997fa72da1 (cherry picked from commit 7b5818fe6c538123373243ec8dfedc3c2fa68e6d)
This commit is contained in:
parent
1af3b014a9
commit
e273cf9cf2
4 changed files with 201 additions and 169 deletions
|
|
@ -2156,6 +2156,7 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
|
|||
print_object_instance_sequential_active = print_object_instances_ordering.begin();
|
||||
for (; print_object_instance_sequential_active != print_object_instances_ordering.end(); ++ print_object_instance_sequential_active) {
|
||||
tool_ordering = ToolOrdering(*(*print_object_instance_sequential_active)->print_object, initial_extruder_id);
|
||||
tool_ordering.sort_and_build_data(*(*print_object_instance_sequential_active)->print_object,initial_extruder_id);
|
||||
if ((initial_extruder_id = tool_ordering.first_extruder()) != static_cast<unsigned int>(-1)) {
|
||||
//BBS: try to find the non-support filament extruder if is multi color and initial_extruder is support filament
|
||||
initial_non_support_extruder_id = initial_extruder_id;
|
||||
|
|
@ -2577,6 +2578,7 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
|
|||
const PrintObject &object = *(*print_object_instance_sequential_active)->print_object;
|
||||
if (&object != prev_object || tool_ordering.first_extruder() != final_extruder_id) {
|
||||
tool_ordering = ToolOrdering(object, final_extruder_id);
|
||||
tool_ordering.sort_and_build_data(object, final_extruder_id);
|
||||
unsigned int new_extruder_id = tool_ordering.first_extruder();
|
||||
if (new_extruder_id == (unsigned int)-1)
|
||||
// Skip this object.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue