The Visualization Toolkit (VTK), developed by Kitware, has many mesh data types that PyVista wraps. This chapter is intended to describe these different mesh types and how we wrap and implement each of those mesh types in VTK. This chapter also highlights how all PyVista types have direct access to common VTK filters (see Filters).
All PyVista meshes inherit from the DataSet type (see Data Sets). PyVista has the following mesh types:
pyvista.PolyDataconsists of any 1D or 2D geometries to construct vertices, lines, polygons, and triangles. We generally use
pyvista.PolyDatato construct scattered points and closed/open surfaces (non-volumetric datasets). The
pyvista.PolyDataclass is an extension of vtk.vtkPolyData.
pyvista.UnstructuredGridis the most general dataset type that can hold any 1D, 2D, or 3D cell geometries. You can think of this as a 3D extension of
pyvista.PolyDatathat allows volumetric cells to be present. It’s fairly uncommon to explicitly make unstructured grids but they are often the result of different processing routines that might extract subsets of larger datasets. The
pyvista.UnstructuredGridclass is an extension of vtk.vtkUnstructuredGrid.
pyvista.StructuredGridis a regular lattice of points aligned with internal coordinate axes such that the connectivity can be defined by a grid ordering. These are commonly made from
numpy.meshgrid(). The cell types of structured grids must be 2D quads or 3D hexahedra. The
pyvista.StructuredGridclass is an extension of vtk.vtkStructuredGrid.
pyvista.RectilinearGriddefines meshes with implicit geometries along the axis directions that are rectangular and regular. The
pyvista.RectilinearGridclass is an extension of vtk.vtkRectilinearGrid.
Image data, commonly referred to as uniform grids, and defined by the
pyvista.UniformGridclass are meshes with implicit geometries where cell sizes are uniformly assigned along each axis and the spatial reference is built out from an origin point. The
pyvista.UniformGridclass is an extension of vtk.vtkImageData.
- Data Sets
- Point Sets
- Gridded Data
- Composite Datasets