mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-02-14 20:49:28 -07:00
ENH: match first filaments with physical extruder
Jira: none Signed-off-by: qing.zhang <qing.zhang@bambulab.com> Change-Id: I3907476c4644e2b0c2c097edf2bbf93e3a92cf90 (cherry picked from commit 419ce016984a27f4ec89ee1e2bb0cf272165152c)
This commit is contained in:
parent
d9eac89a9f
commit
70c80d6530
1 changed files with 13 additions and 0 deletions
|
|
@ -2272,11 +2272,24 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
|
|||
|
||||
this->placeholder_parser().set("most_used_physical_extruder_id", print.config().physical_extruder_map.values[max_count_extruder]);
|
||||
// Let the start-up script prime the 1st printing tool.
|
||||
|
||||
auto match_physical_extruder_for_each_filament = [](std::vector<int> &filaments, const FullPrintConfig &config) {
|
||||
// match the filament to the physical extruder
|
||||
std::vector<int> physicial_first_filaments;
|
||||
physicial_first_filaments.resize(filaments.size());
|
||||
for (int extruder_id = 0; extruder_id < filaments.size(); extruder_id++) {
|
||||
physicial_first_filaments[config.physical_extruder_map.get_at(extruder_id)] = filaments[extruder_id];
|
||||
}
|
||||
filaments = physicial_first_filaments;
|
||||
};
|
||||
match_physical_extruder_for_each_filament(first_filaments, m_config);
|
||||
this->placeholder_parser().set("first_tools", new ConfigOptionInts(first_filaments));
|
||||
this->placeholder_parser().set("first_filaments", new ConfigOptionInts(first_filaments));
|
||||
this->placeholder_parser().set("initial_tool", initial_extruder_id);
|
||||
this->placeholder_parser().set("initial_extruder", initial_extruder_id);
|
||||
//BBS
|
||||
match_physical_extruder_for_each_filament(first_non_support_filaments, m_config);
|
||||
|
||||
this->placeholder_parser().set("first_non_support_tools", new ConfigOptionInts(first_non_support_filaments));
|
||||
this->placeholder_parser().set("first_non_support_filaments", new ConfigOptionInts(first_non_support_filaments));
|
||||
this->placeholder_parser().set("initial_no_support_tool", initial_non_support_extruder_id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue