mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-20 11:53:48 +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--;
|
$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, reverse map $traverse->([$_], 0), @holes;
|
||||||
}
|
}
|
||||||
push @loops, $traverse->($polynode->{children}, $depth+1, $is_contour);
|
push @loops, $traverse->($polynode->{children}, $depth+1, $is_contour);
|
||||||
|
|||||||
Reference in New Issue
Block a user