pyvista.examples.cells.BezierQuadrilateral

pyvista.examples.cells.BezierQuadrilateral#

BezierQuadrilateral(*, cell_order: int = 3) UnstructuredGrid[source]#

Create a pyvista.UnstructuredGrid containing a single Bezier quadrilateral.

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

Parameters:
cell_orderint, default: 3

Order of interpolation to use.

Returns:
pyvista.UnstructuredGrid

UnstructuredGrid containing a single Bezier quadrilateral.

Examples

Create and plot a single Bezier quadrilateral.

>>> from pyvista import examples
>>> grid = examples.cells.BezierQuadrilateral()
>>> examples.plot_cell(grid, cpos='xy')
../../../_images/pyvista-examples-cells-BezierQuadrilateral-3e4e74c2e87e8619_00_00.png

List the grid’s cells.

>>> grid.cells
array([16,  0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15])

List the grid’s points.

>>> grid.points
pyvista_ndarray([[0.        , 0.        , 0.        ],
                 [1.        , 0.        , 0.        ],
                 [1.        , 1.        , 0.        ],
                 [0.        , 1.        , 0.        ],
                 [0.33333334, 0.        , 0.        ],
                 [0.66666669, 0.        , 0.        ],
                 [1.        , 0.33333334, 0.        ],
                 [1.        , 0.66666669, 0.        ],
                 [0.33333334, 1.        , 0.        ],
                 [0.66666669, 1.        , 0.        ],
                 [0.        , 0.33333334, 0.        ],
                 [0.        , 0.66666669, 0.        ],
                 [0.33333334, 0.33333334, 0.        ],
                 [0.66666669, 0.33333334, 0.        ],
                 [0.33333334, 0.66666669, 0.        ],
                 [0.66666669, 0.66666669, 0.        ]])
>>> grid.celltypes  # same as pyvista.CellType.BEZIER_QUADRILATERAL
array([77], dtype=uint8)