mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-05 04:54:08 -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
|
@ -338,7 +338,6 @@ sub support_layers_z {
|
|||
# layer_height > nozzle_diameter * 0.75
|
||||
my $nozzle_diameter = $self->print_config->get_at('nozzle_diameter', $self->object_config->support_material_extruder-1);
|
||||
my $support_material_height = max($max_object_layer_height, $nozzle_diameter * 0.75);
|
||||
|
||||
my @z = sort { $a <=> $b } @$contact_z, @$top_z, (map $_ + $nozzle_diameter, @$top_z);
|
||||
|
||||
# enforce first layer height
|
||||
|
@ -352,7 +351,7 @@ sub support_layers_z {
|
|||
# $z[1] is last raft layer (contact layer for the first layer object)
|
||||
my $height = ($z[1] - $z[0]) / ($self->object_config->raft_layers - 1);
|
||||
splice @z, 1, 0,
|
||||
map { int($_*100)/100 }
|
||||
map { sprintf "%.2f", $_ }
|
||||
map { $z[0] + $height * $_ }
|
||||
0..($self->object_config->raft_layers - 1);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue