Bugfixes and improvements in surface detection

This commit is contained in:
Alessandro Ranellucci 2011-10-04 22:27:45 +02:00
parent f1a36502e1
commit 2da5ee7448
13 changed files with 202 additions and 67 deletions

View file

@ -113,12 +113,11 @@ sub offset_polygon {
}
}
# apply all holes to all contours;
# this is improper, but Math::Clipper handles it
return map {{
outer => $_,
holes => [ @hole_offsets ],
}} @contour_offsets;
# apply holes to the right contours
my $clipper = Math::Clipper->new;
$clipper->add_subject_polygons($offsets);
my $results = $clipper->ex_execute(CT_UNION, PFT_NONZERO, PFT_NONZERO);
return @$results;
}
sub _mgp_from_points_ref {