mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 01:07:57 -06:00
Simplify layer change code now that we have distinct support layers
This commit is contained in:
parent
548b301432
commit
4862d832b5
3 changed files with 13 additions and 21 deletions
|
@ -17,7 +17,6 @@ has 'layer' => (is => 'rw');
|
|||
has '_layer_islands' => (is => 'rw');
|
||||
has '_upper_layer_islands' => (is => 'rw');
|
||||
has '_layer_overhangs' => (is => 'rw');
|
||||
has 'move_z_callback' => (is => 'rw');
|
||||
has 'shift_x' => (is => 'rw', default => sub {0} );
|
||||
has 'shift_y' => (is => 'rw', default => sub {0} );
|
||||
has 'z' => (is => 'rw');
|
||||
|
@ -132,6 +131,8 @@ sub change_layer {
|
|||
$gcode .= $self->set_acceleration($self->config->default_acceleration);
|
||||
}
|
||||
}
|
||||
|
||||
$gcode .= $self->move_z($layer->print_z);
|
||||
return $gcode;
|
||||
}
|
||||
|
||||
|
@ -153,7 +154,6 @@ sub move_z {
|
|||
$self->speed('travel');
|
||||
$gcode .= $self->G0(undef, $z, 0, $comment || ('move to next layer (' . $self->layer->id . ')'))
|
||||
if !defined $self->z || abs($z - ($self->z - $self->lifted)) > epsilon;
|
||||
$gcode .= $self->move_z_callback->() if defined $self->move_z_callback;
|
||||
} elsif ($z < $self->z && $z > ($self->z - $self->lifted + epsilon)) {
|
||||
# we're moving to a layer height which is greater than the nominal current one
|
||||
# (nominal = actual - lifted) and less than the actual one. we're basically
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue