ccCreatePath
ccCreatePath(
d_cellviewId
l_lpp
l_segments
[?defaultWidth g_defWidth]
[?smoothness S_smoothness]
)
=> o_path / nil
Description
(Virtuoso Photonics Option) Creates a ccPath object on the specified layer-purpose pair from one or a list of path segments.
Arguments
|
d_cellViewId
|
Database ID of a cellview.
|
|
l_lpp
|
tx_layer | (tx_layer tx_purpose)
A layer or a layer-purpose pair.
|
|
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 [ g_width ])
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).
-
g_width is the width of the specified segment. This width can be either of the following:
-
nil, which means that defaultWidth value is used for this segment. -
A number, or an expression depending on the centerline-parameter of the segment t.
|
|
?defaultWidth g_defWidth
|
|
|
The default width value that can be set to a numeric value or nil.
The default is nil, in which case the width values should be individually defined in l_segments. An error occurs if either segment widths or ?defaultWidth is not set.
|
|
?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_path
|
ID of the resulting ccPath.
|
|
nil
|
An error occurred.
|
Examples
ccCreatePath(cv "waveguide"
list(list(ccCreateCurve("cos(t)" "sin(t)" -3.14159265:3.14159265) list(0:0 0) "sqrt(t)"))
)
=> cc@0x269c83f0
ccCreatePath(cv "waveguide"
list(list(ccCreateCurve("t" "0" 0:1) list((0:0) 0))
list(ccCreateCurve("1" "t" 0:1) list((0:0) 0))
)
?defaultWidth 0.1)
=> *Error* (CC-200014): Cannot create PolyCurve: required smoothness is G1, but smoothness between segments 0 and 1 is G0: tangent angle 0.000000 != 90.000000.
ccCreatePath(cv "waveguide"
list(list(ccCreateCurve("t" "0" 0:1) list((0:0) 0))
list(ccCreateCurve("1" "t" 0:1) list((0:0) 0)))
?defaultWidth 0.1
?smoothness 'G0
)
=> *Error* (CC-200012): ccPath requires G1 smoothness or higher.
Related Topics
Curvy Core Shape Creation Functions
Return to top