Skip to main content



      Home
Home » Modeling » Eclipse Layout Kernel » Overlapping edges with straight edges in Layered Algorithm
Overlapping edges with straight edges in Layered Algorithm [message #1817287] Tue, 19 November 2019 20:45 Go to next message
Eclipse UserFriend
Hi,
I'm using the Layered algorithm to set a simple flow diagram with straight edges directly to a node but the edges is overlapping with another node.

Below is an example of a diagram that I have. I only used the node coordinates and ignored the edge coordinates after the algorithm layouts it.

Example graph node:
val graph = createGraph => [
            identifier = 'root'
        ]

        val start = graph.createNode => [
            width = 80
            height = 80
            identifier = 'start'
        ]

        val confirm = graph.createNode => [
            width = 80
            height = 80
            identifier = 'confirm'
        ]

        val finish = graph.createNode => [
            width = 80
            height = 80
            identifier = 'finish'
        ]
        start.createSimpleEdge(finish)
        start.createSimpleEdge(confirm)
        confirm.createSimpleEdge(finish)


Expected
index.php/fa/36784/0/

Actual
index.php/fa/36785/0/

[Updated on: Tue, 19 November 2019 21:51] by Moderator

Re: Overlapping edges with straight edges in Layered Algorithm [message #1817300 is a reply to message #1817287] Wed, 20 November 2019 03:27 Go to previous messageGo to next message
Eclipse UserFriend
Such a result shouldn't happen with a default configuration (or any configuration, for that matter). Did you by any change happen to forget to apply y coordinates of nodes?

If not I guess we'll need more information. Do you apply layout from within Eclipse?
Re: Overlapping edges with straight edges in Layered Algorithm [message #1817353 is a reply to message #1817300] Wed, 20 November 2019 19:14 Go to previous messageGo to next message
Eclipse UserFriend
Hi, Christoph.
No. I used default config for that result.
I was able to get a better result with splines for edge routing.

index.php/fa/36795/0/

[Updated on: Wed, 20 November 2019 19:15] by Moderator

Re: Overlapping edges with straight edges in Layered Algorithm [message #1817389 is a reply to message #1817353] Thu, 21 November 2019 09:03 Go to previous messageGo to next message
Eclipse UserFriend
That seems very strange to me. Are you using ELK within Eclipse or in another context?
Re: Overlapping edges with straight edges in Layered Algorithm [message #1817474 is a reply to message #1817287] Fri, 22 November 2019 16:39 Go to previous message
Eclipse UserFriend
Kevin King Agatep wrote on Wed, 20 November 2019 01:45
I only used the node coordinates and ignored the edge coordinates after the algorithm layouts it.

A colleague made me aware of the fact that I overlooked this part of your original post. The layout computed by the layout algorithm is almost certainly correct, but it decided to route the edge (Start -> Finish) around the Confirm node by introducing bend points. Since you don't apply the bend points, the edge simply crosses the Confirm node.

Bottom line: You cannot expect the layout to be correct if you throw away half of it. ;)

There is no way to configure the layout algorithm to produce node placements that guarantee that direct connections won't cause crossings. That it works for you with spline routing is probably just by chance.
Previous Topic:ELK Use with GmF
Next Topic:Incremental layout
Goto Forum:
  


Current Time: Thu Jun 19 09:45:44 EDT 2025

Powered by FUDForum. Page generated in 0.04660 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top