From 54e1d934a75601dda33e37a618e9322efa351597 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Mon, 30 Apr 2012 23:36:49 +0200 Subject: [PATCH] Fixed regression with support material --- lib/Slic3r/Print.pm | 2 +- lib/Slic3r/Print/Object.pm | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Slic3r/Print.pm b/lib/Slic3r/Print.pm index b6970d973..d9adc6839 100644 --- a/lib/Slic3r/Print.pm +++ b/lib/Slic3r/Print.pm @@ -237,7 +237,7 @@ sub export_gcode { # generate support material if ($Slic3r::support_material) { $status_cb->(85, "Generating support material"); - $_->generate_support_material for @{$self->objects}; + $_->generate_support_material(print => $self) for @{$self->objects}; } # free memory (note that support material needs fill_surfaces) diff --git a/lib/Slic3r/Print/Object.pm b/lib/Slic3r/Print/Object.pm index 2784acc8f..ceae8455f 100644 --- a/lib/Slic3r/Print/Object.pm +++ b/lib/Slic3r/Print/Object.pm @@ -398,6 +398,7 @@ sub infill_every_layers { sub generate_support_material { my $self = shift; + my %params = @_; # determine unsupported surfaces my %layers = (); @@ -441,7 +442,7 @@ sub generate_support_material { my @support_material_areas = map $_->offset_ex(scale 5), @{union_ex([ map @$_, @unsupported_expolygons ])}; - my $fill = Slic3r::Fill->new(print => $self); + my $fill = Slic3r::Fill->new(print => $params{print}); foreach my $angle (0, 90) { my @patterns = (); foreach my $expolygon (@support_material_areas) {