diff --git a/lib/Slic3r/Fill.pm b/lib/Slic3r/Fill.pm index fb3094e19..f59acc80c 100644 --- a/lib/Slic3r/Fill.pm +++ b/lib/Slic3r/Fill.pm @@ -66,6 +66,7 @@ sub make_fill { push @surfaces, map Slic3r::Surface->cast_from_expolygon($_, surface_type => $group->[0]->surface_type, bridge_angle => $group->[0]->bridge_angle, + depth_layers => $group->[0]->depth_layers, ), @$union; } } diff --git a/lib/Slic3r/Surface.pm b/lib/Slic3r/Surface.pm index 811945371..ef5d5c333 100644 --- a/lib/Slic3r/Surface.pm +++ b/lib/Slic3r/Surface.pm @@ -49,7 +49,7 @@ sub cast_from_expolygon { ); } -# static method to group surfaces having same surface_type and bridge_angle +# static method to group surfaces having same surface_type, bridge_angle and depth_layers sub group { my $class = shift; my $params = ref $_[0] eq 'HASH' ? shift(@_) : {}; @@ -57,7 +57,8 @@ sub group { my $unique_type = sub { ($params->{merge_solid} && $_[0]->surface_type =~ /top|bottom|solid/ - ? 'solid' : $_[0]->surface_type) . "_" . ($_[0]->bridge_angle || ''); + ? 'solid' : $_[0]->surface_type) . "_" . ($_[0]->bridge_angle || '') + . "_" . $_[0]->depth_layers; }; my @unique_types = (); foreach my $surface (@surfaces) {