PrusaSlicer-NonPlainar/lib/Slic3r/ExtrusionLoop.pm

31 lines
579 B
Perl
Raw Normal View History

package Slic3r::ExtrusionLoop;
2013-07-15 14:21:09 +00:00
use strict;
use warnings;
sub split_at {
my $self = shift;
return Slic3r::ExtrusionPath->new(
polyline => $self->polygon->split_at(@_),
role => $self->role,
flow_spacing => $self->flow_spacing,
2013-07-15 14:21:09 +00:00
height => $self->height,
);
}
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;
}
1;