PolyVertex#
- PolyVertex() UnstructuredGrid[source]#
Create a
pyvista.UnstructuredGridcontaining a single poly vertex.This represents a set of 3D vertices as a single cell.
This cell corresponds to the
pyvista.CellType.POLY_VERTEXcell type.- Returns:
pyvista.UnstructuredGridUnstructuredGrid containing a single poly vertex.
Examples#
Download Python source code | Download Jupyter notebook
Create and plot a single poly vertex.
>>> from pyvista import examples
>>> grid = examples.cells.PolyVertex()
>>> examples.plot_cell(grid)
List the grid’s cells. This could be any number of points.
>>> grid.cells
array([6, 0, 1, 2, 3, 4, 5])
List the grid’s points.
>>> grid.points
pyvista_ndarray([[0. , 0. , 0. ],
[1. , 0. , 0. ],
[0. , 1. , 0. ],
[0. , 0. , 1. ],
[1. , 0. , 0.4],
[0. , 1. , 0.6]])
>>> grid.celltypes # same as pyvista.CellType.POLY_VERTEX
array([2], dtype=uint8)