ParagonTruss/GeometryClassLibrary

Adjacency matrix as in meshes

Opened this issue · 1 comments

Dear Sir,

I would like to ask if there is a very specific function in your library GeometryClassLibrary.

I want to get adjacency of all faces in polyhedron.
For instance, polyhedron.Polygons[0].GetNeighbourPolygons()
It looks that your library is very well developed polygon library, but do polygons "know" which neighbors do they have?

In meshes this is a so called adjacency matrix of vertices,edges and faces. It is a must thing in a mesh as it is similar to graph data structure. Does a polyhedron has something similar or polygons are only discrete elements that does not relate to each other?

https://s28.postimg.org/jfal16b8t/Polyhedron_Convex_1000.jpg

Thank you for a reply.

No, we do not currently track the adjacency information of polygons or polyhedra. Currently there is simply validation code that makes sure all the polygons on a polyhedra join end to end and leave no holes.

Feel free to fork, and incorporate such details if you like.

Alternatively, the method you mention could be implemented by looping through the polyhedron's faces and checking if any linesegments match the given one. We just haven't had a need for this method yet.