Skip to content

Transform.DecomposeSimilarity

Public Class

Decomposes a similarity transformation. The transformation must be affine. A similarity transformation can be broken into a sequence of a dilation, translation, rotation, and a reflection.

Namespace: Rhino.Geometry

Assembly: RhinoCommon (in RhinoCommon.dll)

**Since:**6.12

Syntax

public TransformSimilarityType DecomposeSimilarity(
out Vector3d translation,
out double dilation,
out Transform rotation,
double tolerance
)

Parameters

translation

Type: Rhino.Geometry.Vector3d.
Translation vector.

dilation

Type:System.Double.
Dilation, where dilation lt; 0 if this is an orientation reversing similarity.

rotation

Type: Rhino.Geometry.Transform.
A proper rotation transformation, where R*Transpose(R)=I and Determinant(R)=1.

tolerance

Type:System.Double
The evaluation tolerance.

Return Value

Type: TransformSimilarityType
The similarity type.

Remarks

If X.DecomposeSimilarity(T, d, R, tol) !=0 then X ~ Translation(T)*Diagonal(d)*R note when d gt;0 the transformation is orientation preserving. If dilation lt; 0 then Diagonal(dilation) is actually a reflection combined with a true dilation, or Diagonal(dilation) = Diagonal(-1) * Diagonal(|diagonal|).