overwrite

DataSet.overwrite(mesh: vtkmodules.vtkCommonDataModel.vtkDataSet)

Overwrite this dataset inplace with the new dataset’s geometries and data.

Parameters
meshvtk.vtkDataSet

The overwriting mesh.

Examples

Create two meshes and overwrite mesh_a with mesh_b. Show that mesh_a is equal to mesh_b.

>>> import pyvista
>>> mesh_a = pyvista.Sphere()
>>> mesh_b = pyvista.Cube().clean()
>>> mesh_a.overwrite(mesh_b)
>>> mesh_a == mesh_b
True