mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-12 16:39:02 +08:00
Bugfix: holes were not sorted using the nearest-neighbor search, resulting in inefficient paths. #1785
This commit is contained in:
parent
280a1a369e
commit
96ad37f6e0
@ -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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user