C

EdgeRouterEdgeDescriptor

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

Remarks

An EdgeRouterEdgeDescriptor instance can be specified individually for single edges with 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.
minimumEdgeDistance3.0
minimumFirstSegmentLength5.0
minimumLastSegmentLength10.0
minimumNodeCornerDistance3.0
monotonicPathRestrictionMonotonicPathRestrictions.NONE
No path restrictions are used.
preferredOctilinearSegmentLength30
routingStyleEdgeRouterRoutingStyle.ORTHOGONAL

See Also

Developer's Guide

API

edgeDescriptors

Members

No filters for this type

Constructors

Creates a new instance of an EdgeRouterEdgeDescriptor with the default settings.

Parameters

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.

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 to make curves more direct and smoother.

In relation to nodes, labels and other edges, the curved and non-curved edges take the same route, for example, both might cross a certain other edge or pass a certain node on its left side. If this property is disabled (default), the curved edges adhere to this.

If enabled, however, curved edges may shortcut and cross additional edges. This can yield to a direct and possibly smoother curved route. Still, intersections with nodes, node labels and edge labels are not allowed.

This setting only affects edges with a CURVED edge routing style. It is not possible to precisely predict the impact of this setting for the general case.

Property Value

true, if curved edges may shortcut 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

See Also

API
CURVED
Gets or sets how symmetric u-turn parts of 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.
This setting only affects edges with a CURVED edge routing style.

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

See Also

API
CURVED
Gets or sets whether or not this edge is routed directly to a group node's border if it connects the group node with one of its descendants.

When enabled, the edge will connect to the inner side of the group node's border instead of leaving the group node and connect from outside.

LayoutPortCandidates are supported for direct content edges, including fixed LayoutPortCandidates. Note that, for example, a candidate with direction TOP at the side of the enclosing group node means that the edge connects to the upper group node border from inside and never leaves the group node.

Edges that are completely overlapped by their source or target may require special attention during visualization. They can disappear when edges are clipped at their source and target.
This only applies to edges that connect to a group node from inside this group node. Furthermore, the edges must not be part of a bus structure defined via EdgeRouterBusDescriptor, see buses.
The capacity of NodePortCandidatess is not considered for direct group content edges. Capacity violations may occur when a content edge shares a set with other edges.

Property Value

true if the edge is routed directly, false otherwise

Default Value

The default value is: false

Sample Graphs

ShownSetting: false
Gets or sets the EdgeRouterCosts used for this edge.
Besides specifying a completely customized setting, the user can choose between four predefined optimization strategies: BALANCED_OPTIMIZATION, EDGE_BENDS_OPTIMIZATION, EDGE_CROSSINGS_OPTIMIZATION and EDGE_LENGTHS_OPTIMIZATION.

Property Value

the costs used for this edge

Throws

Exception ({ name: 'ArgumentError' })
if the given costs are null

See Also

Developer's Guide
API
BALANCED_OPTIMIZATION, EDGE_BENDS_OPTIMIZATION, EDGE_CROSSINGS_OPTIMIZATION, EDGE_LENGTHS_OPTIMIZATION
Gets or sets the list of intermediate IPoints that need to lie on the edge route.
The edge route is constructed such that all the specified intermediate points lie on the route in the order they are specified. The route can, but must not necessarily bend at the specified points.
This setting can be used to control the rough shape of an edge route. This also applies for grouped edges. If the grouped edges have a set of common intermediate points, the shared path will contain all these common intermediate points. This way, the actual style of the edge grouping can be influenced, i.e., it can be forced that grouped edges are routed together up to a certain location. Only afterwards they are allowed to split up. On the individual part they can again have other, individual intermediate points.
Intermediate points are only considered for edges that are not part of a bus structure defined via EdgeRouterBusDescriptor, see buses.
The algorithm tries to avoid edges with self-crossings, but when specifying intermediate points it cannot be guaranteed that no such crossings occur.
Consecutive points that are really close to each other can sometimes lead to low-quality results and should thus be avoided.
conversion

Property Value

the list of points representing intermediate routing points, or null if there are no intermediate points

Default Value

The default value is: null
The route does not obey any intermediate points.

See Also

API
buses
Gets or sets the maximum ratio between the horizontal/vertical part of a segment and the non-orthogonal, octilinear part.

When octilinear segments are added to an edge path, corners between horizontal and vertical segments are cut and replaced by the new segment. This ratio describes the cutting points on a segment. If it is zero, the route stays orthogonal. The value cannot be larger than 0.5 because there may be another non-orthogonal segment at the other side of the segment. For long orthogonal segments the length of the octilinear segment is determined by the value of property preferredOctilinearSegmentLength.

