jkmigy / poly2tri

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

poly2tri crashes on a very simple geometry #96

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
For some reason poly2tri creates a segmentation fault when I ask it to create 
the triangulation of a very simple geometry. I've attached a .cpp file to 
reproduce the error and a .svg file which shows the geometry.

The file was compiled with Clang 3.4 using std=c++11 on linux. Hope I have not 
forgotten something important.

Raffael

Original issue reported on code.google.com by raff...@casagrande.ch on 19 May 2014 at 12:00

Attachments:

GoogleCodeExporter commented 8 years ago
Using http://r3mi.github.io/poly2tri.js/ i added the geometry.svg
<path d="M 0,0 L 0,400 L 108,399 L 199,319 L 360,400 L 400,400 z "/> as contour 
and triangulated without problems.

for optimal stability you should center your data around 0 and scale it in the 
range -1,1 and round it to 12 decimals.

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