pyvista.Transform.scale_factors

pyvista.Transform.scale_factors#

property Transform.scale_factors: tuple[float, float, float][source]#

Return the scaling component of the current transformation matrix.

The scaling factors are always positive.

Added in version 0.47.

Examples

Compose a scale matrix and get the scale factors.

>>> import pyvista as pv
>>> trans = pv.Transform() * (1, 2, 3)
>>> trans.scale_factors
(1.0, 2.0, 3.0)

Compose a second scale matrix and get the factors again.

>>> trans *= (4, 5, 6)
>>> trans.scale_factors
(4.0, 10.0, 18.0)