C

CurveRoutingEdgeDescriptor

This class is used by CurveRoutingStage to provide routing details for the edges of the graph.
Inheritance Hierarchy

Remarks

A CurveRoutingEdgeDescriptor instance can be specified individually for single edges via edgeDescriptors.

This class is designed such that it allows future additions of new getter methods.

Default Values of Properties

NameDefaultDescription
curveShortcutsfalse
Curved edges do not shortcut.
curveUTurnSymmetry0
The symmetry of u-turns is not specifically optimized.
minimumEdgeDistance10.0
minimumFirstSegmentLength5.0
minimumLastSegmentLength10.0
minimumNodeToEdgeDistance10.0

See Also

API

CurveRoutingStage, edgeDescriptors

Members

No filters for this type

Properties

Gets or sets whether or not the points of the resulting edge path represent cubic bezier control points.
  • Disabled (default): Each point of the path represents a normal polyline bend point.
  • Enabled: Four consecutive points p1, p2, p3, p4 of the resulting edge path need to be interpreted such that p1 is the start point of the cubic bezier curve, p4 is the end point of it and p2, p3 are the two intermediate control points. If p4 is not the last point of the edge path it is at the same time the start point of the next curve. For example, points p1, p2, p3, p4, p5, p6, p7 form a path that consists of two curves: the curve defined by p1, p2, p3, p4 and the curve defined by p4, p5, p6, p7.
This feature is useful when the visualization of the edge draws bezier curves instead of polyline paths.
final

Property Value

true if the bends are interpreted as cubic bezier control points, false otherwise

Default Value

The default value is: false
Each point is a normal polyline bend point.
Gets or sets whether or not curved edges may shortcut and introduce additional edge crossings if that makes the curves more direct and smoother.
If enabled, curved edges may shortcut and cross additional edges. This can yield a direct and possibly smoother curved route. Still, intersections with nodes, node labels, and edge labels are not allowed. Note that it is not possible to precisely predict the impact of this setting for the general case.
If symmetric u-turns are preferred, enabling this property may be beneficial. For example, creating a perfectly symmetric u-turn curve may require crossing an additional edge.
final

Property Value

true, if curved edges may shortcut and introduce additional edge crossings in favor of more direct curves, false, otherwise

Default Value

The default value is: false
Curved edges do not shortcut.

Sample Graphs

ShownSetting: Curve shortcuts are disabled
Gets or sets how symmetric u-turn parts of the curved routes should preferably be.

If this property is greater than zero, the algorithm tries to achieve a more symmetric path for 180-degree turns (u-turns) by specifically handling them. Symmetric turns likely require more space compared to more direct variants. The value of this property must be within interval [0,1], where a higher value indicates more emphasis on symmetry and lower values that symmetry is not important.

This setting influences the symmetry of a single curved route and does not affect symmetry of multiple curves in relation to each other.

The difference to value 0 might be perceived as being greater than the difference between other values. The reason is that with 0, u-turns are not handled specifically at all.
final

Property Value

the symmetry preference for u-turns of curved edges within interval [0,1], where a higher value means that symmetric turns are preferred

Throws

Exception ({ name: 'ArgumentError' })
if the given symmetry value is negative or larger than one

Default Value

The default value is: 0
The symmetry of u-turns is not specifically optimized.

Sample Graphs

ShownSetting: 0.0
Gets or sets the minimum distance to segments belonging to other edges.
The minimum distance must be greater than or equal to 0.
The minimum edge distance influences how the curves are created. If this distance is already violated in the result of the coreLayout, it has no effect on the curved routes, i.e. the curved route may also violate it.
final

Property Value

the minimum distance between this curved edge and other edges

Throws

Exception ({ name: 'ArgumentError' })
if the minimum distance is negative

Default Value

The default value is: 10.0
Gets or sets the minimum length of the first segment of the edge path (at the source node).
The minimum length must be greater than or equal to 0.
The first segment length starts, if present, at the margin of the source node.
The resulting edge routes have nicer curves when the minimum length is smaller than the actual segment. Therefore, it is recommended to configure the coreLayout of CurveRoutingStage to have a larger minimum first segment length.
The first segment length is ignored when using source connection style ORGANIC.
final

Property Value

the minimum length of the first segment

Throws

Exception ({ name: 'ArgumentError' })
if the minimum length of the first segment is negative

Default Value

The default value is: 5.0

Sample Graphs

ShownSetting: Minimum first segment length 5
Gets or sets the minimum length of the last segment of the edge path (at the target node).

The minimum length must be greater than or equal to 0.

If the minimum length is zero, the curved route may end with a non-orthogonal last segment such that the port location provided by the coreLayout may also be changed.

The last segment length ends, if present, at the margin of the target node.
The resulting edge routes have nicer curves when the minimum length is smaller than the actual segment. Therefore, it is recommended to configure the coreLayout of CurveRoutingStage to have a larger minimum last segment length.
The last segment length is ignored when using target connection style ORGANIC.
final

Property Value

the minimum length of the last segment

Throws

Exception ({ name: 'ArgumentError' })
if the minimum length of the last segment is negative

Default Value

The default value is: 10.0

Sample Graphs

ShownSetting: Minimum last segment length 10
Gets or sets the minimum distance to nodes.
The minimum distance must be greater than or equal to 0.
The minimum node distance influences how the curves are created. If this distance is already violated in the result of the coreLayout, it has no effect on the curved routes, i.e. the curved route may also violate it.
final

Property Value

the minimum distance between this curve edge and nodes

Throws

Exception ({ name: 'ArgumentError' })
if the minimum distance is negative

Default Value

The default value is: 10.0
Gets or sets the style which determines how curved edge paths connect at the source side of the edge.
conversionfinal

Property Value

one of the predefined curve connection styles

Default Value

The default value is: CurveConnectionStyle.KEEP_PORT
The source port and the first segment is kept.

See Also

API
targetCurveConnectionStyle, KEEP_PORT, ORGANIC
Gets or sets the style which determines how curved edge paths connect at the target side of the edge.
conversionfinal

Property Value

one of the predefined curve connection styles

Default Value

The default value is: CurveConnectionStyle.KEEP_PORT
The target port and the last segment is kept.

See Also

API
sourceCurveConnectionStyle, KEEP_PORT, ORGANIC

Methods

Creates a copy of this CurveRoutingEdgeDescriptor instance.
final

Return Value

CurveRoutingEdgeDescriptor
a copy of this CurveRoutingEdgeDescriptor instance