UnstructuredGridFilters.subdivide_tetra

UnstructuredGridFilters.subdivide_tetra#

UnstructuredGridFilters.subdivide_tetra() → UnstructuredGrid[source]#

Subdivide each tetrahedron into twelve tetrahedrons.

Returns:
pyvista.UnstructuredGrid

UnstructuredGrid containing the subdivided tetrahedrons.

Examples#

Download Python source code | Download Jupyter notebook

First, load a sample tetrahedral UnstructuredGrid and plot it.

>>> from pyvista import examples
>>> grid = examples.load_tetbeam()
>>> grid.plot(show_edges=True, line_width=2)
../../../_images/pyvista-UnstructuredGridFilters-subdivide_tetra-8544947050be3846_00_00.png

Subdivide and plot the result.

>>> subdivided = grid.subdivide_tetra()
>>> subdivided.plot(show_edges=True, line_width=2)
../../../_images/pyvista-UnstructuredGridFilters-subdivide_tetra-8544947050be3846_01_00.png