Table of Contents

Class EdgeRoutingService

Namespace
FlowGraph.Core.Routing
Assembly
FlowGraph.Core.dll

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

IEdgeRouter

DefaultNodeHeight

Default node height for routing calculations.

public double DefaultNodeHeight { get; set; }

Property Value

double

DefaultNodeWidth

Default node width for routing calculations.

public double DefaultNodeWidth { get; set; }

Property Value

double

DirectRouter

Gets the direct router instance.

public IEdgeRouter DirectRouter { get; }

Property Value

IEdgeRouter

IsRoutingEnabled

Whether automatic routing is enabled.

public bool IsRoutingEnabled { get; set; }

Property Value

bool

ManualRouter

Gets the manual router instance (user waypoints only).

public IEdgeRouter ManualRouter { get; }

Property Value

IEdgeRouter

NodePadding

Padding around nodes for routing. Deprecated: Use Options.NodePadding instead.

public double NodePadding { get; set; }

Property Value

double

Options

Routing options controlling corner radius, edge spacing, etc.

public EdgeRoutingOptions Options { get; set; }

Property Value

EdgeRoutingOptions

OrthogonalRouter

Gets the orthogonal router instance.

public IEdgeRouter OrthogonalRouter { get; }

Property Value

IEdgeRouter

SmartBezierRouter

Gets the smart bezier router instance (with obstacle avoidance).

public IEdgeRouter SmartBezierRouter { get; }

Property Value

IEdgeRouter

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

graph Graph
edge Edge
path IReadOnlyList<Point>

Returns

bool

GetRouter(EdgeType)

Gets the appropriate router for an edge type.

public IEdgeRouter GetRouter(EdgeType edgeType)

Parameters

edgeType EdgeType

Returns

IEdgeRouter

GetRouterByAlgorithm(string, EdgeType)

Gets a router by algorithm name.

public IEdgeRouter GetRouterByAlgorithm(string algorithm, EdgeType fallbackEdgeType = EdgeType.Bezier)

Parameters

algorithm string

The algorithm to use (Direct, Orthogonal, SmartBezier, Manual).

fallbackEdgeType EdgeType

Edge type to use for Auto selection.

Returns

IEdgeRouter

GetRouterForEdge(Edge)

Gets the appropriate router for an edge, considering its routing mode.

public IEdgeRouter GetRouterForEdge(Edge edge)

Parameters

edge Edge

The 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

graph Graph

Returns

Dictionary<string, IReadOnlyList<Point>>

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

graph Graph
edge Edge

Returns

IReadOnlyList<Point>

RouteEdgeWithRouter(Graph, Edge, IEdgeRouter)

Routes an edge using a specific router.

public IReadOnlyList<Point> RouteEdgeWithRouter(Graph graph, Edge edge, IEdgeRouter router)

Parameters

graph Graph

The graph containing the edge.

edge Edge

The edge to route.

router IEdgeRouter

The router to use.

Returns

IReadOnlyList<Point>