From 896bf15ea28a705a33823a3c1fef7cae68441eb4 Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Sat, 21 Jun 2014 20:36:41 +0400 Subject: [PATCH] Include perimeters when propagating horizontal shells --- lib/Slic3r/Print/Object.pm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/Slic3r/Print/Object.pm b/lib/Slic3r/Print/Object.pm index b3365725..40a046fc 100644 --- a/lib/Slic3r/Print/Object.pm +++ b/lib/Slic3r/Print/Object.pm @@ -767,7 +767,7 @@ sub discover_horizontal_shells { ]; next if !@$solid; Slic3r::debugf "Layer %d has %s surfaces\n", $i, ($type == S_TYPE_TOP) ? 'top' : 'bottom'; - + my $solid_layers = ($type == S_TYPE_TOP) ? $layerm->config->top_solid_layers : $layerm->config->bottom_solid_layers; @@ -793,8 +793,8 @@ sub discover_horizontal_shells { # upper perimeter as an obstacle and shell will not be propagated to more upper layers my $new_internal_solid = $solid = intersection( $solid, - [ map $_->p, grep { ($_->surface_type == S_TYPE_INTERNAL) || ($_->surface_type == S_TYPE_INTERNALSOLID) } @neighbor_fill_surfaces ], - 1, + [ map $_->p, grep { ($_->surface_type == S_TYPE_INTERNAL) || ($_->surface_type == S_TYPE_INTERNALSOLID) } @{$neighbor_layerm->slices} ], + 0 ); next EXTERNAL if !@$new_internal_solid; @@ -844,6 +844,9 @@ sub discover_horizontal_shells { } } + # intersect with fill surfaces before assigning to object + $new_internal_solid = intersection($new_internal_solid, [ map { $_->p } @neighbor_fill_surfaces ]); + # internal-solid are the union of the existing internal-solid surfaces # and new ones my $internal_solid = union([