mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-14 19:12:38 -07:00
Adopt XS containers everywhere (incomplete work)
This commit is contained in:
@@ -2,51 +2,17 @@ package Slic3r::ExtrusionLoop;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use Slic3r::Geometry qw(same_point);
|
||||
|
||||
sub polygon { $_[0] }
|
||||
|
||||
# class or object method
|
||||
sub pack {
|
||||
my $self = shift;
|
||||
|
||||
if (ref $self) {
|
||||
return $self;
|
||||
} else {
|
||||
return $self->new(@_);
|
||||
}
|
||||
}
|
||||
|
||||
# no-op
|
||||
sub unpack { $_[0] }
|
||||
|
||||
sub split_at_index {
|
||||
my $self = shift;
|
||||
|
||||
return Slic3r::ExtrusionPath->new(
|
||||
polyline => $self->as_polygon->split_at_index(@_),
|
||||
role => $self->role,
|
||||
flow_spacing => $self->flow_spacing,
|
||||
height => $self->height,
|
||||
);
|
||||
}
|
||||
|
||||
sub split_at {
|
||||
my $self = shift;
|
||||
|
||||
return Slic3r::ExtrusionPath->new(
|
||||
polyline => $self->as_polygon->split_at(@_),
|
||||
polyline => $self->polygon->split_at(@_),
|
||||
role => $self->role,
|
||||
flow_spacing => $self->flow_spacing,
|
||||
height => $self->height,
|
||||
);
|
||||
}
|
||||
|
||||
sub split_at_first_point {
|
||||
my $self = shift;
|
||||
return $self->split_at_index(0);
|
||||
}
|
||||
|
||||
sub first_point {
|
||||
my $self = shift;
|
||||
return $self->polygon->[0];
|
||||
|
||||
Reference in New Issue
Block a user