Projection.decomposed
- Projection.decomposed()[source]
Decompose the Transformation into its components.
- Returns:
compas.geometry.ScaleThe scale component of the current transformation.
compas.geometry.ShearThe shear component of the current transformation.
compas.geometry.RotationThe rotation component of the current transformation.
compas.geometry.TranslationThe translation component of the current transformation.
compas.geometry.ProjectionThe projection component of the current transformation.
Examples
>>> from compas.geometry import Scale, Translation, Rotation >>> trans1 = [1, 2, 3] >>> angle1 = [-2.142, 1.141, -0.142] >>> scale1 = [0.123, 2, 0.5] >>> T1 = Translation.from_vector(trans1) >>> R1 = Rotation.from_euler_angles(angle1) >>> S1 = Scale.from_factors(scale1) >>> M = T1 * R1 * S1 >>> S, H, R, T, P = M.decomposed() >>> S1 == S True >>> R1 == R True >>> T1 == T True