PrusaSlicer-NonPlainar/lib/Slic3r/ExtrusionPath.pm

39 lines
936 B
Perl
Raw Normal View History

package Slic3r::ExtrusionPath;
use strict;
use warnings;
use parent qw(Exporter);
our @EXPORT_OK = qw(EXTR_ROLE_PERIMETER EXTR_ROLE_EXTERNAL_PERIMETER
2013-05-14 18:19:42 +00:00
EXTR_ROLE_CONTOUR_INTERNAL_PERIMETER EXTR_ROLE_OVERHANG_PERIMETER
EXTR_ROLE_FILL EXTR_ROLE_SOLIDFILL EXTR_ROLE_TOPSOLIDFILL EXTR_ROLE_BRIDGE
EXTR_ROLE_INTERNALBRIDGE EXTR_ROLE_SKIRT EXTR_ROLE_SUPPORTMATERIAL EXTR_ROLE_GAPFILL);
our %EXPORT_TAGS = (roles => \@EXPORT_OK);
sub clip_with_polygon {
my $self = shift;
my ($polygon) = @_;
return $self->clip_with_expolygon(Slic3r::ExPolygon->new($polygon));
}
2012-02-19 11:03:36 +00:00
sub clip_with_expolygon {
my $self = shift;
my ($expolygon) = @_;
2013-06-20 18:11:46 +00:00
return map $self->clone(polyline => $_),
$self->polyline->clip_with_expolygon($expolygon);
2013-06-20 18:11:46 +00:00
}
sub simplify {
my $self = shift;
2013-07-16 15:13:01 +00:00
$self->polyline($self->polyline->simplify(@_));
}
sub points {
my $self = shift;
return $self->polyline;
}
1;