Bugfix: recent changes broke the "infill every layers" option which didn't alternate infill direction correctly. #70

This commit is contained in:
Alessandro Ranellucci 2011-11-26 15:21:15 +01:00
parent afd8e0a1bd
commit 951778439a
2 changed files with 4 additions and 2 deletions

View file

@ -66,6 +66,7 @@ sub make_fill {
push @surfaces, map Slic3r::Surface->cast_from_expolygon($_, push @surfaces, map Slic3r::Surface->cast_from_expolygon($_,
surface_type => $group->[0]->surface_type, surface_type => $group->[0]->surface_type,
bridge_angle => $group->[0]->bridge_angle, bridge_angle => $group->[0]->bridge_angle,
depth_layers => $group->[0]->depth_layers,
), @$union; ), @$union;
} }
} }

View file

@ -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 { sub group {
my $class = shift; my $class = shift;
my $params = ref $_[0] eq 'HASH' ? shift(@_) : {}; my $params = ref $_[0] eq 'HASH' ? shift(@_) : {};
@ -57,7 +57,8 @@ sub group {
my $unique_type = sub { my $unique_type = sub {
($params->{merge_solid} && $_[0]->surface_type =~ /top|bottom|solid/ ($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 = (); my @unique_types = ();
foreach my $surface (@surfaces) { foreach my $surface (@surfaces) {