mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 06:57:36 -06:00
ENH: generate wipe tower when custom change gcode filament
Change-Id: Ia0c81453f09457a9d1d56fbcdce79112953c0208
This commit is contained in:
parent
75c5d7b267
commit
4284d2ddb0
10 changed files with 58 additions and 11 deletions
|
@ -327,10 +327,18 @@ std::vector<unsigned int> Print::support_material_extruders() const
|
|||
}
|
||||
|
||||
// returns 0-based indices of used extruders
|
||||
std::vector<unsigned int> Print::extruders() const
|
||||
std::vector<unsigned int> Print::extruders(bool conside_custom_gcode) const
|
||||
{
|
||||
std::vector<unsigned int> extruders = this->object_extruders();
|
||||
append(extruders, this->support_material_extruders());
|
||||
|
||||
if (conside_custom_gcode) {
|
||||
for (auto item : m_model.custom_gcode_per_print_z.gcodes) {
|
||||
if (item.type == CustomGCode::Type::ToolChange)
|
||||
extruders.push_back((unsigned int)item.extruder);
|
||||
}
|
||||
}
|
||||
|
||||
sort_remove_duplicates(extruders);
|
||||
return extruders;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue