diff options
author | Alessandro Ranellucci <aar@cpan.org> | 2011-09-05 14:21:27 +0400 |
---|---|---|
committer | Alessandro Ranellucci <aar@cpan.org> | 2011-09-05 14:21:27 +0400 |
commit | 9e111d0a6dab9e445e916e7f7e6c10d39d6c6bb6 (patch) | |
tree | 0b0da3a84811ac77b2a4426e65772a79521af268 /lib/Slic3r/Surface.pm | |
parent | 428006264dadc49243332537087533bcf73ad1e2 (diff) |
Rectilinear fill
Diffstat (limited to 'lib/Slic3r/Surface.pm')
-rw-r--r-- | lib/Slic3r/Surface.pm | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/Slic3r/Surface.pm b/lib/Slic3r/Surface.pm index 5333a7eb6..60b81eb1d 100644 --- a/lib/Slic3r/Surface.pm +++ b/lib/Slic3r/Surface.pm @@ -20,6 +20,8 @@ has 'holes' => ( }, ); +# TODO: to allow for multiple solid skins to be filled near external +# surfaces, a new type should be defined: internal-solid has 'surface_type' => ( is => 'rw', isa => enum([qw(internal bottom top)]), @@ -44,7 +46,7 @@ sub BUILD { sub new_from_mgp { my $self = shift; - my ($polygon) = @_; + my ($polygon, %params) = @_; my ($contour_p, @holes_p) = @{ $polygon->polygons }; @@ -53,6 +55,7 @@ sub new_from_mgp { holes => [ map Slic3r::Polyline::Closed->new_from_points(@$_), @holes_p ], + %params, ); } @@ -78,4 +81,9 @@ sub mgp_polygon { return $p; } +sub lines { + my $self = shift; + return @{ $self->contour->lines }, map @{ $_->lines }, @{ $self->holes }; +} + 1; |