Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python crashes when create CDT object #85

Open
GoogleCodeExporter opened this issue Mar 16, 2015 · 1 comment
Open

Python crashes when create CDT object #85

GoogleCodeExporter opened this issue Mar 16, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

Under windows XP/7 with python 2.7
Build poly2tri by MSVC 2008/2010
When I run 
python test.py data/dude.dat 100 -200 1
    ##
    ## Step 1: Initialize
    ## NOTE: polyline must be a simple polygon. The polyline's points
    ## constitute constrained edges. No repeat points!!!
    ##
    cdt = CDT(polyline)
Python crashes at this line

Original issue reported on code.google.com by icearea on 30 Sep 2013 at 7:43

@GoogleCodeExporter
Copy link
Author

When I modify cdt.pxi
def __init__(self, list polyline):
    self.polyline = pointvec_factory(0)
    for point in polyline:
        self.polyline.push_back(new_Point(point.x, point.y))
    self.me = new_CDT(self.polyline)
to
def __init__(self, list polyline):
    cdef point_vec poly = pointvec_factory(0)
    for point in polyline:
        poly.push_back(new_Point(point.x, point.y))
    self.me = new_CDT(poly)
test.py works correctly

Original comment by icearea on 1 Oct 2013 at 5:07

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant