mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-12 20:29:04 +08:00
Use nearest-neighbor search for internal perimeters too. #1025
This commit is contained in:
parent
c3d90a1ff8
commit
919d1131f8
@ -173,7 +173,7 @@ sub make_perimeters {
|
|||||||
# )
|
# )
|
||||||
my @perimeters = (); # one item per depth; each item
|
my @perimeters = (); # one item per depth; each item
|
||||||
|
|
||||||
# organize islands using a shortest path search
|
# organize islands using a nearest-neighbor search
|
||||||
my @surfaces = @{chained_path_items([
|
my @surfaces = @{chained_path_items([
|
||||||
map [ $_->contour->[0], $_ ], @{$self->slices},
|
map [ $_->contour->[0], $_ ], @{$self->slices},
|
||||||
])};
|
])};
|
||||||
@ -245,6 +245,12 @@ sub make_perimeters {
|
|||||||
|
|
||||||
last if !@new_offsets || $loop == $loop_number;
|
last if !@new_offsets || $loop == $loop_number;
|
||||||
@last_offsets = @new_offsets;
|
@last_offsets = @new_offsets;
|
||||||
|
|
||||||
|
# sort loops before storing them
|
||||||
|
@last_offsets = @{chained_path_items([
|
||||||
|
map [ $_->contour->[0], $_ ], @last_offsets,
|
||||||
|
])};
|
||||||
|
|
||||||
push @{ $perimeters[-1] }, [@last_offsets];
|
push @{ $perimeters[-1] }, [@last_offsets];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user