mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-20 20:03:47 +00:00
Use nearest-neighbor search for internal perimeters too. #1025
This commit is contained in:
@@ -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];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user