Skip to main content



      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 08:04 Go to next message
Eclipse UserFriend
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 255 times)
Re: How to route Connections around nodes instead of across (GEF5) [message #1770384 is a reply to message #1770362] Thu, 10 August 2017 11:42 Go to previous messageGo to next message
Eclipse UserFriend
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 10:11] by Moderator

Re: How to route Connections around nodes instead of across (GEF5) [message #1770442 is a reply to message #1770384] Fri, 11 August 2017 08:51 Go to previous message
Eclipse UserFriend
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: Sun Apr 20 19:08:38 EDT 2025

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

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

Back to the top