Remove Cells

Remove Cells#

Download Python source code | Download Jupyter notebook

Remove specific cells from a mesh.

Cells can be removed from any dataset by index or with a boolean mask using remove_cells(). The output is a PolyData for PolyData input and an UnstructuredGrid otherwise.

from pyvista import examples

mesh = examples.load_channels()

Decide which cells to remove with a criterion (feel free to adjust this or manually create this array to remove specific cells).

remove = mesh['facies'] < 1.0

Remove the cells and plot the result.

remove cells

Tags: filter

Total running time of the script: (0 minutes 3.682 seconds)

Gallery generated by Sphinx-Gallery