Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » How to route Connections around nodes instead of across (GEF5)
How to route Connections around nodes instead of across (GEF5) [message #1770362] Thu, 10 August 2017 12:04 Go to next message
Thomas Oberle is currently offline Thomas OberleFriend
Messages: 11
Registered: April 2017
Junior Member
Hello,

the standard OrthogonalRouter of GEF5 is routing across the Nodes in my GEF Project. (See attached picture)

So I want to implement my own IConnectionRouter to route around the Nodes.
Is there some kind of built-in function to route around nodes or to get me the position of all nodes to route around? Or do I have to gather the positions and dimensions of all nodes by myself?

Or is there any other way to solve my problem which I don´t see?

Thanks,
Thomas
  • Attachment: routing.png
    (Size: 5.04KB, Downloaded 192 times)
Re: How to route Connections around nodes instead of across (GEF5) [message #1770384 is a reply to message #1770362] Thu, 10 August 2017 15:42 Go to previous messageGo to next message
Matthias Wienand is currently offline Matthias WienandFriend
Messages: 230
Registered: March 2015
Senior Member
Hi Thomas,

as you already know, the OrthogonalRouter does not avoid obstacles. It does only insert way points so that all segments between way points are either horizontal or vertical.

GEF 5.0.0 does not provide such functionality out-of-the-box, however, GEF Legacy Draw2D provides ShortestPathRouter, which does exactly that: http://help.eclipse.org/kepler/index.jsp?topic=%2Forg.eclipse.draw2d.doc.isv%2Freference%2Fapi%2Forg%2Feclipse%2Fdraw2d%2Fgraph%2FShortestPathRouter.html

As an alternative, you could let a layout algorithm compute the way points so that obstacles are avoided, e.g. using Graphviz or ELK (Eclipse Layout Kernel), which might be a good idea, anyway.

Best regards,
Matthias

[Updated on: Fri, 11 August 2017 14:11]

Report message to a moderator

Re: How to route Connections around nodes instead of across (GEF5) [message #1770442 is a reply to message #1770384] Fri, 11 August 2017 12:51 Go to previous message
Thomas Oberle is currently offline Thomas OberleFriend
Messages: 11
Registered: April 2017
Junior Member
Hi Matthias,

thanks for the quick answer :)
I will have a look at the solution with the layout algorithm.

Best regards,
Thomas
Previous Topic:Documentation about gef4/gef5
Next Topic:[GEF5] How to determine on which VisualPart DragAndDrop gesture is ended?
Goto Forum:
  


Current Time: Sat Apr 27 03:29:02 GMT 2024

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

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

Back to the top