Prevent edge/line corners from touching


Author
Message
Nick Walker
Nick Walker
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
Posts: 2, 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 (144 views, 9.00 KB)
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K

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


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search