Optimize honeycomb travels
This commit is contained in:
parent
a6dca1d82a
commit
f88f516c30
@ -83,13 +83,15 @@ sub fill_surface {
|
||||
$self->cache->{$cache_id} = [@polygons];
|
||||
}
|
||||
|
||||
my $loops = intersection_ex(
|
||||
my @paths = map Slic3r::Polyline->new(@$_, $_->[0]), map @$_, @{intersection_ex(
|
||||
$self->cache->{$cache_id},
|
||||
[ map @$_, $expolygon->offset_ex($overlap_distance) ],
|
||||
)};
|
||||
my $collection = Slic3r::ExtrusionPath::Collection->new(
|
||||
paths => [ map Slic3r::ExtrusionPath->new(polyline => $_, role => -1), @paths ],
|
||||
);
|
||||
my @paths = map [ @$_, $_->[0] ], map @$_, @$loops;
|
||||
|
||||
return {}, @paths;
|
||||
return {}, map $_->polyline, $collection->shortest_path;
|
||||
}
|
||||
|
||||
1;
|
||||
|
Loading…
Reference in New Issue
Block a user