Closed deboc closed 6 years ago
Seems the issue is with points vg.Point(0.00, 150.00)
and vg.Point(0.00, 200.00)
. These two points are on the line segment from vg.Point(0.00, 0.00)
and vg.Point(0.00, 800.00)
, they are colinear. I'll need to do some debugging to see why your fix works.
I think I know what the problem is now, adding if co0 and co1: continue
wont be enough, I will do a write up of the bug in #20, as thats where the issue is.
@deboc, for d8a7fd3, do you have a example where you would end up with an out of bounds value? I would like to add a test case.
Yes sorry I didn't. I will try to find out one.
In short, I remember to have encountered a acos(1.00000000001)
numerical issue at some point.
I found some cases where polygon_crossing() misses to label some edges as not visible. The code bellow is an example of failure case before the fix.
I'm not totally sure, but my investigations lead me to conclude that this (co0 and co1) case in polygon_crossing() can solve that out.