New --extruder-offset option

This commit is contained in:
Alessandro Ranellucci 2012-08-07 21:39:45 +02:00
parent a2c28fd6da
commit 866b09f3f9
6 changed files with 24 additions and 5 deletions

View file

@ -295,8 +295,8 @@ sub _G0_G1 {
if ($point) {
$gcode .= sprintf " X%.${dec}f Y%.${dec}f",
($point->x * &Slic3r::SCALING_FACTOR) + $self->shift_x,
($point->y * &Slic3r::SCALING_FACTOR) + $self->shift_y; #**
($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);
}
if (defined $z && $z != $self->z) {
@ -315,8 +315,8 @@ sub G2_G3 {
my $gcode = $orientation eq 'cw' ? "G2" : "G3";
$gcode .= sprintf " X%.${dec}f Y%.${dec}f",
($point->x * &Slic3r::SCALING_FACTOR) + $self->shift_x,
($point->y * &Slic3r::SCALING_FACTOR) + $self->shift_y; #**
($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]; #**
# XY distance of the center from the start position
$gcode .= sprintf " I%.${dec}f J%.${dec}f",