clean#

MultiBlock.clean(empty=True)[source]#

Remove any null blocks in place.

Parameters:
emptybool, default: True

Remove any meshes that are empty as well (have zero points).

Examples

>>> import pyvista as pv
>>> data = {"cube": pv.Cube(), "empty": pv.PolyData()}
>>> blocks = pv.MultiBlock(data)
>>> blocks.clean(empty=True)
>>> blocks.keys()
['cube']