pyvista.DataSet.copy_from#
- DataSet.copy_from(mesh: _vtk.vtkDataSet, deep: bool = True) None [source]#
Overwrite this dataset inplace with the new dataset’s geometries and data.
- Parameters:
Examples
Create two meshes and overwrite
mesh_a
withmesh_b
. Show thatmesh_a
is equal tomesh_b
.>>> import pyvista as pv >>> mesh_a = pv.Sphere() >>> mesh_b = pv.Cube() >>> mesh_a.copy_from(mesh_b) >>> mesh_a == mesh_b True