pyvista.examples.cells.Empty

Contents

pyvista.examples.cells.Empty#

Empty() UnstructuredGrid[source]#

Create a pyvista.UnstructuredGrid containing a single empty cell.

This cell corresponds to the pyvista.CellType.EMPTY_CELL cell type.

Returns:
pyvista.UnstructuredGrid

UnstructuredGrid containing a single empty cell.

Examples

Create a single empty cell.

>>> from pyvista import examples
>>> grid = examples.cells.Empty()

List the grid’s cells.

>>> grid.cells
array([0])

List the grid’s points.

>>> grid.points
pyvista_ndarray([], shape=(0, 3), dtype=float64)
>>> grid.celltypes  # same as pyvista.CellType.EMPTY_CELL
array([0], dtype=uint8)