pyvista.examples.cells.QuadraticEdge

Contents

pyvista.examples.cells.QuadraticEdge#

QuadraticEdge() UnstructuredGrid[source]#

Create a pyvista.UnstructuredGrid containing a single quadratic edge.

This cell corresponds to the pyvista.CellType.QUADRATIC_EDGE cell type.

Returns:
pyvista.UnstructuredGrid

UnstructuredGrid containing a single quadratic edge.

Examples

Create and plot a single quadratic edge.

>>> from pyvista import examples
>>> grid = examples.cells.QuadraticEdge()
>>> examples.plot_cell(grid)

List the grid’s cells.

>>> grid.cells
array([3, 0, 1, 2])

List the grid’s points.

>>> grid.points
pyvista_ndarray([[0. , 0. , 0. ],
                 [1. , 0. , 0. ],
                 [0.5, 0. , 0. ]])
>>> grid.celltypes  # same as pyvista.CellType.QUADRATIC_EDGE
array([21], dtype=uint8)
../../../_images/pyvista-examples-cells-QuadraticEdge-1_00_00.png