Table of Contents

Class SmartBezierRouter

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

Routes edges around obstacles using smooth curves with obstacle avoidance. Generates waypoints that can be used to create multi-segment bezier curves.

public class SmartBezierRouter : IEdgeRouter
Inheritance
SmartBezierRouter
Implements
Inherited Members

Remarks

SmartBezierRouter extends basic bezier routing with obstacle avoidance:

  • Detects nodes blocking the direct path
  • Routes around obstacles going above or below based on available space
  • Maintains smooth curves through waypoints

For simple bezier curves without obstacle avoidance, use BezierRouter.

Properties

Instance

Singleton instance with default settings.

public static SmartBezierRouter Instance { get; }

Property Value

SmartBezierRouter

Margin

Minimum distance to maintain from obstacles.

public double Margin { get; set; }

Property Value

double

MinPortOffset

Minimum horizontal offset from port before routing can turn.

public double MinPortOffset { get; set; }

Property Value

double

Methods

Route(EdgeRoutingContext, Edge)

Calculates waypoints for an edge to route around obstacles.

public IReadOnlyList<Point> Route(EdgeRoutingContext context, Edge edge)

Parameters

context EdgeRoutingContext

The routing context containing graph information.

edge Edge

The edge to route.

Returns

IReadOnlyList<Point>

A list of waypoints (including start and end points).