diff options
author | Alessandro Ranellucci <aar@cpan.org> | 2013-07-27 21:41:36 +0400 |
---|---|---|
committer | Alessandro Ranellucci <aar@cpan.org> | 2013-07-27 21:41:36 +0400 |
commit | 25af3eb35fdf4710be62c5e9e5b1ad9a4c2cfd38 (patch) | |
tree | 3dc2a7284a6fd5192c96f919d654c32116d60755 /lib | |
parent | 6bd480361278144c7aff28baa8ddf46721405932 (diff) |
Proper fix for preventing shells to propagate too much
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Slic3r/Print/Object.pm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/Slic3r/Print/Object.pm b/lib/Slic3r/Print/Object.pm index 6ab3b40de..9c639bce7 100644 --- a/lib/Slic3r/Print/Object.pm +++ b/lib/Slic3r/Print/Object.pm @@ -603,7 +603,14 @@ sub discover_horizontal_shells { # find intersection between neighbor and current layer's surfaces # intersections have contours and holes - my $new_internal_solid = intersection_ex( + # we update $solid so that we limit the next neighbor layer to the areas that were + # found on this one - in other words, solid shells on one layer (for a given external surface) + # are always a subset of the shells found on the previous shell layer + # this approach allows for DWIM in hollow sloping vases, where we want bottom + # shells to be generated in the base but not in the walls (where there are many + # narrow bottom surfaces): reassigning $solid will consider the 'shadow' of the + # upper perimeter as an obstacle and shell will not be propagated to more upper layers + my $new_internal_solid = $solid = intersection_ex( [ map @$_, @$solid ], [ map $_->p, grep { $_->surface_type == S_TYPE_INTERNAL || $_->surface_type == S_TYPE_INTERNALSOLID } @neighbor_fill_surfaces ], undef, 1, |