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 <salt.wei@bambulab.com>
Change-Id: I915591ee919d10bb5bd2c2dcd5f1e98fd4b66503
This commit is contained in:
salt.wei 2023-08-14 20:16:37 +08:00 committed by Lane.Wei
parent 2a996d40b6
commit cb38b71825
1 changed files with 1 additions and 1 deletions

View File

@ -586,7 +586,7 @@ static std::vector<Vec2d> 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<double>());
gcodegen.writer().travel_to_xy((end_pos + plate_origin_2d).cast<double>());
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();