From 06b475a4edd90907f9c7785e28f2aa2ab1ac034c Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Fri, 16 Nov 2012 11:05:45 +0100 Subject: [PATCH] Clone last_pos before storing it otherwise it will be translated. #786 --- lib/Slic3r/GCode.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Slic3r/GCode.pm b/lib/Slic3r/GCode.pm index 0deb4b03..f45b671f 100644 --- a/lib/Slic3r/GCode.pm +++ b/lib/Slic3r/GCode.pm @@ -312,7 +312,7 @@ sub _G0_G1 { $gcode .= sprintf " X%.${dec}f Y%.${dec}f", ($point->x * &Slic3r::SCALING_FACTOR) + $self->shift_x - $self->extruder->extruder_offset->[X], ($point->y * &Slic3r::SCALING_FACTOR) + $self->shift_y - $self->extruder->extruder_offset->[Y]; #** - $self->last_pos($point); + $self->last_pos($point->clone); } if (defined $z && (!defined $self->z || $z != $self->z)) { $self->z($z);