I was wondering if anyone has ever created a custom router that acts much like schematic capture programs where the connections are all at right angles. If you look at the youtube video (link is below) starting at 4m28s you can see how this works. How would I go about creating an orthogonal routing service like this? What I have done so far is below, which creates two points in the middle of the connection to allow this to sort of work, but it does not handle anything complex such as going around different shapes and adding additional points when needed. Any thoughts?
public class OrthogonalRouter : IRouter
> GetRoutePoints(IConnection connection, bool showLastLine)
> pointList = new List<
Point start = connection.StartPoint;
Point end = connection.EndPoint;
pointList.Add(new Point(start.X + (end.X - start.X) / 2, start.Y));
pointList.Add(new Point(start.X + (end.X - start.X) / 2, end.Y));