2011-09-01 19:06:28 +00:00
|
|
|
package Slic3r::Line;
|
2011-10-12 14:27:40 +00:00
|
|
|
use strict;
|
|
|
|
use warnings;
|
2011-09-01 19:06:28 +00:00
|
|
|
|
2013-04-27 13:02:13 +00:00
|
|
|
# a line is a two-points line
|
|
|
|
use parent 'Slic3r::Polyline';
|
|
|
|
|
2011-11-11 21:01:27 +00:00
|
|
|
use Slic3r::Geometry qw(A B X Y);
|
2011-10-20 16:11:59 +00:00
|
|
|
|
|
|
|
sub atan {
|
|
|
|
my $self = shift;
|
|
|
|
return Slic3r::Geometry::line_atan($self);
|
|
|
|
}
|
|
|
|
|
2011-12-02 22:35:39 +00:00
|
|
|
sub direction {
|
|
|
|
my $self = shift;
|
|
|
|
return Slic3r::Geometry::line_direction($self);
|
|
|
|
}
|
|
|
|
|
2011-10-20 16:11:59 +00:00
|
|
|
sub intersection {
|
|
|
|
my $self = shift;
|
|
|
|
my ($line, $require_crossing) = @_;
|
|
|
|
return Slic3r::Geometry::line_intersection($self, $line, $require_crossing);
|
|
|
|
}
|
|
|
|
|
2013-08-08 00:10:34 +00:00
|
|
|
sub grow {
|
|
|
|
my $self = shift;
|
2013-11-20 10:35:58 +00:00
|
|
|
return Slic3r::Polyline->new(@$self)->grow(@_);
|
2013-08-08 00:10:34 +00:00
|
|
|
}
|
|
|
|
|
2011-09-01 19:06:28 +00:00
|
|
|
1;
|