mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-24 23:23:59 -06:00
Refactoring. Point objects are now plain arrayrefs. Slicing is 30% faster.
This commit is contained in:
parent
774717c8bb
commit
e410410dc7
10 changed files with 44 additions and 55 deletions
|
@ -13,7 +13,7 @@ sub cast {
|
|||
my ($line, %args) = @_;
|
||||
if (ref $line eq 'ARRAY') {
|
||||
@$line == 2 or die "Line needs two points!";
|
||||
return $class->new(points => [ map Slic3r::Point->cast($_), @$line ], %args);
|
||||
return $class->new(points => [ map Slic3r::Point->new($_), @$line ], %args);
|
||||
} else {
|
||||
return $line;
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ sub coordinates {
|
|||
|
||||
sub p {
|
||||
my $self = shift;
|
||||
return [ $self->a->p, $self->b->p ];
|
||||
return [ $self->a, $self->b ];
|
||||
}
|
||||
|
||||
sub coincides_with {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue