compartment positions and smarter edge routing [message #1772547] |
Tue, 12 September 2017 05:15  |
Eclipse User |
|
|
|
Hello,
i've currently implemented a graph which needs nodes with 2 different compartments which contain childs.
Is it possible to define a specific node placing or an orientation of the nodes? Is it possible to shorten long edges?
My layouting result is attached.
- Red lines are my opinion of shortened edge routing
- Blue lines with text are showing the two compartments
The two compartments are layouted horizontally, but i need them in vertical order. The small compartment (Compartment 1) in the right side should be above the other compartment (Compartment 2).
There is also a problem with the edge routing. In this example graph i've discovered 3 easy edges, which could be routed shorter. (3 red lines)
I'm using the layered layouting algorithm with the following properties (only regarding my problem):
LayeredMetaDataProvider.LAYERING_STRATEGY = LayeringStrategy.NETWORK_SIMPLEX
CoreOptions.EDGE_ROUTING = EdgeRouting.ORTHOGONAL
LayeredMetaDataProvider.MERGE_EDGES = true
LayeredMetaDataProvider.MERGE_HIERARCHY_EDGES = true
Thank you in advance.
[Updated on: Tue, 12 September 2017 05:19] by Moderator
|
|
|
|
|
|
|
Re: compartment positions and smarter edge routing [message #1773000 is a reply to message #1772683] |
Wed, 20 September 2017 02:12  |
Eclipse User |
|
|
|
This is quite a hard problem.
First of all,
my suggestion regarding the layout direction
is only partly a solution.
You require hierarchical layout (hierarchyHandlung: INCLUDE_CHILDREN)
as you have edges that cross multiple hierarchies.
In that case, only a single (global) layout direction is supported,
i.e. if you set it to RIGHT at the root node, the whole graph will be laid out rightwards.
The issue with the edges originates
from the fact that
edges are routed somewhat simultaneously
to the placement of nodes.
Horizontal red line:
This is an unfortunate
outcome originating
from the interplay
between crossing minimization (phase 3)
and node placement (phase 4).
The crossing minimization
decides the vertical order of the edge segments,
and cannot know about 'edge length',
since the subsequent node placement
phase decides which edge to draw straight
Vertical red lines:
Edges that cross the boundary of a
hierarchical node
are split using dummy ports.
The default behavior to position
these dummy ports is
to place ports
through which edges are "incoming" on the west side,
and "outgoing" ports on the east side.
This results in the elongated 'back-and-forth' edges.
We encountered both points before;
they surely are something that should be improved.
However, I'm not sure that we'll have the
time to look into these issues in the near future.
|
|
|
Powered by
FUDForum. Page generated in 0.03003 seconds