mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 23:46:24 -06:00
New fill types (hilbertcurve, archimedeanchords, octagramspiral) and ability to use different patterns for solid layers. #20
This commit is contained in:
parent
041e9877a3
commit
038caddcda
22 changed files with 391 additions and 93 deletions
|
@ -8,18 +8,26 @@ sub new {
|
|||
my $class = shift;
|
||||
my $self;
|
||||
if (@_ == 2) {
|
||||
$self = [ map Slic3r::Point->new($_), @_ ];
|
||||
$self = [ @_ ];
|
||||
} elsif (ref $_[0] eq 'ARRAY') {
|
||||
$self = [ map Slic3r::Point->new($_), $_[0][0], $_[0][1] ];
|
||||
$self = [ $_[0][0], $_[0][1] ];
|
||||
} elsif ($_[0]->isa(__PACKAGE__)) {
|
||||
return $_[0];
|
||||
} else {
|
||||
die "Invalid argument for $class->new";
|
||||
}
|
||||
bless $self, $class;
|
||||
bless $_, 'Slic3r::Point' for @$self;
|
||||
return $self;
|
||||
}
|
||||
|
||||
sub cast {
|
||||
my $class = shift;
|
||||
my ($line) = @_;
|
||||
return $line if ref $line eq __PACKAGE__;
|
||||
return $class->new($line);
|
||||
}
|
||||
|
||||
sub a { $_[0][0] }
|
||||
sub b { $_[0][1] }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue