janba/GEL

How to load a custom graph to pygel3d.graph.Graph object

Closed this issue · 1 comments

Hi,

Thanks for the great work! I am trying to use the hmesh.skeleton_to_feq function to turn a skeleton graph to Face Extrusion Quad Mesh. But for this, I need a pygel3d.graph.Graph object first.

I have a custom graph where for each node, I know its xyz coordinate as well as a node radius. Besides, I also have an edge (connections) array where each row represents the two indices of two connected nodes. It is currently modeled networkx + pyvista, but I can easily change it to other modelling.

Is there a way to save the data to the format that can be loaded by graph.load. Otherwise, can I directly create a pygel3d.graph.Graph object by adding nodes and edges? I can only see a add_node function but seem not able to find how to integrate connections?

janba commented