Remove $Slic3r::flow and $Slic3r::first_layer_flow

This commit is contained in:
Alessandro Ranellucci 2013-02-22 16:08:11 +01:00
parent b9c84490b8
commit 91bcfc8a74
5 changed files with 24 additions and 38 deletions

View file

@ -13,7 +13,6 @@ has 'slicing_errors' => (is => 'rw');
has 'slice_z' => (is => 'lazy');
has 'print_z' => (is => 'lazy');
has 'height' => (is => 'lazy');
has 'flow' => (is => 'lazy');
# collection of expolygons generated by slicing the original geometry;
# also known as 'islands' (all regions are merged here)
@ -57,8 +56,6 @@ sub _build_height {
return $self->id == 0 ? $Slic3r::Config->get_value('first_layer_height') : $Slic3r::Config->layer_height;
}
sub _build_flow { $Slic3r::flow }
# layer height of contact paths in unscaled coordinates
sub support_material_contact_height {
my $self = shift;
@ -69,7 +66,8 @@ sub support_material_contact_height {
# - 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
return 2*$self->height - $self->flow->nozzle_diameter;
my $upper_layer = $self->object->layers->[ $self->id + 1 ] // $self;
return 2*$self->height - $upper_layer->infill_flow->bridge_width;
}
# Z used for printing support material contact in scaled coordinates
@ -115,6 +113,7 @@ sub make_perimeters {
sub support_islands_enclose_line {
my $self = shift;
my ($line) = @_;
return 0 if !$self->support_islands; # why can we arrive here if there are no support islands?
return (first { $_->encloses_line($line) } @{$self->support_islands}) ? 1 : 0;
}