documentationfor yFiles for HTML 3.0.0.2

OrganicEdgeRouter

This edge routing algorithm applies organic routes to the edges of the graph.

Inheritance Hierarchy
LayoutStageBase
OrganicEdgeRouter
Implemented Interfaces

Remarks

Layout Style

Edges are routed organically, i.e. in smooth curves around the nodes observing a minimumDistance to the nodes.

During the routing process, the positions of the nodes are considered to be fixed and the router will not modify their locations or their sizes in any way.

The edge routing algorithm can be applied whenever edge paths should avoid crossing any nodes in organic or cyclic layout styles.

Concept

The edge routing algorithm uses a force-directed approach to calculate the edge paths. Nodes are considered to be repulsive forces while edges will try to become as short as possible.

Each edge is routed separately and is influenced by the nodes in a certain area around it. The algorithm will add bends to the edge path that are placed by balancing the forces.

The quality of the result highly depends on how much space there is between the nodes. More precisely, the distance between each pair of nodes should be at least twice the specified minimumDistance. If it is not necessary that the nodes keep their locations, this can be ensured by enabling allowMovingNodes.

Features

The property minimumDistance will make edges keep a custom distance to the nodes. However, if there is not enough space between the nodes, this distance may be undershot (i.e. edges will be closer to nodes).

OrganicEdgeRouter is able to reuse existing bends. Edges will contain those bends along with other bends added by the layout algorithm. Another feature allows to consider bends such that they influence the route finding, however, their absolute location is not kept (see considerExistingBends).

This layout algorithm handles port placement constraints by applying the portPlacementStage as a postprocessing step.

This edge routing algorithm is realized as a ILayoutStage which can be applied to a graph directly or using a coreLayout.

Default Values of Properties

allowEdgeNodeOverlapstrueEdges are allowed to cross nodes.
allowMovingNodesfalseNodes are not moved.
considerExistingBendsfalseBends in the input graph are not considered for edge routing.
keepExistingBendsfalseBends coordinates in the input graph are not kept fixed.
minimumDistance10
routeAllEdgesfalseOnly edges being too close to nodes are rerouted.

Type Details

yFiles module
algorithms

See Also

Constructors

Properties

Methods