mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-14 13:02:39 -07:00
Ported Polygon->split_at()
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user