diff options
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; |