Remove unused methods

This commit is contained in:
Alessandro Ranellucci 2012-10-30 15:49:11 +01:00
parent 44d91774a6
commit 92ab53868e
4 changed files with 1 additions and 59 deletions

View file

@ -178,7 +178,7 @@ sub extrude_path {
foreach my $line ($path->lines) { foreach my $line ($path->lines) {
my $line_length = $line->length; my $line_length = $line->length;
$path_length += $line_length; $path_length += $line_length;
$gcode .= $self->G1($line->b, undef, $e * unscale $line_length, $description); $gcode .= $self->G1($line->[B], undef, $e * unscale $line_length, $description);
} }
} }

View file

@ -14,14 +14,6 @@ sub new {
return $self; return $self;
} }
sub a { $_[0][0] }
sub b { $_[0][1] }
sub coordinates {
my $self = shift;
return ($self->a->coordinates, $self->b->coordinates);
}
sub boost_linestring { sub boost_linestring {
my $self = shift; my $self = shift;
return Boost::Geometry::Utils::linestring($self); return Boost::Geometry::Utils::linestring($self);
@ -35,27 +27,6 @@ sub coincides_with {
|| ($self->a->coincides_with($line->b) && $self->b->coincides_with($line->a)); || ($self->a->coincides_with($line->b) && $self->b->coincides_with($line->a));
} }
sub has_endpoint {
my $self = shift;
my ($point) = @_;
return $point->coincides_with($self->a) || $point->coincides_with($self->b);
}
sub has_segment {
my $self = shift;
my ($line) = @_;
# a segment belongs to another segment if its points belong to it
return Slic3r::Geometry::point_in_segment($line->[0], $self)
&& Slic3r::Geometry::point_in_segment($line->[1], $self);
}
sub parallel_to {
my $self = shift;
my ($line) = @_;
return Slic3r::Geometry::lines_parallel($self, $line);
}
sub length { sub length {
my $self = shift; my $self = shift;
return Slic3r::Geometry::line_length($self); return Slic3r::Geometry::line_length($self);

View file

@ -23,20 +23,6 @@ sub clone {
return (ref $self)->new(@$self); return (ref $self)->new(@$self);
} }
sub cast {
my $class = shift;
if (ref $_[0] eq 'Slic3r::Point') {
return $_[0];
} else {
return $class->new(@_);
}
}
sub coordinates {
my $self = shift;
return @$self;
}
sub coincides_with { sub coincides_with {
my $self = shift; my $self = shift;
my ($point) = @_; my ($point) = @_;

View file

@ -40,11 +40,6 @@ sub deserialize {
return $class->new(map [ $v[2*$_], $v[2*$_+1] ], 0 .. int($#v/2)); return $class->new(map [ $v[2*$_], $v[2*$_+1] ], 0 .. int($#v/2));
} }
sub is_serialized {
my $self = shift;
return (reftype $self) eq 'SCALAR' ? 1 : 0;
}
sub lines { sub lines {
my $self = shift; my $self = shift;
return polyline_lines($self); return polyline_lines($self);
@ -105,16 +100,6 @@ sub nearest_point_index_to {
return Slic3r::Geometry::nearest_point_index($point, $self); return Slic3r::Geometry::nearest_point_index($point, $self);
} }
sub has_segment {
my $self = shift;
my ($line) = @_;
for ($self->lines) {
return 1 if $_->has_segment($line);
}
return 0;
}
sub clip_with_polygon { sub clip_with_polygon {
my $self = shift; my $self = shift;
my ($polygon) = @_; my ($polygon) = @_;