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

ccOffsetPolyCurve

ccOffsetPolyCurve(
o_polyCurve           
n_value
[ ?key g_key ]
) 
=> o_polyCurve2

Description

(Virtuoso Photonics Option) Returns a copy of the specified polyCurve that is expanded by the specified offset value.

Arguments

o_polyCurve

ID of a ccPolyCurve object.

n_value

The offset value.

A positive offset value implies that the offset direction is to the right, and a negative value implies that it is to the left.

?key g_key

A flag that outputs a polyCurve with "raw" offset when set to a value that is not nil. A "raw" offset polyCurve has cusps, which can be useful for debugging.

The default is nil.

Value Returned

o_polyCurve2

ID of the resulting ccPolyCurve.

nil

An error occurred.

Example

arc = ccCreatePolyCurve(list(list(ccCreateCurve("cos(t)" "sin(t)" 0:3.14159265))))
> cc@0xc70cee6c
arc2 = ccOffsetPolyCurve(arc 1)
> cc@0x86ca13ca
; A circle arc of radius 1 gets expanded to an arc of radius 2.
arc2~>beginPt
> (2.0 0.0)
arc2~>endPt
> (-2.0 0.0) 

Related Topics

Curvy Core Mathematical Object Functions


Return to top
 ⠀
X