mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 09:17:52 -06:00
Apply a true double-ended nearest-neightbor search to thin fills in order to minimize travel moves between them. #2213
This commit is contained in:
parent
79ac29b435
commit
795c85d30e
2 changed files with 24 additions and 27 deletions
|
@ -179,7 +179,6 @@ sub make_fill {
|
|||
}
|
||||
|
||||
my @fills = ();
|
||||
my @fills_ordering_points = ();
|
||||
SURFACE: foreach my $surface (@surfaces) {
|
||||
next if $surface->surface_type == S_TYPE_INTERNALVOID;
|
||||
my $filler = $layerm->config->fill_pattern;
|
||||
|
@ -244,19 +243,13 @@ sub make_fill {
|
|||
), @polylines,
|
||||
);
|
||||
}
|
||||
|
||||
push @fills_ordering_points, $polylines[0]->first_point;
|
||||
}
|
||||
|
||||
# add thin fill regions
|
||||
foreach my $thin_fill (@{$layerm->thin_fills}) {
|
||||
push @fills, Slic3r::ExtrusionPath::Collection->new($thin_fill);
|
||||
push @fills_ordering_points, $thin_fill->first_point;
|
||||
}
|
||||
|
||||
# organize infill paths using a nearest-neighbor search
|
||||
@fills = @fills[ @{chained_path(\@fills_ordering_points)} ];
|
||||
|
||||
return @fills;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue