mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-14 19:12:38 -07:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user