Optimization of travel paths for fills

This commit is contained in:
Alessandro Ranellucci committed 2011-09-26 10:52:58 +02:00
1 parent 0cd10441a1
commit 415d1a5170
9 files changed
+230 -136

No files matched your search

+12
View File
@@ -22,4 +22,16 @@ sub clip_end {
}
}
sub endpoints {
my $self = shift;
my ($as_arrayref) = @_;
my @points = ($self->points->[0], $self->points->[-1]);
return $as_arrayref ? map($_->p, @points) : @points;
}
sub reverse {
my $self = shift;
@{$self->points} = reverse @{$self->points};
}
1;