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

ccOrientCurve

ccOrientCurve(
o_curve
S_orient
) 
=> o_outCurve | nil

Description

(Virtuoso Photonics Option) Returns a copy of the specified  ccCurve or ccPolyCurve rotated counterclockwise around the origin by a multiple of 90 degrees after optionally mirroring it across the X-axis or Y-axis. Mirroring also reverses the orientation of the curve.

Arguments

o_curve

ID of a ccCurve or ccPolyCurve object.

S_orient

Transformation specified by rotation angle around (0,0) and optional mirroring across the X-axis or Y-axis.

Valid values are "R0", "R90", "R180", "R270", "MY", "MYR90", "MX", "MXR90"

Examples

In this example a straight line curve with equation x(t)=2*t, y(t)=3*t is mirrored and then rotated by 90 degrees counterclockwise around the origin, resulting in a straight line with equation x(t)=-2*t, y(t)=3*t and transformation angle of 90 degrees.

pc = ccCreatePolyCurve(ccCreateCurve("2*t" "3*t" 0:1))
> cc@0x68c6b149
tpc = ccOrientCurve(pc "MYR90")
> cc@0xf6fd767d
tpc->segments
> ((cc@0x9321b1c5 
>     ((0.0 0.0) 90.0)
>     )
> )
caar(tpc->segments)~>??
> (cc@0x9321b1c5 objType "ccCurve" xExpr "((-2)*t)"
>     yExpr "(3*t)" range 
>     (1.0 0.0)
> )

Return to top
 ⠀
X