Fixed regression in support material after recent flow refactoring. #1012

This commit is contained in:
Alessandro Ranellucci 2013-02-23 16:08:29 +01:00
parent 72df796185
commit 3eedd4bbed

View file

@ -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