Volume.copy#
Examples#
Download Python source code | Download Jupyter notebook
Create a volume of by adding it to a Plotter
and then copy the volume.
>>> import pyvista as pv
>>> mesh = pv.Wavelet()
>>> pl = pv.Plotter()
>>> volume = pl.add_volume(mesh, diffuse=0.5)
>>> new_volume = volume.copy()
Change the copy’s properties. A deep copy is made by default, so the original volume is not affected.
>>> new_volume.prop.diffuse = 1.0
>>> new_volume.prop.diffuse
1.0
>>> volume.prop.diffuse
0.5