From f05457f47a2a1fa9bf83b1c8397fc5243c44f4ff Mon Sep 17 00:00:00 2001 From: "salt.wei" Date: Mon, 14 Aug 2023 20:16:37 +0800 Subject: [PATCH] FIX: should consider plate offset in wipe tower Updating position to gcode writer in wipe tower miss plate offset. This is handling for github issue #2256 github: github issue #2256 Signed-off-by: salt.wei Change-Id: I915591ee919d10bb5bd2c2dcd5f1e98fd4b66503 --- src/libslic3r/GCode.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index 819185f995..fe6598e244 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -586,7 +586,7 @@ static std::vector get_path_of_change_filament(const Print& print) gcode += gcodegen.writer().set_pressure_advance(gcodegen.config().pressure_advance.get_at(new_extruder_id)); // A phony move to the end position at the wipe tower. - gcodegen.writer().travel_to_xy(end_pos.cast()); + gcodegen.writer().travel_to_xy((end_pos + plate_origin_2d).cast()); gcodegen.set_last_pos(wipe_tower_point_to_object_point(gcodegen, end_pos + plate_origin_2d)); if (!is_approx(z, current_z)) { gcode += gcodegen.writer().retract();