Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Connection to rounded Shapes(How to make a connection that ends exactly at the edge of a rounded rectangle?)
Connection to rounded Shapes [message #1222074] Thu, 19 December 2013 15:54 Go to next message
Martin Hanysz is currently offline Martin HanyszFriend
Messages: 30
Registered: November 2013
Member
Hello,

I am currently trying to figure out a way to correctly display connections that end at a rounded shape, like an ellipse or rounded rectangle. The problem I have is, that the connection always ends at the bounding box of the shape and not exactly at its edge.

Is there a way to make the connection attach correctly?

I thought of using a ChopboxAnchor to make the connection creation snap to the shape and programmatically create a FixpointAnchor at the point where the edge of the shapes GraphicsAlgorithm and the ray from the ChopboxAnchor to the last bendpoint of the connection intersect. Although that seems feasible, I'd rather ask if there is a more simple way of doing this (like some special sort of Anchor I am not aware of yet).

Best regards,
Martin
Re: Connection to rounded Shapes [message #1222381 is a reply to message #1222074] Fri, 20 December 2013 09:23 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1640
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Martin,

that should work out-of-the-box. The Sketch test tool has Ellipses as shapes
and connections go straight through to the edge of the shape. It uses
ChopboxAnchors and I don't think there is any special logic behind...

Do you have any shapes (maybe inactive or invisible) around your shapes?

Michael
Re: Connection to rounded Shapes [message #1229911 is a reply to message #1222381] Fri, 10 January 2014 14:24 Go to previous messageGo to next message
Martin Hanysz is currently offline Martin HanyszFriend
Messages: 30
Registered: November 2013
Member
Dear Michael,

I investigated a little further on the problem and found out that the Sketch test tool in fact only handles ellipses correctly. If you draw a connection to a rounded rectangle and position it in a way that the connection ends at the corner, the connection ends at the bounding box. The attached picture shows an example.

The problem becomes more obvious if the corner radius of the rounded rectangle is set to a larger value.

Do you have any ideas how to solve this issue? I guess all our diagrams would look more sophisticated if the connections would end correctly at the edge of a rounded rectangle Smile

Best regards,
Martin
Re: Connection to rounded Shapes [message #1231004 is a reply to message #1229911] Mon, 13 January 2014 15:31 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1640
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Martin,

hm, that's right.

I gues that is caused by the clipping that's used for rounded rectangles in
the Graphiti framework and needs to be changed there. Would you please file
a bugzilla for this issue?

Thanks,
Michael
Re: Connection to rounded Shapes [message #1232593 is a reply to message #1222074] Fri, 17 January 2014 09:42 Go to previous message
Martin Hanysz is currently offline Martin HanyszFriend
Messages: 30
Registered: November 2013
Member
I created the following bug report for this issue: https://bugs.eclipse.org/bugs/show_bug.cgi?id=425957
Previous Topic:Missing undo context on diagram save
Next Topic:Create new element and prefill it
Goto Forum:
  


Current Time: Mon Dec 22 13:32:58 GMT 2014

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

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