pyvista.examples.cells.Polyhedron

目次

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)
../../../_images/pyvista-examples-cells-Polyhedron-1_00_00.png