From 3a61fefa3a13c108328c5e9cbb7eda40f798b1d3 Mon Sep 17 00:00:00 2001 From: Argo <52103738+Argolein@users.noreply.github.com> Date: Thu, 26 Feb 2026 09:11:13 +0100 Subject: [PATCH] Wipe tower "infinite out of bed line" fix (#12267) Fix wipe tower out-of-bed moves Co-authored-by: Ioannis Giannakas <59056762+igiannakas@users.noreply.github.com> --- src/libslic3r/GCode.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index f3248758ef..57dca539b6 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -1409,11 +1409,12 @@ static std::vector get_path_of_change_filament(const Print& print) else line_out << ch; } + // Strip original wipe tower X/Y even if position unchanged (fixes out of bed moves). + line = line_out.str(); transformed_pos = trans_pos(pos); if (transformed_pos != old_pos || never_skip) { - line = line_out.str(); std::ostringstream oss; oss << std::fixed << std::setprecision(3) << cur_gcode_start; if (transformed_pos.x() != old_pos.x() || never_skip) @@ -1446,7 +1447,7 @@ static std::vector get_path_of_change_filament(const Print& print) } old_pos = Vec2f{-1000.1f, -1000.1f}; pos = tcr.tool_change_start_pos; - transformed_pos = pos; + transformed_pos = trans_pos(pos); } } return gcode_out;