Transform.copy#
- Transform.copy() Transform[source]#
Return a deep copy of the transform.
- Returns:
TransformDeep copy of this transform.
Examples#
Download Python source code | Download Jupyter notebook
Create a scaling transform.
>>> import pyvista as pv
>>> transform = pv.Transform().scale(1, 2, 3)
>>> transform.matrix
array([[1., 0., 0., 0.],
[0., 2., 0., 0.],
[0., 0., 3., 0.],
[0., 0., 0., 1.]])
Copy the transform.
>>> copied = transform.copy()
>>> copied.matrix
array([[1., 0., 0., 0.],
[0., 2., 0., 0.],
[0., 0., 3., 0.],
[0., 0., 0., 1.]])
>>> copied is transform
False