Allows customization of various aspects of the link routing algorithm.
Namespace: MindFusion.Diagramming.Wpf
Assembly: MindFusion.Diagramming.Wpf
C# Copy Code |
---|
public class RoutingOptions : RoutingOptions |
Visual Basic Copy Code |
---|
Public Class RoutingOptions |
Use the RoutingOptions member of the Diagram class to access the sole instance of this class.
WpfDiagram uses a cost minimization algorithm to route links between nodes. For each link, there is a routing grid built for the area that encloses the link and its origin and destination nodes. The size of the grid pieces is set by GridSize. Each piece of the grid is marked as an obstacle if it intersects an Obstacle node. Some cost values are assigned to the remaining pieces, depending on how distant they are from nodes and other links.
That algorithm evaluates possible paths across the routing grid aiming to find one that has a minimal cost. The values of LengthCost, TurnCost, CrossingCost and NodeVicinityCost are added to the total cost of a route and have a great influence over the shape of the chosen path.
The StartOrientation and EndOrientation properties specify the orientation of the first and last segments of routed links, and Anchoring specifies whether link ends should be aligned to the anchor points defined for nodes.
System.Object
MindFusion.Diagramming.Wpf.RoutingOptions
WpfDiagram Programmer's Guide | © 2024 MindFusion |