diff --git a/src/libslic3r/GCode/WipeTower.cpp b/src/libslic3r/GCode/WipeTower.cpp index 79da522399..c43a3df1cd 100644 --- a/src/libslic3r/GCode/WipeTower.cpp +++ b/src/libslic3r/GCode/WipeTower.cpp @@ -660,7 +660,7 @@ std::vector WipeTower::prime( return std::vector(); } -WipeTower::ToolChangeResult WipeTower::tool_change(size_t tool, bool extrude_perimeter) +WipeTower::ToolChangeResult WipeTower::tool_change(size_t tool, bool extrude_perimeter, bool first_toolchange_to_nonsoluble) { size_t old_tool = m_current_tool; @@ -729,6 +729,12 @@ WipeTower::ToolChangeResult WipeTower::tool_change(size_t tool, bool extrude_per writer.rectangle(wt_box); writer.travel(initial_position); } + + if (first_toolchange_to_nonsoluble) { + writer.travel(Vec2f(0, 0)); + writer.travel(initial_position); + } + toolchange_Wipe(writer, cleaning_box, wipe_length); // Wipe the newly loaded filament until the end of the assigned wipe area. ++ m_num_tool_changes; } else @@ -1514,7 +1520,11 @@ void WipeTower::generate(std::vector> & finish_layer_tcr = finish_layer(false, layer.extruder_fill); } else { - layer_result.emplace_back(tool_change(layer.tool_changes[i].new_tool)); + if (idx == -1 && i == 0) { + layer_result.emplace_back(tool_change(layer.tool_changes[i].new_tool, false, true)); + } else { + layer_result.emplace_back(tool_change(layer.tool_changes[i].new_tool)); + } } } diff --git a/src/libslic3r/GCode/WipeTower.hpp b/src/libslic3r/GCode/WipeTower.hpp index de84a604a5..639b77b042 100644 --- a/src/libslic3r/GCode/WipeTower.hpp +++ b/src/libslic3r/GCode/WipeTower.hpp @@ -217,7 +217,7 @@ public: // Returns gcode for a toolchange and a final print head position. // On the first layer, extrude a brim around the future wipe tower first. // BBS - ToolChangeResult tool_change(size_t new_tool, bool extrude_perimeter = false); + ToolChangeResult tool_change(size_t new_tool, bool extrude_perimeter = false, bool first_toolchange_to_nonsoluble = false); // Fill the unfilled space with a sparse infill. // Call this method only if layer_finished() is false.