[vtkusers] convert a grid of tetrahedra to a grid of triangles
Stephen Langer
stephen.langer at nist.gov
Tue Jun 19 17:35:27 EDT 2012
Hi --
Is there an easy way in vtk to convert a vtkUnstructuredGrid that contains only tetrahedral cells into a vtkUnstructuredGrid that contains only triangular cells, where the triangles are the faces of the original tetrahedra?
The reason that I want to do this is that I'm displaying a tetrahedral mesh as a wireframe, and I'm clipping the mesh with vtkClipDataSet. Because the clipping creates only tetrahedral cells, it adds new edges and faces within the clipped tetrahedra. I only want to display the original edges, so I use vtkExtractEdges to convert the grid to a grid of lines, and clip the lines instead. That works well, but then I want to add new lines on the clipping plane, showing where the original faces
intersect the plane. Using vtkCutter on the original grid creates only triangular cells, even where the intersection of a tetrahedron with the plane is quadrilateral. I want to display the quadrilateral as a wireframe quadrilateral, not as two triangles. Is that possible? If I had a grid that only contained the faces of the original tetrahedra, then cutting that grid would produce the lines that I want.
Thanks,
Steve
--
-- stephen.langer at nist.gov Tel: (301) 975-5423 --
-- http://math.nist.gov/~SLanger/ Fax: (301) 975-3553 --
-- NIST, 100 Bureau Drive, Stop 8910, Gaithersburg, Md 20899-8910 --
"I've just had the best idea. I'm going to make hats out of Nutella."
-- Nadia Langer, 10 Mar 2012
(Not intended as a product endorsement or statement of suitability.)
More information about the vtkusers
mailing list