Removed --g0

This commit is contained in:
Alessandro Ranellucci 2014-10-21 21:41:11 +02:00
parent 71ec90a1dd
commit c2e710d092
10 changed files with 6 additions and 65 deletions

View file

@ -459,34 +459,6 @@ sub unretract {
return $gcode;
}
sub G0 {
my $self = shift;
return $self->G1(@_) if !($self->config->g0 || $self->config->gcode_flavor eq 'mach3');
return $self->_G0_G1("G0", @_);
}
sub G1 {
my $self = shift;
return $self->_G0_G1("G1", @_);
}
sub _G0_G1 {
my ($self, $gcode, $point, $z, $e, $F, $comment) = @_;
if ($point) {
$gcode .= sprintf " X%.3f Y%.3f",
($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->clone);
}
if (defined $z && (!defined $self->z || $z != $self->z)) {
$self->z($z);
$gcode .= sprintf " Z%.3f", $z;
}
return $self->_Gx($gcode, $e, $F, $comment);
}
# convert a model-space scaled point into G-code coordinates
sub point_to_gcode {
my ($self, $point) = @_;
@ -497,20 +469,6 @@ sub point_to_gcode {
);
}
sub _Gx {
my ($self, $gcode, $e, $F, $comment) = @_;
$gcode .= sprintf " F%.3f", $F;
# output extrusion distance
if ($e && $self->_extrusion_axis) {
$gcode .= sprintf " %s%.5f", $self->_extrusion_axis, $self->_extruder->extrude($e);
}
$gcode .= " ; $comment" if $comment && $self->config->gcode_comments;
return "$gcode\n";
}
sub set_extruder {
my ($self, $extruder_id) = @_;