Microsoft auto graph layout - how to set orthogonal edges with simple corners

25 Views Asked by At

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
});
        LayoutHelpers.CalculateLayout(graph,
            new FastIncrementalLayoutSettings {
                EdgeRoutingSettings = {
                    EdgeRoutingMode = EdgeRoutingMode.Rectilinear,
                    CornerRadius = 90
                },
                NodeSeparation = 50, // Minimum space between nodes
                AvoidOverlaps = true,
                
            }, null);
graph.UpdateBoundingBox();
graph.Translate(new Point(-graph.Left, -graph.Bottom));

But result look likes this: enter image description here

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

0

There are 0 best solutions below