Table of Contents

Class EdgeRoutingContext

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

Context information for edge routing.

public class EdgeRoutingContext
Inheritance
EdgeRoutingContext
Inherited Members

Properties

DefaultNodeHeight

Default node height when not specified.

public double DefaultNodeHeight { get; init; }

Property Value

double

DefaultNodeWidth

Default node width when not specified.

public double DefaultNodeWidth { get; init; }

Property Value

double

Graph

The graph being routed.

public required Graph Graph { get; init; }

Property Value

Graph

NodePadding

Padding around nodes for routing. Uses Options.NodePadding if not explicitly set.

public double NodePadding { get; init; }

Property Value

double

Options

Routing options controlling behavior.

public EdgeRoutingOptions Options { get; init; }

Property Value

EdgeRoutingOptions

UserConstraints

User-defined waypoints that routers should respect in Guided mode. In Guided mode, the router should calculate a path that passes through these constraint points while avoiding obstacles.

public IReadOnlyList<Point>? UserConstraints { get; init; }

Property Value

IReadOnlyList<Point>

Remarks

This is typically populated from UserWaypoints when the edge's RoutingMode is Guided.

Methods

GetNodeBounds(Node)

Gets the bounding rectangle for a node.

public Rect GetNodeBounds(Node node)

Parameters

node Node

Returns

Rect

GetObstacles(params string[])

Gets all obstacle rectangles (nodes that edges should route around).

public IEnumerable<Rect> GetObstacles(params string[] excludeNodeIds)

Parameters

excludeNodeIds string[]

Node IDs to exclude from obstacles (typically source and target).

Returns

IEnumerable<Rect>