Modify overhang detection algorithm

This commit is contained in:
Alessandro Ranellucci 2013-06-16 18:08:17 +02:00
parent 45611d6742
commit c6ef81fb91

View file

@ -267,8 +267,9 @@ sub make_perimeters {
}
if ($self->id > 0) {
# A perimeter is considered overhang if its centerline exceeds the lower layer slices
my $is_overhang = $is_contour
? @{diff([$polygon], [ @lower_slices, offset([$polygon], -$self->perimeter_flow->scaled_width) ])}
? @{diff([$polygon], \@lower_slices)}
: !@{intersection([$polygon], \@lower_slices)};
$role = EXTR_ROLE_OVERHANG_PERIMETER if $is_overhang;