tt0yy/poly2tri

PointError: poly2tri EdgeEvent: Collinear not supported

Closed this issue · 4 comments

Attached is my points list, i have coded a way to divide out the holes, however 
there are a few drawing I have where the user who created them cant seem to 
join points together correctly causing me a headache (as if snapping a point is 
difficult???)

I used your http://javascript.poly2tri.googlecode.com/hg/index.html to 
successfully replicate the issue, and ive tried looking through similar issues 
people have been having with little success in solving my own problem

It seems that I have a point in the hole that is on the outer line of the main 
polygon? 

is there a recommended fix for this? I don't really understand the whole 
collinear issue (probably just been staring at the code too long)

im currently using the C++ version (used in with objective c++ project) but it 
seems the issue can be replicated in all versions of the code, as far as i 
could debug down it gets stuck on trying to call edgeevent and check the edge 
index in IsEdgeSideOfTriangle and not finding neighbors, or something like 
that, the code used is starting to just go over my head :D 

hope you can help explain what is happening and what my options are?
Kind Regards
Robert

Original issue reported on code.google.com by sarriss...@gmail.com on 25 Jul 2013 at 4:44

Attachments:

One point in that second hole look odd. 
25477.269531 4406.765625

that point is also shared with the outer polygon. Since is has a point with 
exactly the same coordinate. I don't know how you create the holes/polygons but 
it looks like some kind of bug that that point belongs to the hole.

This is not allowed with poly2tri. poly2tri only supports simple polygon with 
holes. When holes/polygon share same vertices you get a weakly simple polygon 
which isn't supported.

So somehow you need to fix so that odd vertex mentioned above aren't included 
in the hole.

Original comment by thahlen@gmail.com on 25 Jul 2013 at 9:00

ok, thanks for your time, i will have to come back to this but im thinking if 
the hole touches the outer polygon then split the polygon into two somehow with 
that hole and triangulate them separately, will let you know my solution when i 
figure it out :)

Original comment by sarriss...@gmail.com on 26 Jul 2013 at 8:15

Original comment by thahlen@gmail.com on 20 Sep 2013 at 6:16

  • Changed state: Invalid
For information, the above dataset gives "strange" results in the JavaScript 
version :
- it fails on Node.js 0.10.25 and Chrome 32 (V8 JavaScript engines) with 
"EdgeEvent: Collinear not supported!"
- it runs ok on Firefox 26 (SpiderMonkey JS engine), PhantomJS 1.9.7 and and 
Safari 7.0.1 (JavaScriptCore / Nitro engine)
Which is really weird, given that it is all "portable" JavaScript. This is the 
1st dataset I have seen that gives different results on the various JS engines.


Original comment by remi.tur...@gmail.com on 7 Feb 2014 at 1:31