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

Can't get edge list from triangulation #52

Open
daniellivingston opened this issue Jun 26, 2020 · 1 comment
Open

Can't get edge list from triangulation #52

daniellivingston opened this issue Jun 26, 2020 · 1 comment

Comments

@daniellivingston
Copy link

Using the triangle option e to return the edge list of the triangulation throws: KeyError: 'edgelist'.

Steps to reproduce

In [13]: v = [[0, 0], [0, 1], [1, 1], [1, 0]]
In [14]: tr.triangulate({'vertices': v}, 'a')
Out[14]:
{'vertices': array([[0., 0.],
        [0., 1.],
        [1., 1.],
        [1., 0.]]),
 'vertex_markers': array([[1],
        [1],
        [1],
        [1]], dtype=int32),
 'triangles': array([[1, 0, 3],
        [3, 2, 1]], dtype=int32)}

In [15]: tr.triangulate({'vertices': v}, 'ea')
--------------------------------------------------------------------
KeyError                           Traceback (most recent call last)
<ipython-input-15-7ebaea6a4a1d> in <module>
----> 1 tr.triangulate({'vertices': v}, 'ea')

/anaconda3/envs/tinerator/lib/python3.6/site-packages/triangle/tri.py in triangulate(tri, opts)
     65     tri = {translate_inv[_]: tri[_] for _ in tri}
     66     tri, _ = triang(tri, opts)
---> 67     tri = {translate_frw[_]: tri[_] for _ in tri}
     68
     69     return tri

/anaconda3/envs/tinerator/lib/python3.6/site-packages/triangle/tri.py in <dictcomp>(.0)
     65     tri = {translate_inv[_]: tri[_] for _ in tri}
     66     tri, _ = triang(tri, opts)
---> 67     tri = {translate_frw[_]: tri[_] for _ in tri}
     68
     69     return tri

KeyError: 'edgelist'
@daniellivingston
Copy link
Author

Related: #45, #46, #47

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

No branches or pull requests

1 participant