From 3eedd4bbed12648562c8b87ca9f8d7caefa62fde Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Sat, 23 Feb 2013 16:08:29 +0100 Subject: [PATCH] Fixed regression in support material after recent flow refactoring. #1012 --- lib/Slic3r/Layer.pm | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/Slic3r/Layer.pm b/lib/Slic3r/Layer.pm index 9138aaf85..aa21c1977 100644 --- a/lib/Slic3r/Layer.pm +++ b/lib/Slic3r/Layer.pm @@ -62,12 +62,9 @@ sub support_material_contact_height { return $self->height if $self->id == 0; - # this is not very correct because: - # - we should sum our height with the actual upper layers height (which might be different) - # - we should use the actual flow of the upper layer bridges, not the default one - # ...but we're close enough for now + # TODO: check what upper region applies instead of considering the first one my $upper_layer = $self->object->layers->[ $self->id + 1 ] // $self; - return 2*$self->height - $upper_layer->infill_flow->bridge_width; + return 2*$self->height - $upper_layer->regions->[0]->infill_flow->bridge_width; } # Z used for printing support material contact in scaled coordinates