mirror of
https://git.mirrors.martin98.com/https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-14 08:45:53 +08:00
Merge branch '834-every-n-fill-frags' #834
This commit is contained in:
commit
241dff00e2
@ -445,8 +445,8 @@ sub combine_infill {
|
|||||||
my $area_threshold = $Slic3r::flow->scaled_spacing ** 2;
|
my $area_threshold = $Slic3r::flow->scaled_spacing ** 2;
|
||||||
|
|
||||||
for my $region_id (0 .. ($self->print->regions_count-1)) {
|
for my $region_id (0 .. ($self->print->regions_count-1)) {
|
||||||
# start from bottom, skip first layer
|
# start from top, skip lowest layer
|
||||||
for (my $i = 1; $i < $self->layer_count; $i++) {
|
for (my $i = $self->layer_count - 1; $i > 0; $i--) {
|
||||||
my $layerm = $self->layers->[$i]->regions->[$region_id];
|
my $layerm = $self->layers->[$i]->regions->[$region_id];
|
||||||
|
|
||||||
# skip layer if no internal fill surfaces
|
# skip layer if no internal fill surfaces
|
||||||
@ -506,6 +506,13 @@ sub combine_infill {
|
|||||||
{
|
{
|
||||||
my @new_surfaces = ();
|
my @new_surfaces = ();
|
||||||
push @new_surfaces, grep $_->surface_type != S_TYPE_INTERNAL, @{$lower_layerm->fill_surfaces};
|
push @new_surfaces, grep $_->surface_type != S_TYPE_INTERNAL, @{$lower_layerm->fill_surfaces};
|
||||||
|
|
||||||
|
# offset for the two different flow spacings
|
||||||
|
$intersection = [ map $_->offset_ex(
|
||||||
|
$lower_layerm->infill_flow->scaled_spacing / 2
|
||||||
|
+ $layerm->infill_flow->scaled_spacing / 2
|
||||||
|
), @$intersection];
|
||||||
|
|
||||||
foreach my $depth (1..$Slic3r::Config->infill_every_layers) {
|
foreach my $depth (1..$Slic3r::Config->infill_every_layers) {
|
||||||
push @new_surfaces, map Slic3r::Surface->new
|
push @new_surfaces, map Slic3r::Surface->new
|
||||||
(expolygon => $_, surface_type => S_TYPE_INTERNAL, depth_layers => $depth),
|
(expolygon => $_, surface_type => S_TYPE_INTERNAL, depth_layers => $depth),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user