CellType.vtk_class

CellType.vtk_class#

property CellType.vtk_class: type[vtkCell] | None[source]#

Return the vtkCell class associated with this cell type.

Only concrete VTK classes that can instantiated are returned. None is returned if the cell type has no corresponding VTK class or if the class is abstract.

Added in version 0.48.

Examples#

Download Python source code | Download Jupyter notebook

Get the VTK class associated with the TRIANGLE cell type.

>>> import pyvista as pv
>>> pv.CellType.TRIANGLE.vtk_class
<class 'vtkmodules.vtkCommonDataModel.vtkTriangle'>

Abstract cell types like HIGHER_ORDER_HEXAHEDRON return None.

See Also#

pyvista.Cell