UnstructuredGrid.linear_copy

Contents

UnstructuredGrid.linear_copy#

UnstructuredGrid.linear_copy(
*,
deep: bool = False,
) → UnstructuredGrid[source]#

Return a copy of the unstructured grid containing only linear cells.

Each nonlinear cell below becomes the linear cell through its corner points. Its other points stay in the grid, unused by the new cell. Call remove_unused_points() or clean() on the output to remove them.

Changed in version 0.50: All of the cell types above are converted, and each converted cell keeps only its corner points.

Parameters:
deepbool, default: False

When True, makes a copy of the points array. Cells and cell types are always copied.

Returns:
pyvista.UnstructuredGrid

UnstructuredGrid containing only linear cells when deep=False.