mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-14 13:02:39 -07:00
Organize perimeters with a nearest point search to avoid unnecessary travel moves. #21
This commit is contained in:
@@ -29,7 +29,9 @@ sub shortest_path {
|
||||
my $start_at;
|
||||
CYCLE: while (@{$self->paths}) {
|
||||
# find nearest point
|
||||
$start_at = Slic3r::Point->new(Slic3r::Geometry::nearest_point($start_near, [ $self->endpoints ]));
|
||||
$start_at = $start_near
|
||||
? Slic3r::Point->new(Slic3r::Geometry::nearest_point($start_near, [ $self->endpoints ]))
|
||||
: $self->endpoints->[0];
|
||||
|
||||
# loop through paths to find the one that starts or ends at the point found
|
||||
PATH: for (my $i = 0; $i <= $#{$self->paths}; $i++) {
|
||||
|
||||
Reference in New Issue
Block a user