Bugfix: holes were not sorted using the nearest-neighbor search, resulting in inefficient paths. #1785
This commit is contained in:
parent
d02b64b31b
commit
5d3c8575c5
@ -254,6 +254,10 @@ sub make_perimeters {
|
||||
$i--;
|
||||
}
|
||||
}
|
||||
|
||||
# order holes efficiently
|
||||
@holes = @holes[@{chained_path([ map {($_->{outer} // $_->{hole})->first_point} @holes ])}];
|
||||
|
||||
push @loops, reverse map $traverse->([$_], 0, 0), @holes;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user