laumaya / poly2tri

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

Python crashes when trying to create CDT object #55

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Python crashes when trying to create the CDT object. What am I doing wrong 
here? Here is my code:

-------------------------
from p2t import CDT, Point

contour = [(0, 0), (4, 0), (2, 4)]
pts = [Point(x, y) for x, y in contour]
cdt = CDT(pts)        #crashes here...
triangles = cdt.triangulate()
for t in triangles:
    print t.a.x, t.a.y, t.b.x, t.b.y, t.c.x, t.c.y

-------------------------

thanks,
Jake

Original issue reported on code.google.com by JakeSta...@gmail.com on 25 Jul 2012 at 3:41

GoogleCodeExporter commented 8 years ago
works on my end. I get this output:

2.0 4.0 0.0 0.0 4.0 0.0

Original comment by mason.gr...@gmail.com on 2 May 2013 at 1:36