pyvista.examples.cells.Polyhedron#
- Polyhedron() UnstructuredGrid [ソース]#
Create a
pyvista.UnstructuredGrid
containing a single polyhedron.This cell corresponds to the
pyvista.CellType.POLYHEDRON
cell type.- 戻り値:
pyvista.UnstructuredGrid
UnstructuredGrid containing a single polyhedron.
例
Create and plot a single polyhedron.
>>> from pyvista import examples >>> grid = examples.cells.Polyhedron() >>> examples.plot_cell(grid)
A polyhedron is defined by it's faces. List the grid's faces.
>>> grid.get_cell(0).faces [Cell... ..., Cell... ..., Cell... ...]
>>> grid.celltypes # same as pyvista.CellType.POLYHEDRON array([42], dtype=uint8)