Class SmartBezierRouter
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
Margin
Minimum distance to maintain from obstacles.
public double Margin { get; set; }
Property Value
MinPortOffset
Minimum horizontal offset from port before routing can turn.
public double MinPortOffset { get; set; }
Property Value
Methods
Route(EdgeRoutingContext, Edge)
Calculates waypoints for an edge to route around obstacles.
public IReadOnlyList<Point> Route(EdgeRoutingContext context, Edge edge)
Parameters
contextEdgeRoutingContextThe routing context containing graph information.
edgeEdgeThe edge to route.
Returns
- IReadOnlyList<Point>
A list of waypoints (including start and end points).