2011-09-25 21:15:45 +00:00
|
|
|
package Slic3r::ExtrusionLoop;
|
2013-07-15 14:21:09 +00:00
|
|
|
use strict;
|
|
|
|
use warnings;
|
2011-09-25 21:15:45 +00:00
|
|
|
|
|
|
|
sub split_at {
|
|
|
|
my $self = shift;
|
|
|
|
|
2012-10-30 14:29:13 +00:00
|
|
|
return Slic3r::ExtrusionPath->new(
|
2013-07-16 07:49:34 +00:00
|
|
|
polyline => $self->polygon->split_at(@_),
|
2012-10-30 14:29:13 +00:00
|
|
|
role => $self->role,
|
|
|
|
flow_spacing => $self->flow_spacing,
|
2013-07-15 14:21:09 +00:00
|
|
|
height => $self->height,
|
2012-10-30 14:29:13 +00:00
|
|
|
);
|
2011-09-25 21:15:45 +00:00
|
|
|
}
|
|
|
|
|
2013-03-10 15:09:03 +00:00
|
|
|
sub first_point {
|
|
|
|
my $self = shift;
|
|
|
|
return $self->polygon->[0];
|
|
|
|
}
|
|
|
|
|
2013-07-16 15:13:01 +00:00
|
|
|
sub make_counter_clockwise {
|
|
|
|
my $self = shift;
|
|
|
|
if (!$self->polygon->is_counter_clockwise) {
|
|
|
|
$self->reverse;
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2011-09-25 21:15:45 +00:00
|
|
|
1;
|