Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Logic to calculate bendpoints for a polyline connection in rectilinear routing
Logic to calculate bendpoints for a polyline connection in rectilinear routing [message #210521] Thu, 06 November 2008 07:06 Go to next message
Ramya Addanki is currently offline Ramya AddankiFriend
Messages: 2
Registered: July 2009
Junior Member
Hi All!

I am using the GMF plugin (1.0.3) and the draw2d API.

I want to understand how the bendpoints of a PolyLineConnection are
calculated in case of rectilinear routing.

I did debug the code from examples and found out vaguely how the
bendpoints are calculated and how the actual routing happens. I was
looking at the calculateBendPoints method of BorderItemRectilinearRouter
class. In this method, I saw that the algorithm builds from the "original
bendpoints"
List originalbendpoints = (ArrayList) conn.getConnectionRouter()
.getConstraint(conn);

I could not figure out how these original bendpoints are calculated.
Could someone explain the standard way in which the bendpoints are
calculated?
Any pointers to the code or articles would be extremely helpful.

Thanks,
Ramya
Re: Logic to calculate bendpoints for a polyline connection in rectilinear routing [message #210782 is a reply to message #210521] Mon, 10 November 2008 08:15 Go to previous message
Ramya Addanki is currently offline Ramya AddankiFriend
Messages: 2
Registered: July 2009
Junior Member
After some organized and patient debugging, I figured out how the original
bendpoints are calculated. For anyone who still is interested in knowing
about this, you can look at the method doExecuteWithResult in the class
org.eclipse.gmf.runtime.diagram.ui.internal.commands.SetConn ectionBendpointsCommand.

After the initial set of bend points are calculated, the
ConnectionEditPart class refreshes the bendpoints in the method
refreshBendpoints to create RelativeBendPoint list that is understood by
the concerned rectilinear router.

Thanks,
Ramya
Previous Topic:Transitive Link Mapping as Direct Link Mapping?
Next Topic:Need some EditPolicy related help
Goto Forum:
  


Current Time: Thu Mar 28 21:35:46 GMT 2024

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

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

Back to the top