FIX: STUDIO-787 & STUDIO-786 lion face model problem

1. memory explosion when enable timelapse.
2. Models with only one color become multicolor after slicing.

Change-Id: Iab3ace70c08d03ab612158d52ff67eef8d5bc718
This commit is contained in:
zhimin.zeng 2022-09-02 16:51:17 +08:00 committed by Lane.Wei
parent db83a1c193
commit 612204b443
3 changed files with 13 additions and 6 deletions

View file

@ -175,8 +175,13 @@ ToolOrdering::ToolOrdering(const Print &print, unsigned int first_extruder, bool
this->collect_extruders(*object, per_layer_extruder_switches);
// Reorder the extruders to minimize tool switches.
std::vector<unsigned int> first_layer_tool_order;
if (first_extruder == (unsigned int)-1) {
this->reorder_extruders(generate_first_layer_tool_order(print));
first_layer_tool_order = generate_first_layer_tool_order(print);
}
if (!first_layer_tool_order.empty()) {
this->reorder_extruders(first_layer_tool_order);
}
else {
this->reorder_extruders(first_extruder);