Remove all id() and ordered_id() methods
This commit is contained in:
parent
1d04e15b63
commit
144a704e3b
4 changed files with 3 additions and 28 deletions
|
@ -1,6 +1,8 @@
|
||||||
package Slic3r::ExtrusionLoop;
|
package Slic3r::ExtrusionLoop;
|
||||||
use Moo;
|
use Moo;
|
||||||
|
|
||||||
|
use Slic3r::Geometry qw(same_point);
|
||||||
|
|
||||||
# the underlying Slic3r::Polygon objects holds the geometry
|
# the underlying Slic3r::Polygon objects holds the geometry
|
||||||
has 'polygon' => (
|
has 'polygon' => (
|
||||||
is => 'rw',
|
is => 'rw',
|
||||||
|
@ -57,7 +59,7 @@ sub split_at {
|
||||||
# find index of point
|
# find index of point
|
||||||
my $i = -1;
|
my $i = -1;
|
||||||
for (my $n = 0; $n <= $#{$self->polygon}; $n++) {
|
for (my $n = 0; $n <= $#{$self->polygon}; $n++) {
|
||||||
if ($point->id eq $self->polygon->[$n]->id) {
|
if (same_point($point, $self->polygon->[$n])) {
|
||||||
$i = $n;
|
$i = $n;
|
||||||
last;
|
last;
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,16 +17,6 @@ sub new {
|
||||||
sub a { $_[0][0] }
|
sub a { $_[0][0] }
|
||||||
sub b { $_[0][1] }
|
sub b { $_[0][1] }
|
||||||
|
|
||||||
sub id {
|
|
||||||
my $self = shift;
|
|
||||||
return $self->a->id . "-" . $self->b->id;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub ordered_id {
|
|
||||||
my $self = shift;
|
|
||||||
return join('-', sort map $_->id, @$self);
|
|
||||||
}
|
|
||||||
|
|
||||||
sub coordinates {
|
sub coordinates {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
return ($self->a->coordinates, $self->b->coordinates);
|
return ($self->a->coordinates, $self->b->coordinates);
|
||||||
|
|
|
@ -45,11 +45,6 @@ sub is_serialized {
|
||||||
return (reftype $self) eq 'SCALAR' ? 1 : 0;
|
return (reftype $self) eq 'SCALAR' ? 1 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub id {
|
|
||||||
my $self = shift;
|
|
||||||
return join ' - ', sort map $_->id, @$self;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub lines {
|
sub lines {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
return polyline_lines($self);
|
return polyline_lines($self);
|
||||||
|
|
|
@ -73,18 +73,6 @@ sub offset {
|
||||||
} $self->expolygon->offset_ex(@_);
|
} $self->expolygon->offset_ex(@_);
|
||||||
}
|
}
|
||||||
|
|
||||||
sub add_hole {
|
|
||||||
my $self = shift;
|
|
||||||
my ($hole) = @_;
|
|
||||||
|
|
||||||
push @$self, $hole;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub id {
|
|
||||||
my $self = shift;
|
|
||||||
return $self->contour->id;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub clipper_polygon {
|
sub clipper_polygon {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue