Class EdgeRoutingService
Provides edge routing services for a graph.
public class EdgeRoutingService
- Inheritance
-
EdgeRoutingService
- Inherited Members
Properties
BezierRouter
Gets the simple bezier router instance (no obstacle avoidance).
public IEdgeRouter BezierRouter { get; }
Property Value
DefaultNodeHeight
Default node height for routing calculations.
public double DefaultNodeHeight { get; set; }
Property Value
DefaultNodeWidth
Default node width for routing calculations.
public double DefaultNodeWidth { get; set; }
Property Value
DirectRouter
Gets the direct router instance.
public IEdgeRouter DirectRouter { get; }
Property Value
IsRoutingEnabled
Whether automatic routing is enabled.
public bool IsRoutingEnabled { get; set; }
Property Value
ManualRouter
Gets the manual router instance (user waypoints only).
public IEdgeRouter ManualRouter { get; }
Property Value
NodePadding
Padding around nodes for routing. Deprecated: Use Options.NodePadding instead.
public double NodePadding { get; set; }
Property Value
Options
Routing options controlling corner radius, edge spacing, etc.
public EdgeRoutingOptions Options { get; set; }
Property Value
OrthogonalRouter
Gets the orthogonal router instance.
public IEdgeRouter OrthogonalRouter { get; }
Property Value
SmartBezierRouter
Gets the smart bezier router instance (with obstacle avoidance).
public IEdgeRouter SmartBezierRouter { get; }
Property Value
Methods
DoesPathIntersectNodes(Graph, Edge, IReadOnlyList<Point>)
Checks if an edge path intersects any obstacles.
public bool DoesPathIntersectNodes(Graph graph, Edge edge, IReadOnlyList<Point> path)
Parameters
graphGraphedgeEdgepathIReadOnlyList<Point>
Returns
GetRouter(EdgeType)
Gets the appropriate router for an edge type.
public IEdgeRouter GetRouter(EdgeType edgeType)
Parameters
edgeTypeEdgeType
Returns
GetRouterByAlgorithm(string, EdgeType)
Gets a router by algorithm name.
public IEdgeRouter GetRouterByAlgorithm(string algorithm, EdgeType fallbackEdgeType = EdgeType.Bezier)
Parameters
algorithmstringThe algorithm to use (Direct, Orthogonal, SmartBezier, Manual).
fallbackEdgeTypeEdgeTypeEdge type to use for Auto selection.
Returns
GetRouterForEdge(Edge)
Gets the appropriate router for an edge, considering its routing mode.
public IEdgeRouter GetRouterForEdge(Edge edge)
Parameters
edgeEdgeThe edge to get a router for.
Returns
- IEdgeRouter
The appropriate router based on the edge's routing mode and type.
RouteAllEdges(Graph)
Routes all edges in a graph. Respects each edge's EdgeRoutingMode.
public Dictionary<string, IReadOnlyList<Point>> RouteAllEdges(Graph graph)
Parameters
graphGraph
Returns
RouteEdge(Graph, Edge)
Routes an edge through a graph, returning waypoints. Respects the edge's EdgeRoutingMode.
public IReadOnlyList<Point> RouteEdge(Graph graph, Edge edge)
Parameters
Returns
RouteEdgeWithRouter(Graph, Edge, IEdgeRouter)
Routes an edge using a specific router.
public IReadOnlyList<Point> RouteEdgeWithRouter(Graph graph, Edge edge, IEdgeRouter router)
Parameters
graphGraphThe graph containing the edge.
edgeEdgeThe edge to route.
routerIEdgeRouterThe router to use.