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

ccCreatePolyCurve

ccCreatePolyCurve(
l_segments
[ ?close { t | nil } ]
[ ?smoothness S_smoothness ]
) 
=> o_polyCurve / nil

Description

(Virtuoso Photonics Option) Creates a ccPolyCurve object from a list of specified polyCurve segments.

Arguments

l_segments

l_segment | (l_segments...)

A single curvy segment or a list of segments, specified by a ccCurve object and a transformation applied to this curve in the following format.

(o_curve l_transform)

where:

  • o_curve is the ID of a ccCurve object.
  • l_transform is a transformation object in the following format:
    ((n_offsetX n_offsetY) n_angle)
    where:
    • n_angle is the rotation angle.
    • n_offsetX and n_offsetY determine the offsets of the X-axis and Y-axis in this format (0,0).

?close

Specifies whether the resulting curve is closed (t) or open (nil).

The default is nil.

?smoothness S_smoothness

  

Level of smoothness of the resulting curve.

Valid values:

  • G0 specifies that the resulting curve is continuous.
  • G1 specifies that the derivative of the resulting curve is continuous.
  • G2 specifies that the second order derivative of the resulting curve is continuous.

Value Returned

o_polyCurve

ID of the resulting ccPolyCurve.

nil

An error occurred.

Examples

ccCreatePolyCurve(list(list(ccCreateCurve("cos(t)" "sin(t)" -                  3.14159265:3.14159265) list(0:0 0)))
                  ?close t
)
=> cc@0x269c83f0
ccCreatePolyCurve(list(list(ccCreateCurve("t" "1" 0:1) list((0:0) 0))
                  list(ccCreateCurve("t" "1" 2:3) list((0:0) 0)))
                  ?smoothness 'G0
)

=> *Error* (CC-200014): Cannot create PolyCurve: required smoothness is G0, but smoothness between segments 0 and 1 is discontinuous: point (1, 1) != (2, 1).

Related Topics

Curvy Core Mathematical Object Creation Functions

ccGetFacetCorners

ccGetFacetCorners(
o_shape 
g_facet
) 
=> l_corners / nil

Description

Retrieves the corner points of the facet snapped to the manufacturing grid of the shape containing the facet.

Arguments

o_shape

ID of a ccShape object.

g_facet

o_facet | t_facetName |

where:

  • o_facet is ID of a ccFacet object.
  • t_facetName is the name of the facet.

Examples

c = ccCreateCurve("20*cos(t)" "10*sin(t)" -pi/4:pi/3)
=> cc@0xb3f1648e
path = ccCreatePath(cv "waveguide" list(c) ?defaultWidth 1)
=> cc@0x343b3b00
ccGetFacetCorners(path path->beginFacet)
=> ((13.95 -6.6) (14.35 -7.5))
ccGetFacetCorners(path "begin")
=> ((13.95 -6.6) (14.35 -7.5))
)

Return to top
 ⠀
X