Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » ShortestPathConnectionRouter with GMF components
ShortestPathConnectionRouter with GMF components [message #775808] Fri, 06 January 2012 17:58 Go to next message
Alex Kravets is currently offline Alex KravetsFriend
Messages: 554
Registered: November 2009
Senior Member

In my GEF application I use ShortestPathConnectionRouter and wanted to employ some of graphical components from GMF to make connections more smooth on the bends. Specifically I am using PolylineConnectionEx. When I set smoothness of connection - poly.setSmoothness(PolylineConnectionEx.SMOOTH_LESS); the lines don't look as smooth as I'd like - they are rigid on bends.

I looked at GMF routers such as RectilinearRouter and bends look very smooth, however this router implments OrthogonalRouter interface and PolylineConnectionEx's method isRoundingBendpoints() requires that routers in OrthogonalRouter. I repurposed ShortestPathConnectionRouter to implement OrthogonalRouter in order to make connection bends more smooth:

Why does rounding bendpoints algorithm needs router to be OrthogonalRouter and it is possible to achieve even more smoothness with ShortestPathConnectionRouter too look something like this?


[Updated on: Fri, 06 January 2012 17:59]

Report message to a moderator

Re: ShortestPathConnectionRouter with GMF components [message #1073185 is a reply to message #775808] Wed, 24 July 2013 09:26 Go to previous messageGo to next message
Erik Baumbart is currently offline Erik BaumbartFriend
Messages: 2
Registered: July 2013
Junior Member
I used the code you offered for the pipe connections (from a differend thread in this forum) and added the capability to draw the spline away from the node figure.

It surely looks cool but selecting a pipe connection is difficult for the user. Now I'm also looking into PolylineConnectionEx edges.

Some people at the University of Kiel seem to have nicely bend edges based on PolylineConnectionEx.

This is the code example: http: //

Here is the SVN of the whole project: http: //

Some tiny screen shots on the project home page: http: //

Maybe that would be the way to go. Once I get it running, I might be able to integrate your line calculation into a subclass of PolylineConnectionEx.

edit: It works, but as with your solution its difficult to select cubic splines. Clicking the curve usually misses the hidden underlying straight line.


[Updated on: Wed, 24 July 2013 12:16]

Report message to a moderator

Re: ShortestPathConnectionRouter with GMF components [message #1408270 is a reply to message #1073185] Thu, 14 August 2014 16:26 Go to previous message
javs javs is currently offline javs javsFriend
Messages: 27
Registered: November 2013
Junior Member
hello friends

I use as layout algorithms KIELER in GMF?
Previous Topic:[XCORE] GMF: Resource '/org.eclipse.emf.ecore.xcore.lib/model/XcoreLang.xcore' does not exist.
Next Topic:Extract compartment`s owner
Goto Forum:

Current Time: Thu Feb 25 02:06:20 GMT 2021

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

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

Back to the top