mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-21 21:58:03 -06:00
Bugfix: wrong number of raft layers in some situations due to a numerical error
This commit is contained in:
parent
1f497c0f7c
commit
82e2dd4e62
3 changed files with 35 additions and 21 deletions
|
@ -106,6 +106,7 @@ sub slice {
|
|||
# make layers taking custom heights into account
|
||||
my $print_z = my $slice_z = my $height = my $id = 0;
|
||||
my $first_object_layer_height = -1;
|
||||
my $first_object_layer_distance = -1;
|
||||
|
||||
# add raft layers
|
||||
if ($self->config->raft_layers > 0) {
|
||||
|
@ -123,7 +124,8 @@ sub slice {
|
|||
|
||||
# force first layer print_z according to the contact distance
|
||||
# (the loop below will raise print_z by such height)
|
||||
$first_object_layer_height = $distance;
|
||||
$first_object_layer_height = $nozzle_diameter;
|
||||
$first_object_layer_distance = $distance;
|
||||
}
|
||||
|
||||
# loop until we have at least one layer and the max slice_z reaches the object height
|
||||
|
@ -147,6 +149,7 @@ sub slice {
|
|||
|
||||
if ($first_object_layer_height != -1 && !@{$self->layers}) {
|
||||
$height = $first_object_layer_height;
|
||||
$print_z += ($first_object_layer_distance - $height);
|
||||
}
|
||||
|
||||
$print_z += $height;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue