ccCreateSurfaceFromPath
ccCreateSurfaceFromPath(o_path[ ?facetNamesl_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
|
List of new names for begin (t_beginFacet) and end facets (t_endFacet) of the ccPath object. |
|
Value Returned
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