Bugfix: double lift at toolchange. #953
This commit is contained in:
parent
0326962d11
commit
b73c301c55
@ -350,7 +350,7 @@ sub retract {
|
||||
# prepare moves
|
||||
$self->speed('retract');
|
||||
my $retract = [undef, undef, -$length, $comment];
|
||||
my $lift = ($self->extruder->retract_lift == 0 || defined $params{move_z})
|
||||
my $lift = ($self->extruder->retract_lift == 0 || defined $params{move_z}) && !$self->lifted
|
||||
? undef
|
||||
: [undef, $self->z + $self->extruder->retract_lift, 0, 'lift plate during travel'];
|
||||
|
||||
@ -371,12 +371,14 @@ sub retract {
|
||||
$gcode .= $self->G0(@$travel);
|
||||
} else {
|
||||
$gcode .= $self->G1(@$retract);
|
||||
if (defined $params{move_z} && $self->extruder->retract_lift > 0) {
|
||||
my $travel = [undef, $params{move_z} + $self->extruder->retract_lift, 0, 'move to next layer (' . $self->layer->id . ') and lift'];
|
||||
$gcode .= $self->G0(@$travel);
|
||||
$self->lifted($self->extruder->retract_lift);
|
||||
} elsif ($lift) {
|
||||
$gcode .= $self->G1(@$lift);
|
||||
if (!$self->lifted) {
|
||||
if (defined $params{move_z} && $self->extruder->retract_lift > 0) {
|
||||
my $travel = [undef, $params{move_z} + $self->extruder->retract_lift, 0, 'move to next layer (' . $self->layer->id . ') and lift'];
|
||||
$gcode .= $self->G0(@$travel);
|
||||
$self->lifted($self->extruder->retract_lift);
|
||||
} elsif ($lift) {
|
||||
$gcode .= $self->G1(@$lift);
|
||||
}
|
||||
}
|
||||
}
|
||||
$self->extruder->retracted($self->extruder->retracted + $length);
|
||||
|
@ -43,6 +43,7 @@ my $test = sub {
|
||||
if (_eq($info->{dist_Z}, $print->extruders->[$tool]->retract_lift)
|
||||
|| (_eq($info->{dist_Z}, $conf->layer_height + $print->extruders->[$tool]->retract_lift) && $print->extruders->[$tool]->retract_lift > 0)) {
|
||||
fail 'only lifting while retracted' if !$retracted[$tool] && !($conf->g0 && $info->{retracting});
|
||||
fail 'double lift' if $lifted;
|
||||
$lifted = 1;
|
||||
}
|
||||
if ($info->{dist_Z} < 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user