mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
Bugfix: holes were not sorted using the nearest-neighbor search, resulting in inefficient paths. #1785
This commit is contained in:
@@ -261,6 +261,12 @@ sub make_perimeters {
|
||||
$i--;
|
||||
}
|
||||
}
|
||||
|
||||
# order holes efficiently
|
||||
@holes = @{Slic3r::Geometry::chained_path_items(
|
||||
[ map [ ($_->{outer} // $_->{hole})->first_point, $_ ], @holes ],
|
||||
)};
|
||||
|
||||
push @loops, reverse map $traverse->([$_], 0), @holes;
|
||||
}
|
||||
push @loops, $traverse->($polynode->{children}, $depth+1, $is_contour);
|
||||
|
||||
Reference in New Issue
Block a user