New raft_layers option. #123

This commit is contained in:
Alessandro Ranellucci 2013-01-28 14:12:01 +01:00
parent a016a06fa6
commit 177f1a9bf0
6 changed files with 28 additions and 7 deletions

View file

@ -173,9 +173,10 @@ sub slice {
}
# remove empty layers from bottom
while (@{$self->layers} && !@{$self->layers->[0]->slices} && !map @{$_->thin_walls}, @{$self->layers->[0]->regions}) {
shift @{$self->layers};
for (my $i = 0; $i <= $#{$self->layers}; $i++) {
my $first_object_layer_id = $Slic3r::Config->raft_layers;
while (@{$self->layers} && !@{$self->layers->[$first_object_layer_id]->slices} && !map @{$_->thin_walls}, @{$self->layers->[$first_object_layer_id]->regions}) {
splice @{$self->layers}, $first_object_layer_id, 1;
for (my $i = $first_object_layer_id; $i <= $#{$self->layers}; $i++) {
$self->layers->[$i]->id($i);
}
}