New option to force a solid layer every given number of layers. #617

This commit is contained in:
Alessandro Ranellucci 2012-09-28 15:46:29 +02:00
parent f50b0040ef
commit ab7697ec1c
5 changed files with 21 additions and 2 deletions

View file

@ -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