Bugfix: wrong handling of large number of raft layers. #2041
This commit is contained in:
parent
a62457d6b5
commit
4e5f7d74ff
2 changed files with 7 additions and 8 deletions
|
@ -308,11 +308,10 @@ sub slice {
|
|||
}
|
||||
|
||||
# remove empty layers from bottom
|
||||
my $first_object_layer_id = $self->config->raft_layers;
|
||||
while (@{$self->layers} && !@{$self->layers->[$first_object_layer_id]->slices}) {
|
||||
splice @{$self->layers}, $first_object_layer_id, 1;
|
||||
for (my $i = $first_object_layer_id; $i <= $#{$self->layers}; $i++) {
|
||||
$self->layers->[$i]->id($i);
|
||||
while (@{$self->layers} && !@{$self->layers->[0]->slices}) {
|
||||
shift @{$self->layers};
|
||||
for (my $i = 0; $i <= $#{$self->layers}; $i++) {
|
||||
$self->layers->[$i]->id( $self->layers->[$i]->id-1 );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use Test::More tests => 15;
|
||||
use Test::More tests => 16;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
|
@ -130,10 +130,10 @@ use Slic3r::Test;
|
|||
'first object layer is completely supported by raft';
|
||||
}
|
||||
|
||||
{
|
||||
foreach my $raft_layers (2, 70) {
|
||||
my $config = Slic3r::Config->new_from_defaults;
|
||||
$config->set('skirts', 0);
|
||||
$config->set('raft_layers', 2);
|
||||
$config->set('raft_layers', $raft_layers);
|
||||
$config->set('layer_height', 0.35);
|
||||
$config->set('first_layer_height', 0.3);
|
||||
$config->set('nozzle_diameter', [0.5]);
|
||||
|
|
Loading…
Reference in a new issue