Delaunay in ghpythonlib.components

Hi

I am experimenting with the new ghpythonlib.components. I am trying to work with the Delaunay method:
ghcomp.DelaunayEdges(arrPts)

It should return the graph connectivity
my script for five points return for example:
Output(connectivity=[1, 4, 5, 0, 2, 4, 1, 3, 4, 2, 4, 5, 0, 1, 2, 3, 5, 0, 3, 4],

What to do with this information? First, I thought it represents triangle edges (e.g. triangleA(1,4,5); trinagleB(0,2,4)…). This does not give me the right Delaunay triangulation. How to interpret this list?

Thanks
M

Hi Manuel,

the component outputs a data-tree, so if you have this data as a list it’s utterly worthless.

The data represents the connectivity of nodes in the delaunay mesh. For every input point there is a list of integers indicating all the nodes that input point shares edges with.


David

Thanks David

So if I understand correctly that means if I am using ghcomp.DelaunayEdges(arrPts) within my python code (not using grasshopper at all) the list of nodes is useless. As a workaround I am now doing this:

``
mesh = ghcomp.DelaunayMesh(arrPts)
mesh = scriptcontext.doc.Objects.AddMesh(mesh)
msehvertices = rs.MeshFaceVertices(mesh)
rs.DeleteObject(mesh)

What better way is there to directly get the delaunay connectivity information? The ideal information would be a node-wise adjacency list as David said ("for every input point a list of integers indicating all the nodes that input point shares edges with"). Thanks!

M

This still is an issue for me. Any ideas? Thanks in advance.
M