mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-11-01 21:21:10 -06:00
Align infill across layers regardless of first-layer-specific extrusion width. Includes a good internal API refactoring and a fix to 3D honeycomb flow
This commit is contained in:
parent
93507bfd49
commit
64061267c8
8 changed files with 67 additions and 46 deletions
|
|
@ -18,11 +18,11 @@ sub fill_surface {
|
|||
my $rotate_vector = $self->infill_direction($surface);
|
||||
|
||||
# cache hexagons math
|
||||
my $cache_id = sprintf "d%s_s%s", $params{density}, $params{flow}->spacing;
|
||||
my $cache_id = sprintf "d%s_s%s", $params{density}, $self->spacing;
|
||||
my $m;
|
||||
if (!($m = $self->cache->{$cache_id})) {
|
||||
$m = $self->cache->{$cache_id} = {};
|
||||
my $min_spacing = $params{flow}->scaled_spacing;
|
||||
my $min_spacing = scale($self->spacing);
|
||||
$m->{distance} = $min_spacing / $params{density};
|
||||
$m->{hex_side} = $m->{distance} / (sqrt(3)/2);
|
||||
$m->{hex_width} = $m->{distance} * 2; # $m->{hex_width} == $m->{hex_side} * sqrt(3);
|
||||
|
|
@ -123,7 +123,7 @@ sub fill_surface {
|
|||
)};
|
||||
}
|
||||
|
||||
return { flow => $params{flow} }, @paths;
|
||||
return @paths;
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue