Profile Picture

Prevent edge/line corners from touching

Posted By Nick Walker 13 Years Ago
Author
Message
Nick Walker
Posted 13 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: Forum Members
Last Active: 13 Years Ago
Posts: 0, Visits: 1

In the attached image, the automatic layout engine is creating two edges that both have a 90 degree bend in them where the corners appear to touch (circled in red).  From the rendering, it is not obvious whether the lines cross or if there are two 90 degree corners.  I would like to create a small gap between these corners so it is apparent to the end user which line goes where.  Here is the code for the layout engine:

Dim layout As NLayeredTreeLayout = New NLayeredTreeLayout()
layout.Direction = LayoutDirection.TopToBottom
layout.OrthogonalEdgeRouting = True
layout.UseSingleBus = True
layout.VertexSpacing = 75
layout.LayerSpacing = 60
layout.BusBetweenLayers = True
layout.CompactBreadth = True
layout.ParentPlacement.Anchor = ParentAnchor.FirstChildCenter

 

I tried changing the padding on the shape when the edge is created, but that didn't have any affect.  How can I accomplish this?

Thanks,

--nick



Attachments
example.gif (131 views, 9.00 KB)
Nevron Support
Posted 13 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009

Hi Nick,

We recommend that you set the LayoutAlignment of the layout to Near. This will move the nodes up in your case and resolve the edge overlapping issue. Here’s the code you use to initialize the layout, just add the line in bold:

'Set up our layout engine
Dim layout As NLayeredTreeLayout = New NLayeredTreeLayout()
layout.Direction = LayoutDirection.TopToBottom
layout.OrthogonalEdgeRouting = True
layout.LayerAlignment = RelativeAlignment.Near
layout.UseSingleBus = True
layout.VertexSpacing = 75
layout.LayerSpacing = 60
layout.BusBetweenLayers = True



Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic