mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-24 23:23:59 -06:00
Fixed regression causing inefficient paths during infill
This commit is contained in:
parent
dcc0ce78db
commit
bf603b0221
3 changed files with 50 additions and 5 deletions
|
@ -12,11 +12,15 @@ sub shortest_path {
|
|||
my $self = shift;
|
||||
my ($start_near) = @_;
|
||||
|
||||
# make sure we pass the same path objects to the Collection constructor
|
||||
# and the ->shortest_path() method because the latter will reverse the
|
||||
# paths in-place when needed and we need to return them that way
|
||||
my @paths = map $_->unpack, @{$self->paths};
|
||||
my $collection = Slic3r::Polyline::Collection->new(
|
||||
polylines => [ map $_->unpack->polyline, @{$self->paths} ],
|
||||
polylines => [ map $_->polyline, @paths ],
|
||||
);
|
||||
|
||||
return $collection->shortest_path($start_near, $self->paths);
|
||||
return $collection->shortest_path($start_near, \@paths);
|
||||
}
|
||||
|
||||
sub cleanup {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue