hide_cells

StructuredGrid.hide_cells(ind)

Hide cells without deleting them.

Hides cells by setting the ghost_cells array to HIDDEN_CELL.

Parameters
indsequence

List or array of cell indices to be hidden. The array can also be a boolean array of the same size as the number of cells.

Examples

Hide part of the middle of a structured surface.

>>> import pyvista as pv
>>> import numpy as np
>>> x = np.arange(-10, 10, 0.25)
>>> y = np.arange(-10, 10, 0.25)
>>> z = 0
>>> x, y, z = np.meshgrid(x, y, z)
>>> grid = pv.StructuredGrid(x, y, z)
>>> grid.hide_cells(range(79*30, 79*50))
>>> grid.plot(color=True, show_edges=True)
../../../_images/pyvista-StructuredGrid-hide_cells-1_00_00.png