This class can be used to distribute overlapping edge segments of orthogonally routed edges.

Namespace: yWorks.yFiles.Layout.Router
Assembly: yWorks.yFilesSilverlight.Algorithms (in yWorks.yFilesSilverlight.Algorithms.dll) Version: 2.4.0.0

Syntax

C#
public class OrthogonalSegmentDistributionStage : AbstractLayoutStage
Visual Basic
Public Class OrthogonalSegmentDistributionStage _ Inherits AbstractLayoutStage

Remarks

This class can be used to distribute overlapping edge segments of orthogonally routed edges. The edge segments will then be distributed in their so called channel according to the given settings. The channel in which the segments can be distributed is defined by the surrounding graph elements, which will form borderlines for the channel.

The distance between the distributed edge segments can be determined by method PreferredDistance .

The edge segments can also be forced to be distributed on a given grid ( GridEnabled ) whose origin ( SetGridOffset(Double, Double) ) and grid width ( GridWidth ) can be set.

Note: this LayoutStage is not capable of moving nodes. If the set conditions like preferred distance or the grid width can not be satisfied, for example, because there is not enough space inside the channel, the set values will by default be adjusted (reduced). Concerning the grid, it will be divided by 2 until all segments will fit. The preferred distance will be adjusted so that the maximum possible distance near the given value will be taken. Also, segments that are directly at a node (source or target) will be distributed, so that they are placed equidistant all along the node's side.

Settings GridWidthAdjustable and PreferredDistanceAdjustable can be used to force the algorithm to distribute the edges with the exact given distances. If the segments will not fit into the given channel, they then will not be distributed at all. So there is a guarantee that they will match the settings if they are routed.

LockFirstAndLastSegment can be used to guarantee that the first and last segment of an edge (connected to source or target), won't be distributed. So ports can easily be kept without setting explicit strong port constraints or fixed PortCandidates.

The algorithm will not distribute the segments, whose end connect to a node at a strong port constraint or fixed port candidate.

Inheritance Hierarchy

System..::..Object
  yWorks.yFiles.Layout..::..AbstractLayoutStage
    yWorks.yFiles.Layout.Router..::..OrthogonalSegmentDistributionStage

See Also