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

@ -305,8 +305,12 @@ sub _simplify_slices {
my ($distance) = @_;
foreach my $layer (map @{$_->layers}, @{$self->objects}) {
@$_ = map $_->simplify($distance), @$_
for $layer->slices, (map $_->slices, @{$layer->regions});
$layer->slices([ map $_->simplify($distance), @{$layer->slices} ]);
foreach my $layerm (@{$layer->regions}) {
my @new = map $_->simplify($distance), @{$layerm->slices};
$layerm->slices->clear;
$layerm->slices->append(@new);
}
}
}