CubicLine#
- CubicLine() UnstructuredGrid[source]#
Create a
pyvista.UnstructuredGridcontaining a single cubic line.This cell corresponds to the
pyvista.CellType.CUBIC_LINEcell type.- Returns:
pyvista.UnstructuredGridUnstructuredGrid containing a single cubic line.
Examples#
Download Python source code | Download Jupyter notebook
Create and plot a single cubic line.
>>> from pyvista import examples
>>> grid = examples.cells.CubicLine()
>>> examples.plot_cell(grid)
List the grid’s cells.
>>> grid.cells
array([4, 0, 1, 2, 3])
List the grid’s points.
>>> grid.points
pyvista_ndarray([[-1. , 0. , 0. ],
[ 1. , 0. , 0. ],
[-0.33333333, 0. , 0. ],
[ 0.33333333, 0. , 0. ]])
>>> grid.celltypes # same as pyvista.CellType.CUBIC_LINE
array([35], dtype=uint8)