agusw1 / poly2tri

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

segmentation fault in python version #27

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

from p2t import CDT, Point
contour = [(19.218989151578803, 1.7763568394002505e-15), (19.218989151578803, 
6.0000000000000018), (4.7961634663806763e-14, 6.0000000000000018), 
(4.7961634663806763e-14, 1.7763568394002505e-15), (8.8594945757893644, 
2.2204460492503131e-15), (8.8594945757893644, 2.0000000000000018), 
(10.359494575789364, 2.0000000000000018), (10.359494575789364, 
2.2204460492503131e-15)]
contour_as_p2t_points = [Point(x, y) for x,y in contour]
cdt = CDT(contour_as_p2t_points)
cdt.triangulate()
#=>Segmentation fault

What is the expected output? What do you see instead?
Well, a correct triangulation...

What version of the product are you using? On what operating system?
Latest source for python poly2tri, on Ubuntu 11.04

Please provide any additional information below.

Original issue reported on code.google.com by danielde...@gmail.com on 26 Jul 2011 at 12:35

GoogleCodeExporter commented 8 years ago
confirmed. 

Original comment by lionel.b...@gmail.com on 4 Aug 2011 at 9:33

GoogleCodeExporter commented 8 years ago
that looks like a floating point problem. try rounding those small e-15 and 
e-14 numbers up... or to zero!

Original comment by mason.gr...@gmail.com on 4 Aug 2011 at 11:20

GoogleCodeExporter commented 8 years ago

Original comment by mason.gr...@gmail.com on 9 Aug 2011 at 2:29