PentagonalPrism#
- PentagonalPrism() UnstructuredGrid[source]#
Create a
pyvista.UnstructuredGridcontaining a single pentagonal prism.This cell corresponds to the
pyvista.CellType.PENTAGONAL_PRISMcell type.- Returns:
pyvista.UnstructuredGridUnstructuredGrid containing a single pentagonal prism.
Examples#
Download Python source code | Download Jupyter notebook
Create and plot a single pentagonal prism.
>>> from pyvista import examples
>>> grid = examples.cells.PentagonalPrism()
>>> examples.plot_cell(grid)
List the grid’s cells.
>>> grid.cells
array([10, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
List the grid’s points.
>>> grid.points
pyvista_ndarray([[1., 0., 0.],
[3., 0., 0.],
[4., 2., 0.],
[2., 4., 0.],
[0., 2., 0.],
[1., 0., 4.],
[3., 0., 4.],
[4., 2., 4.],
[2., 4., 4.],
[0., 2., 4.]])
>>> grid.celltypes # same as pyvista.CellType.PENTAGONAL_PRISM
array([15], dtype=uint8)