Closed kcpevey closed 3 years ago
@philippjfr Can I get your opinion on this?
Okay, I'll start by summarizing what the relationship between Graph and TriMesh is. Fundamentally they are fairly similar, particularly in terms of the datastructures they share, which consist of:
That's why I chose to implement TriMesh as a subclass of Graph. However there is also one significant different which is that the "edges" in a TriMesh aren't really edges, they are better described as faces or simplexes. This means that unless we extend TriMesh
significantly a lot of the features will not work quite right, specifically selecting on vertices or simplexes will not work quite correctly since it does not take into account the third node index of each simplex. However some of the features you asked for should be possible:
TriMesh.select
to take into account the third node id of each simplex and may be a bit of work.This has been superseded. The available tools have changed since this was opened.
Long term, I'd like the ability to interact with the mesh in a more dynamic way.
1) Ability to view node index
2) ability to view element index
3) Ability to move nodes in drawing
4) ability to select a group of elements based on material type/kdims
I started using networkx in one of my workflows to hold my 3dm mesh vertices and edges. An issue that just came up in holoviews made me start looking into Network Graph so I started poking around at this http://holoviews.org/user_guide/Network_Graphs.html . I like some of the functionality provided with
Graph
as part of the TriMesh objects, namely the ability to select a node and get the node index.I also briefly looked at TriMesh and it seems like its inheriting from
Graph
so I'm wondering what is their connection? By the time its a TriMesh, is it no longer a networkx graph? I see that TriMesh holds the vertices of each element, which is critical, but maybe we could expose more of the Graph functionality to TriMesh?