Use Slic3r::Surface::Collection for Layer::Region->slices

This commit is contained in:
Alessandro Ranellucci 2013-07-14 15:03:45 +02:00
parent 5885be881c
commit 7534c1e6d9
4 changed files with 17 additions and 12 deletions

View file

@ -232,9 +232,12 @@ sub slice {
[ map $_->expolygon->holes, @upper_surfaces, @lower_surfaces, ],
);
@{$layerm->slices} = map Slic3r::Surface->new
(expolygon => $_, surface_type => S_TYPE_INTERNAL),
@$diff;
$layerm->slices->clear;
$layerm->slices->append(
map Slic3r::Surface->new
(expolygon => $_, surface_type => S_TYPE_INTERNAL),
@$diff
);
}
# update layer slices after repairing the single regions
@ -418,7 +421,8 @@ sub detect_surfaces_type {
);
# save surfaces to layer
@{$layerm->slices} = (@bottom, @top, @internal);
$layerm->slices->clear;
$layerm->slices->append(@bottom, @top, @internal);
Slic3r::debugf " layer %d has %d bottom, %d top and %d internal surfaces\n",
$layerm->id, scalar(@bottom), scalar(@top), scalar(@internal);