Support material

This commit is contained in:
Alessandro Ranellucci 2012-02-19 12:03:36 +01:00
parent e0e2023a5a
commit 7b67fae686
12 changed files with 135 additions and 17 deletions

View file

@ -17,7 +17,7 @@ has 'depth_layers' => (is => 'ro', default => sub {1});
has 'flow_spacing' => (is => 'rw');
# perimeter/fill/solid-fill/bridge/skirt
# perimeter/fill/solid-fill/bridge/skirt/support-material
has 'role' => (is => 'rw', required => 1);
sub BUILD {
@ -45,6 +45,22 @@ sub clip_end {
}
}
sub clip_with_expolygon {
my $self = shift;
my ($expolygon) = @_;
my @paths = ();
foreach my $polyline ($self->polyline->clip_with_expolygon($expolygon)) {
push @paths, (ref $self)->new(
polyline => $polyline,
depth_layers => $self->depth_layers,
flow_spacing => $self->flow_spacing,
role => $self->role,
);
}
return @paths;
}
sub points {
my $self = shift;
return $self->polyline;