Revert "Use G92 to apply Z offset. #486" #778

degen-loop-screen
Alessandro Ranellucci 2012-11-06 20:04:44 +01:00
parent ab2b31672f
commit 1db614a5a9
2 changed files with 1 additions and 8 deletions

View File

@ -63,6 +63,7 @@ sub move_z {
my ($z, $comment) = @_;
$z *= &Slic3r::SCALING_FACTOR;
$z += $Slic3r::Config->z_offset;
my $gcode = "";
my $current_z = $self->z;

View File

@ -705,14 +705,6 @@ sub write_gcode {
}
}
# apply Z offset
if ($Slic3r::Config->z_offset > 0) {
printf $fh "G1 Z%s ; set Z offset\n", $Slic3r::Config->z_offset;
print $fh "G92 Z0 ; set Z offset\n";
} elsif ($Slic3r::Config->z_offset < 0) {
printf $fh "G92 Z%s ; set Z offset\n", 1*(-$Slic3r::Config->z_offset);
}
# calculate X,Y shift to center print around specified origin
my @print_bb = $self->bounding_box;
my @shift = (