Remove empty layers from bottom. They could be caused by little contact with the print bed, resulting in the need of thin walls. While thin walls will be supported one day, it's still not optimal to have so little contact on bottom layer(s), so we remove such layers. #96
This commit is contained in:
parent
99c1facec6
commit
1f64a01ed4
@ -8,7 +8,7 @@ use XXX;
|
||||
|
||||
# a sequential number of layer, starting at 0
|
||||
has 'id' => (
|
||||
is => 'ro',
|
||||
is => 'rw',
|
||||
#isa => 'Int',
|
||||
required => 1,
|
||||
);
|
||||
|
@ -135,6 +135,14 @@ sub new_from_mesh {
|
||||
@$diff;
|
||||
}
|
||||
|
||||
# remove empty layers from bottom
|
||||
while (!@{$print->layers->[0]->slices}) {
|
||||
shift @{$print->layers};
|
||||
for (my $i = 0; $i <= $#{$print->layers}; $i++) {
|
||||
$print->layers->[$i]->id($i);
|
||||
}
|
||||
}
|
||||
|
||||
return $print;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user