ccCurveConnector
ccCurveConnector(
l_port1
l_port2
n_rmin
[ ?method x_method ]
[ ?parameters l_parameters ]
)
=> l_connector | nil
Description
(Virtuoso Photonics Option) Creates a curve connector with two specified ports and a minimum curvature radius. Depending on the input, the connector consists of different combinations of line, circle, and clothoid curve segments.
Arguments
|
l_port1
|
list(nil 'xy l_point 'facet l_facet)
Starting port for the connector where:
-
l_point
list(n_x n_y)
A two-dimensional point represented by n_x and n_y. -
l_facet
list(nil 'angle n_angle ['radius n_radius] ['width n_width]
A facet is specified by the angle n_angle. Values for n_radius and n_width are not required and are ignored if specified.
|
|
l_port2
|
list(nil 'xy l_point 'facet l_facet)
Ending port for the connector.
-
l_point
list(n_x n_y)
A two-dimensional point represented by n_x and n_y. -
l_facet
list(nil 'angle n_angle ['radius n_radius] ['width n_width]
A facet is specified by the angle n_angle. Values for n_radius and n_width are not required and are ignored if specified.
|
|
n_rmin
|
Minimally allowed curvature radius.
|
|
?method x_method
|
|
|
Method number from 0 to 9.
The default is 0.
For more information see Additional Information.
|
|
?parameters l_parameters
|
|
|
list(n_parameters...)
List of additional numeric parameters passed to the connector calculation methods.
The default is nil.
|
Value Returned
|
l_connector
|
list(nil 'connector o_polyCurve 'message t_message ['segments l_segments])
The resulting connector (ccPolyCurve ID) bundled with debug or error logs, where,
-
o_polyCurve is the resulting ccPolyCurve connector. If
o_polyCurve = nil, the connector cannot be implemented. -
t_message is a string holding the debug printouts and error messages.
-
l_segments is a list of segment lengths and minimum or maximum curvatures rather than the segments themselves (
o_polyCurve~>segments) and is only set if l_method>0. If l_method=0 or in case of error, l_segments is set to nil
|
|
nil
|
An error occurred, the connector cannot be implemented.
|
Example
port1 = '(nil xy (-5 0) facet (nil angle 0 radius 1))
port2 = '(nil xy (0 1) facet (nil angle -90 radius 1))
ccCurveConnector(port1 port2 0.01)
> (nil connector cc@0x20fc10ea message "Method=6 Parameter=1.000000 Length=8.322122 MinRadius=0.145183")
Additional Information
Specifying Method Values
ccCurveConnector optionally accepts a calculation method number and a list of numeric values that is interpreted as a parameter value or as list of weights of the cost function depending on the value, which is between 0 and 9.
|
Method number
|
Result
|
|
0 or unspecified
|
All applicable methods are tried for all applicable values of parameters.
|
|
1
|
LineLine
|
|
2
|
SmallCircleLine
|
|
3
|
LargeCircleLine with varying clothoid length
|
|
4
|
SmallCircles with symmetric clothoids, 180 degree maximum turn at the ends and varying line length
|
|
5
|
SmallCircles with unsymmetric clothoids, 180 degree maximum turn at the ends and varying line length
|
|
6
|
LargeCircles with varying clothoid length
|
|
7
|
SmallCircles with symmetric clothoids, 360 degree maximum turn at the ends and varying line length
|
|
8
|
SmallCircles with unsymmetric clothoids, 360 degree maximum turn at the ends and varying line length.
|
|
9
|
LargeSmallCircle with 360 degree maximum turn at the ends.
|
Unspecified or 0 Method Value
If ?method is not specified or is set to 0, then all applicable methods are tried for all applicable values of parameters. In this case, if l_parameters is empty, then the result is the solution found first. If l_parameters is not empty, then it is assumed to contain list of four weights of cost function.
l_parameters = list(n_A n_B n_C n_D)
The result is the solution with the smallest value of the cost function defined by:
where k=1/R is the curvature and s is the arc length.
Non-zero Method Malue
If a non-zero method number is specified, then only this particular method is used. In this case, if l_parameters is non-empty, then the method is applied for only for one value of the parameter given by the first element of l_parameters. Otherwise, if l_parameters is empty, then multiple applicable values of the parameter are tried out until the first solution is found.
Related Topics
Curvy Core Connector Functions
Return to top