Move bridge detection to its own method

This commit is contained in:
Alessandro Ranellucci 2013-04-18 18:43:46 +02:00
parent e088d9b3f7
commit 17f76c4951

View file

@ -517,7 +517,12 @@ sub process_external_surfaces {
}
# detect bridge direction (skip bottom layer)
if ($self->id > 0) {
$self->_detect_bridges if $self->id > 0;
}
sub _detect_bridges {
my $self = shift;
my @bottom = grep $_->surface_type == S_TYPE_BOTTOM, @{$self->fill_surfaces}; # surfaces
my @lower = @{$self->layer->object->layers->[ $self->id - 1 ]->slices}; # expolygons
@ -626,6 +631,5 @@ sub process_external_surfaces {
$surface->bridge_angle($bridge_angle);
}
}
}
1;