Ported Polygon->split_at()

This commit is contained in:
Alessandro Ranellucci committed 2013-08-26 22:39:35 +02:00
1 parent f8ac3aa68f
commit 1f734807b9
7 files changed
+19 -20

No files matched your search

-17
View File
@@ -96,23 +96,6 @@ sub is_valid {
return @$self >= 3;
}
sub split_at {
my $self = shift;
my ($point) = @_;
# find index of point
my $i = -1;
for (my $n = 0; $n <= $#$self; $n++) {
if (Slic3r::Geometry::same_point($point, $self->[$n])) {
$i = $n;
last;
}
}
die "Point not found" if $i == -1;
return $self->split_at_index($i);
}
# for cw polygons this will return convex points!
sub concave_points {
my $self = shift;