FIX: error wipe tower gcode

jira: STUDIO-13101
Change-Id: Ic1e2aa294c290e208074a6a65d6f80c705ab7dc6
(cherry picked from commit d4deb67dda0a6a92622f0126706110518b90a8bd)
This commit is contained in:
zhimin.zeng 2025-07-08 11:23:09 +08:00 committed by Noisyfox
parent 0cb19a2bac
commit 4a3fa5141c

View file

@ -2653,8 +2653,8 @@ static WipeTower::ToolChangeResult merge_tcr(WipeTower::ToolChangeResult& first,
assert(first.new_tool == second.initial_tool);
WipeTower::ToolChangeResult out = first;
if ((first.end_pos - second.start_pos).norm() > (float)EPSILON) {
std::string travel_gcode = "G1 X" + Slic3r::float_to_string_decimal_point(second.start_pos.x(), 3)
+ " Y" + Slic3r::float_to_string_decimal_point(second.start_pos.y(), 3) +"F5400" + "\n";
std::string travel_gcode = "G1 X" + Slic3r::float_to_string_decimal_point(second.start_pos.x(), 3) + " Y" +
Slic3r::float_to_string_decimal_point(second.start_pos.y(), 3) + " F5400" + "\n";
bool need_insert_travel = true;
if (second.is_tool_change
&& is_approx(second.start_pos.x(), second.tool_change_start_pos.x())