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

ccWaypointConnector

ccWaypointConnector(
l_port1   
l_port2   
l_points  
n_rmin
n_gamma   
) 
=> l_connector / nil

Description

(Virtuoso Photonics Option) Creates a waypoint connector between the specified points with the given minimum curvature radius and the given portion (gamma) of the circular bending angle in the overall bending angle.
If both ports are nil, then at least three waypoints must be specified as input. The connector starts at the first waypoint with the tangent given by the line between the first two waypoints and ends at the last waypoint with the tangent given by the line between the last two waypoints.
If both ports are not nil, they specify the initial and the final points, tangents, and radiuses of the connector.
If no waypoints are specified, the start and the end ports are connected by a curve connector. If a single waypoint is specified, it is connected to the start and the end ports by a pair of curve connectors with zero curvature at the waypoint. If two waypoints are specified, they are connected to each other with a straight line and to the start and the end ports with a pair of curve connectors with zero curvatures at the waypoints. If three or more waypoints are specified, they are connected to each other by a waypoint connector like in the case where both ports are nil and to the start and the end ports by a pair of curve connectors with zero curvature at the waypoints.
It is an error to only specify one port as nil and the other port as not nil.
The waypoint connector consists of a sequence of lines, circles, and clothoids. If the calculation of the waypoint connector can only be partially completed, then the result will only contain segments between the starting point and the point where the calculation failed.

Arguments

l_port1

list(nil 'xy l_point 'facet l_facet) | nil

Starting port for the connector.

Unlike ccCurveConnector, ports in waypoint connector are allowed to be simultaneously set to nil. However, a nil port specified with a non-nil port will result in an error.

l_port2

list(nil 'xy l_point 'facet l_facet) | nil

Ending port for the connector.

Unlike in ccCurveConnector, ports in waypoint connector are allowed to be simultaneously set to nil. However, a nil port + non-nil port will result in an error.

l_point

list(n_x n_y)

A two-dimensional point.

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_points

(l_point...)

A list of two-dimensional points.

n_rmin

Minimally allowed curvature radius.

n_gamma

A numeric value between 0 and 1, indicating a ratio of the circular bending angle to the overall bending angle.

  • When the value is 1, each bend of the connector consists of a single circular arc.
  • When the value is 0, each bend of the connector consists of two clothoids.

Value Returned

l_connector

list(nil 'connector o_polyCurve 'message t_message ['incomplete t_incomplete])

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.
  • If t_incomplete is not nil, then the connector only contains segments between the starting point and the point where the calculation failed.
  • t_message is a string holding the debug printouts and error messages.
  • t_incomplete is a string describing why connector can only be partially calculated. If the complete connector could be calculated, the value is nil.

nil

An error occurred, the connector cannot be implemented.

Example

port1 = '(nil xy ( 100  100) facet (nil angle  60 radius 0))
port2 = '(nil xy (1000 -100) facet (nil angle 120 radius 0))
waypoints = '((500 300))
rmin = 20
gamma = 1
wp=ccWaypointConnector(port1 port2 waypoints rmin gamma)
=> (nil connector cc@0x196cc479 message "Method=1 Method=1 Length=1496.947836 MinRadius=71.306912")
p = ccCreatePath(geGetEditCellView() list("y1" "drawing") wp->connector->segments ?defaultWidth 0.5)
ccGenFigs(p)

Related Topics

Curvy Core Connector Functions


Return to top
 ⠀
X