The maximum octilinear segment ratio must be between 0 and 0.5.

This setting applies only for edges with OCTILINEAR routing.

Property Value

the maximum octilinear segment ratio

Throws

Exception ({ name: 'ArgumentError' })
if the maximum ratio is negative or greater than 0.5

Default Value

The default value is: 0.3

Sample Graphs

ShownSetting: Ratio 0.3, the octilinear parts from left and right both cover a third of the horizontal distance

See Also

Developer's Guide
API
OCTILINEAR, preferredOctilinearSegmentLength
Gets or sets the minimum distance between a pair of edges.
The minimum distance should be greater than or equal to 0. If a negative value is given as input, the default value, i.e., 3.0, will be used instead.

Property Value

the minimum distance between a pair of edges

Default Value

The default value is: 3.0

Sample Graphs

ShownSetting: Minimum edge to edge distance 3.0

See Also

Developer's Guide
Gets or sets the minimum length of the first segment of the edge path (at the source node).
The minimum length should be greater than or equal to 0. If a negative value is given as input, the default value, i.e., 5.0, will be used instead.
The final segment length also depends on the used grid size. If the grid is larger than the specified minimum length, then the grid size defines the actual minimum.
The first segment length starts, if present, at the margin of the source node.
The first segment length may be violated for curved edge routes when using source connection style ORGANIC.

Property Value

the minimum length of the first segment

Default Value

The default value is: 5.0

Sample Graphs

ShownSetting: Minimum first segment length 10

See Also

Developer's Guide
Gets or sets the minimum length of the last segment of the edge path (at the target node).
The minimum length should be greater than or equal to 0. If a negative value is given as input, the default value, i.e., 10.0, will be used instead.
The final segment length also depends on the used grid size. If the grid is larger than the specified minimum length, then the grid size defines the actual minimum.
The last segment length ends, if present, at the margin of the target node.
The last segment length may be violated for curved edge routes when using target connection style ORGANIC.

Property Value

the minimum length of the last segment

Default Value

The default value is: 10.0

Sample Graphs

ShownSetting: Minimum last segment length 10

See Also

Developer's Guide
Gets or sets the minimum distance that the edge should maintain from node corners when entering or leaving the node.
The minimum distance should be greater than or equal to 0. If a negative value is given as input, the default value, i.e., 3.0, will be used instead.

Property Value

the minimum distance the edge should maintain from node corners

Default Value

The default value is: 3.0

Sample Graphs

ShownSetting: Minimum node corner distance 3.0

See Also

Developer's Guide
Gets or sets the monotonic path restrictions that should be applied.

Monotonic path restrictions imply that (ideally) the vertical and/or horizontal segments of an edge path are directed from the source node towards the target node without ever changing their direction back towards the source node.

If an unknown restriction is specified, NONE will be used instead.

conversion

Property Value

one of the predefined monotonic path restrictions

Default Value

The default value is: MonotonicPathRestrictions.NONE
No path restrictions are used.

See Also

Developer's Guide
Gets or sets the preferred length of non-orthogonal, octilinear segments.

If there is not enough space to use this preferred length, the segments may also be shorter.

The preferred length of non-orthogonal, octilinear segments has to be greater than or equal to 0.

This setting applies only for edges with OCTILINEAR routing.

Property Value

the preferred length of non-orthogonal, octilinear segments

Throws

Exception ({ name: 'ArgumentError' })
if the preferred octilinear segment length is negative

Default Value

The default value is: 30

Sample Graphs

ShownSetting: Preferred octilinear segment length 10

See Also

Developer's Guide
API
OCTILINEAR, maximumOctilinearSegmentRatio
Gets or sets the routing style for the edge associated with this descriptor.
conversion

Property Value

one of the predefined routing styles

Default Value

The default value is: EdgeRouterRoutingStyle.ORTHOGONAL

See Also

Developer's Guide
Gets or sets the style which determines how curved edge paths connect at the source side of the edge.
conversion

Property Value

one of the predefined curve connection styles

Sample Graphs

ShownSetting: KEEP_PORT setting at source and target side - normal ports by the routing algorithm

See Also

API
targetCurveConnectionStyle
Gets or sets the style that determines how edge paths connect at the target side of the edge.
conversion

Property Value

one of the predefined curve connection styles

Sample Graphs

ShownSetting: KEEP_PORT setting at source and target side - normal ports by the routing algorithm

See Also

API
sourceCurveConnectionStyle

Methods

Creates a copy of this EdgeRouterEdgeDescriptor instance.