overwrite#
- UnstructuredGrid.overwrite(mesh: vtkmodules.vtkCommonDataModel.vtkDataSet)#
Overwrite this dataset inplace with the new dataset’s geometries and data.
- Parameters
- mesh
vtk.vtkDataSet
The overwriting mesh.
- mesh
Examples
Create two meshes and overwrite
mesh_a
withmesh_b
. Show thatmesh_a
is equal tomesh_b
.>>> import pyvista >>> mesh_a = pyvista.Sphere() >>> mesh_b = pyvista.Cube() >>> mesh_a.overwrite(mesh_b) >>> mesh_a == mesh_b True