MSAGL - how to set orthogonal edges with simple corners

Lukáš Latinák 0 Reputation points


I'm trying to set it up Microsoft auto graph layout to calculate edge segments with simple 90°degree corner. But layout is still calculated with a lot of curve segments. This is my configuration:

GeometryGraph graph = new GeometryGraph();
graph.Nodes!.Add(new Node(CurveFactory.CreateRectangle(80, 60, new Point(100, 100)), null));
graph.Nodes!.Add(new Node(CurveFactory.CreateRectangle(80, 60, new Point(94, 80)), null));
graph.Edges!.Add(new Edge(graph.Nodes[0], graph.Nodes[1]) {
    Weight = 1,
    UserData = null
            new FastIncrementalLayoutSettings {
                EdgeRoutingSettings = {
                    EdgeRoutingMode = EdgeRoutingMode.Rectilinear,
                    CornerRadius = 90
                NodeSeparation = 50, // Minimum space between nodes
                AvoidOverlaps = true,
            }, null);
graph.Translate(new Point(-graph.Left, -graph.Bottom));

But result look likes this:

User's image

I need Orthogonal Edge with 90°degree corner. Any ideas how to update my settings please?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,486 questions
0 comments No comments
{count} votes