New option to force a solid layer every given number of layers. #617
This commit is contained in:
parent
f50b0040ef
commit
ab7697ec1c
@ -153,7 +153,9 @@ The author of the Silk icon set is Mark James.
|
||||
--first-layer-height Layer height for first layer (mm or %, default: 100%)
|
||||
--infill-every-layers
|
||||
Infill every N layers (default: 1)
|
||||
|
||||
--solid-infill-every-layers
|
||||
Force a solid layer every N layers (default: 0)
|
||||
|
||||
Print options:
|
||||
--perimeters Number of perimeters/horizontal skins (range: 0+, default: 3)
|
||||
--solid-layers Number of solid layers to do for top/bottom surfaces
|
||||
|
@ -353,6 +353,15 @@ our $Options = {
|
||||
min => 1,
|
||||
default => 1,
|
||||
},
|
||||
'solid_infill_every_layers' => {
|
||||
label => 'Solid infill every',
|
||||
tooltip => 'This feature allows to force a solid layer every given number of layers. Zero to disable.',
|
||||
sidetext => 'layers',
|
||||
cli => 'solid-infill-every-layers=i',
|
||||
type => 'i',
|
||||
min => 0,
|
||||
default => 0,
|
||||
},
|
||||
|
||||
# flow options
|
||||
'extrusion_width' => {
|
||||
|
@ -401,7 +401,7 @@ sub build {
|
||||
},
|
||||
{
|
||||
title => 'Advanced',
|
||||
options => [qw(infill_every_layers fill_angle solid_infill_below_area only_retract_when_crossing_perimeters)],
|
||||
options => [qw(infill_every_layers solid_infill_every_layers fill_angle solid_infill_below_area only_retract_when_crossing_perimeters)],
|
||||
},
|
||||
]);
|
||||
|
||||
|
@ -329,6 +329,12 @@ sub discover_horizontal_shells {
|
||||
for my $region_id (0 .. ($self->print->regions_count-1)) {
|
||||
for (my $i = 0; $i < $self->layer_count; $i++) {
|
||||
my $layerm = $self->layers->[$i]->regions->[$region_id];
|
||||
|
||||
if ($Slic3r::Config->solid_infill_every_layers && ($i % $Slic3r::Config->solid_infill_every_layers) == 0) {
|
||||
$_->surface_type(S_TYPE_INTERNALSOLID)
|
||||
for grep $_->surface_type == S_TYPE_INTERNAL, @{$layerm->fill_surfaces};
|
||||
}
|
||||
|
||||
foreach my $type (S_TYPE_TOP, S_TYPE_BOTTOM) {
|
||||
# find surfaces of current type for current layer
|
||||
# and offset them to take perimeters into account
|
||||
|
@ -201,6 +201,8 @@ $j
|
||||
--first-layer-height Layer height for first layer (mm or %, default: $config->{first_layer_height})
|
||||
--infill-every-layers
|
||||
Infill every N layers (default: $config->{infill_every_layers})
|
||||
--solid-infill-every-layers
|
||||
Force a solid layer every N layers (default: $config->{solid_infill_every_layers})
|
||||
|
||||
Print options:
|
||||
--perimeters Number of perimeters/horizontal skins (range: 0+, default: $config->{perimeters})
|
||||
|
Loading…
Reference in New Issue
Block a user