pyvista.MultiBlock.copy

pyvista.MultiBlock.copy#

MultiBlock.copy(deep: bool = True)[source]#

Return a copy of the multiblock.

Parameters:
deepbool, default: True

When True, make a full copy of the object.

Returns:
pyvista.MultiBlock

Deep or shallow copy of the MultiBlock.

Examples

>>> import pyvista as pv
>>> data = [
...     pv.Sphere(center=(2, 0, 0)),
...     pv.Cube(center=(0, 2, 0)),
...     pv.Cone(),
... ]
>>> blocks = pv.MultiBlock(data)
>>> new_blocks = blocks.copy()
>>> len(new_blocks)
3