After I clip a polygon against the more important stuff, I
check the area and minimum interior angle of each of it's contours.
If both (area and min interior angle) are below some threshhold I'm
calling it a sliver. Then I go and look for another polygon such that
result = polygon_union( poly, sliver ) yields a result that doesn't
have anymore contours than the original poly. This means the sliver
is adjacent to poly. So I replace poly with result (the union) and
keep going.
indices to points.
Then with that in place I added wrapper functions for the libgpc calls so
I could ensure that I was always deallocating any allocated memory (which
was a concern before.)
This was all done in order to facilitate sliver detection and elimination
which is my next order of business.
These changes then were propogated through out the construction tools.
the region point to be calculated outside the region which caused things to
be colored improperly. Fixed by only evaluating the points of the current
contour (rather than the whole polygon) when generating the region points.