Product Documentation
Virtuoso Studio Design Environment SKILL Reference
Product Version IC23.1, November 2023

dbCanonicalizeAnyAngleTransform

dbCanonicalizeAnyAngleTransform(
g_anyAngleTransform...
) 
=> list(t_orient f_acuteAngleDeg)

Description

(Virtuoso MultiTech Framework) Canonicalizes composition of the given transformations into a pair of orientation angles and a non-negative acute angle. Transformations are either numbers representing counter-clockwise rotation in degrees or strings representing orientation. The effect of transformation by the composition of the transformations in the return value is the same as effect of transformation by the composition of all input transformations.

Composition of transforms is not always commutative, therefore the order of arguments is important. Both in the argument list and in the pair, returned transformations are expected to be applied from right to left. For example, ("MX" 45) means that the object is first rotated by 45 degrees and then is mirrored across the X-axis.

Arguments

g_anyAngleTransform

The function accepts any number of this argument in the following format:

n_angleDeg | t_orient

where,

  • n_angleDeg A number representing counter-clockwise rotation in degrees.
  • t_orient A string representing orientation. See dbIsId.

Value Returned

list(t_orient f_acuteAngleDeg)

A list with two elements:
(t_orient f_acuteAngleDeg)

where,

  • t_orient A string representing orientation. See dbIsId.
  • f_acuteAngleDeg A number representing counter-clockwise rotation by acute angle in degrees.

Examples

Any-angle transform with angle greater than or equal to 90 degrees is decomposed into acute angle rotation and rotation by multiple of 90.

dbCanonicalizeAnyAngleTransform(90.0)            
=> ("R90" 0.0)
dbCanonicalizeAnyAngleTransform(120.0)           
=> ("R90" 30.0)
dbCanonicalizeAnyAngleTransform(90.0 "MY")       
=> ("MYR90" 0.0)
dbCanonicalizeAnyAngleTransform("MY" 90.0)       
=> ("MXR90" 0.0)
dbCanonicalizeAnyAngleTransform(12.0 "MY")       
=> ("MYR90" 78.0)
dbCanonicalizeAnyAngleTransform("MY" 12.0)       
=> ("MY" 12.0)
dbCanonicalizeAnyAngleTransform("MY" 120.0 "MY") 
=> ("R180" 60.0)
dbCanonicalizeAnyAngleTransform("MX" 120.0 "MY")
=> ("R0" 60.0)
dbCanonicalizeAnyAngleTransform(-5) => 

("R270" 85.0)

Related Topics

Shape Transformation Functions


Return to top
 ⠀
X