PrusaSlicer-NonPlainar/lib/Slic3r/Line.pm
2013-11-22 21:43:35 +01:00

32 lines
578 B
Perl

package Slic3r::Line;
use strict;
use warnings;
# a line is a two-points line
use parent 'Slic3r::Polyline';
use Slic3r::Geometry qw(A B X Y);
sub atan {
my $self = shift;
return Slic3r::Geometry::line_atan($self);
}
sub direction {
my $self = shift;
return Slic3r::Geometry::line_direction($self);
}
sub intersection {
my $self = shift;
my ($line, $require_crossing) = @_;
return Slic3r::Geometry::line_intersection($self, $line, $require_crossing);
}
sub grow {
my $self = shift;
return Slic3r::Polyline->new(@$self)->grow(@_);
}
1;