Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

How to extract edge routing from OrthoLayout

41 views
Skip to first unread message

Karel V.

unread,
Mar 5, 2025, 2:19:41 PMMar 5
to ogdf
Hello,

is there a way to extract phase 3 (routing of edges) from OrthoLayout::call?

I mean, can we make the call preserve node positions (x, y) and route edges without re-positioning nodes?

Normally, node width and height attributes (w, h) are preserved, and node positions (x, y) are computed along with edge routing.

This makes perfect sense for a full layout, but what if we already have a good layout and only want to re-route edges e.g. after moving one node using a mouse (in an interactive application)?

I know there are JavaScript solutions for that, e.g. JointJS, but I am looking for a C++ library/framework, and OGDF looks like a usable candidate, except it is not interactive, or is it?

I was hoping to be able to "extract" edge routing by commenting out some of the code in OrthoLayout::call, but apparently it is not that simple because of node expansions, etc.

Thanks, anyone, for your suggestions.

Karel V.

Karel V.

unread,
Mar 5, 2025, 2:23:50 PMMar 5
to ogdf
P.S. - Please do not even mention libavoid, that is C++ but it turned out to be a bit of a disappointment for me.

Dagobert Smart

unread,
Mar 17, 2025, 7:17:37 AMMar 17
to ogdf
Hello Karel,

unfortunately I don't think that OGDF provides any out-of-the-box functionality for edge routing like that. As you correctly point out, you could try to implement it yourself/try to extract it from the OrthoLayout, but if that is too difficult, OGDF can probably not really help you here. I'm sadly also not familiar with other C++ libraries that would provide edge routing like that.

Best regards,
Dagobert
Reply all
Reply to author
Forward
0 new messages