Optimization of travel paths for fills

This commit is contained in:
Alessandro Ranellucci 2011-09-26 10:52:58 +02:00
parent 0cd10441a1
commit 415d1a5170
9 changed files with 230 additions and 136 deletions

View file

@ -48,14 +48,17 @@ sub make_perimeter {
}
# create one more offset to be used as boundary for fill
push @{ $layer->fill_surfaces },
map Slic3r::Surface->new(
surface_type => $surface->surface_type,
contour => Slic3r::Polyline::Closed->cast($_->{outer}),
holes => [
map Slic3r::Polyline::Closed->cast($_), @{$_->{holes}}
],
), $self->offset_polygon($perimeters[-1]),
push @{ $layer->fill_surfaces }, Slic3r::Surface::Collection->new(
surfaces => [
map Slic3r::Surface->new(
surface_type => $surface->surface_type,
contour => Slic3r::Polyline::Closed->cast($_->{outer}),
holes => [
map Slic3r::Polyline::Closed->cast($_), @{$_->{holes}}
],
), $self->offset_polygon($perimeters[-1]),
],
);
}
# generate paths for holes: