ConvexPointSet#
- ConvexPointSet() UnstructuredGrid[source]#
Create a
pyvista.UnstructuredGridcontaining a single convex point set.This represents a set of 3D vertices as a single convex cell.
This cell corresponds to the
pyvista.CellType.CONVEX_POINT_SETcell type.- Returns:
pyvista.UnstructuredGridUnstructuredGrid containing a single convex point set.
Examples#
Download Python source code | Download Jupyter notebook
Create and plot a single convex point set.
>>> from pyvista import examples
>>> grid = examples.cells.ConvexPointSet()
>>> 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.CONVEX_POINT_SET
array([41], dtype=uint8)