mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-02-14 20:49:28 -07:00
FIX: fix the error wipe path
jira: none Change-Id: I34af54711531b208049cbbc3883bca92328b9b5a (cherry picked from commit da3819f52f5454075342e8565fe9020773aa25ef)
This commit is contained in:
parent
eb8eb5efd1
commit
e011b54d3f
1 changed files with 4 additions and 2 deletions
|
|
@ -742,6 +742,8 @@ static std::vector<Vec2d> get_path_of_change_filament(const Print& print)
|
|||
end_filament_gcode_str = nozzle_change_gcode_trans + end_filament_gcode_str;
|
||||
}
|
||||
|
||||
end_filament_gcode_str = toolchange_retract_str + end_filament_gcode_str;
|
||||
|
||||
if (! change_filament_gcode.empty()) {
|
||||
DynamicConfig config;
|
||||
int old_filament_id = gcodegen.writer().filament() ? (int)gcodegen.writer().filament()->id() : -1;
|
||||
|
|
@ -906,8 +908,6 @@ static std::vector<Vec2d> get_path_of_change_filament(const Print& print)
|
|||
std::string toolchange_unretract_str = gcodegen.unretract();
|
||||
check_add_eol(toolchange_unretract_str);
|
||||
|
||||
toolchange_gcode_str = toolchange_retract_str + toolchange_gcode_str + toolchange_unretract_str;
|
||||
|
||||
gcodegen.placeholder_parser().set("current_extruder", new_filament_id);
|
||||
gcodegen.placeholder_parser().set("retraction_distance_when_cut", gcodegen.m_config.retraction_distances_when_cut.get_at(new_filament_id));
|
||||
gcodegen.placeholder_parser().set("long_retraction_when_cut", gcodegen.m_config.long_retractions_when_cut.get_at(new_filament_id));
|
||||
|
|
@ -923,6 +923,8 @@ static std::vector<Vec2d> get_path_of_change_filament(const Print& print)
|
|||
check_add_eol(start_filament_gcode_str);
|
||||
}
|
||||
|
||||
start_filament_gcode_str = start_filament_gcode_str + toolchange_unretract_str;
|
||||
|
||||
// Insert the end filament, toolchange, and start filament gcode into the generated gcode.
|
||||
DynamicConfig config;
|
||||
config.set_key_value("filament_end_gcode", new ConfigOptionString(end_filament_gcode_str));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue