khct / poly2tri

Automatically exported from code.google.com/p/poly2tri
Other
0 stars 0 forks source link

crash with attached polygon #97

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
triangulate the attached polygon will crash

vs2012 Windows 7 32 bit

Original issue reported on code.google.com by slug...@gmail.com on 22 May 2014 at 7:49

Attachments:

GoogleCodeExporter commented 8 years ago
The input data has to high precision. Round the data to 12 decimals

The thing is you have 3 points on a line with y coordinates. 
19, 19.000000000000004 and 19 

poly2tri will try to form a triangle and it will be degenerate. You will have 
to round your data within epsilon 1e-12 and also make sure that no two points 
get the same coordinate after the rounding.

Original comment by thahlen@gmail.com on 22 May 2014 at 8:49

GoogleCodeExporter commented 8 years ago
I suggest you paste your data and triangulate with this app. when you get 
errors. Might give you the reason of the triangulation failure.

http://r3mi.github.io/poly2tri.js/

Original comment by thahlen@gmail.com on 22 May 2014 at 8:53