copy_structure

ExplicitStructuredGrid.copy_structure(dataset: vtkmodules.vtkCommonDataModel.vtkDataSet)

Copy the structure (geometry and topology) of the input dataset object.

Parameters
datasetvtk.vtkDataSet

Dataset to copy the geometry and topology from.

Examples

>>> import pyvista as pv
>>> source = pv.UniformGrid((10, 10, 5))
>>> target = pv.UniformGrid()
>>> target.copy_structure(source)
>>> target.plot(show_edges=True)
../../../_images/pyvista-ExplicitStructuredGrid-copy_structure-1_00_00.png