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

ccCreateSurfaceFromPath

ccCreateSurfaceFromPath(
o_path
[ ?facetNames l_facetNames  ]
) 
=> o_surface | nil

Description

(Virtuoso Photonics Option) Creates a ccSurface object from the boundary of the given ccPath. Begin and end facets of the ccPath object in the resulting ccSurface boundary are renamed according to the value of facetNames, or are not renamed if facetNames is nil.

Arguments

o_path

ID of a ccPath object.

?facetNames l_facetNames

  

list(t_beginFacet t_endFacet) | nil

List of new names for begin (t_beginFacet) and end facets (t_endFacet) of the ccPath object.

Value Returned

o_surface

ID of the resulting ccSurface

nil

An error occurred.

Example

In the following example, we create a ccPath object, check the old names of begin and end facets, call ccCreateSurfaceFromPath, and then check the new facet names in the resulting object.

path = ccCreatePath(cv "waveguide" list(list(ccCreateCurve("cos(t)" "sin(t)" -3.14159265:3.14159265) list(0:0 0) 0.1)))
> cc@0x22ffefd0
path~>beginFacet~>name
> "begin"
path~>endFacet~>name
> "end"
surf = ccCreateSurfaceFromPath(path ?facetNames '("begin1" "end1"))
> cc@0x252fc5b0
// The list of segments of the path's boundary includes two arcs // (indexes 0 and 2) and two facets (indexes 1 and 3).
nth(1 surf~>boundary~>segments)~>objType
> "ccFacet"
nth(1 surf~>boundary~>segments)~>name
> "end1"
nth(3 surf~>boundary~>segments)~>objType
> "ccFacet"
nth(3 surf~>boundary~>segments)~>name
> "begin1"

Related Topics

Curvy Core Shape Creation Functions


Return to top
 ⠀
X