mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-15 18:58:00 -06:00
Removed dependency on Math::Clipper
This commit is contained in:
parent
b11b595c97
commit
fb763b0187
21 changed files with 82 additions and 76 deletions
|
@ -792,14 +792,13 @@ sub chained_path {
|
|||
my %indices = map { $points[$_] => $_ } 0 .. $#points;
|
||||
|
||||
my @result = ();
|
||||
my $last_point;
|
||||
if (!$start_near) {
|
||||
if (!$start_near && @points) {
|
||||
$start_near = shift @points;
|
||||
push @result, $indices{$start_near} if $start_near;
|
||||
push @result, $indices{$start_near};
|
||||
}
|
||||
while (@points) {
|
||||
$start_near = $start_near->nearest_point(\@points);
|
||||
@points = grep $_ ne $start_near, @points;
|
||||
my $idx = $start_near->nearest_point_index(\@points);
|
||||
my ($start_near) = splice @points, $idx, 1;
|
||||
push @result, $indices{$start_near};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue