mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-16 03:07:55 -06:00
Rectilinear fill
This commit is contained in:
parent
428006264d
commit
9e111d0a6d
11 changed files with 317 additions and 33 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue