I am currently working with a vtkUnstructuredGrid object that is made up of a collection of tetrahedron cells. I now want to iterate over all triangles.
One way to do so ist to use the GetCellData(); function, but this will lead to a list of tetrahedra, which I can then use to visit all faces. This leads to several triangles being visited twice, which is a significant overhead. Does VTK offer a better way that I just haven’t found yet?
There was a similar question, which was never really answered.
That’s a good suggestion, but I believe the current philosophy is that such a face structure would be too slow and too memory inefficient. However, for all I know there may be a filter (or filter combination) that can do what you want but nothing is coming to me at the moment. Are you willing to try writing some code and creating a MR? It could be added to vtkUnstructuredGridBase with an implementation in vtkUnstructuredGrid.