Bug 90408 - ShortestPathConnectionRouter cannot count correct router
Summary: ShortestPathConnectionRouter cannot count correct router
Status: NEW
Alias: None
Product: GEF
Classification: Tools
Component: GEF-Legacy GEF (MVC) (show other bugs)
Version: 3.1   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: gef-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-06 02:55 EDT by zhang wei CLA
Modified: 2011-01-05 18:07 EST (History)
2 users (show)

See Also:


Attachments
this pic show the bug (9.02 KB, image/jpeg)
2005-04-06 02:57 EDT, zhang wei CLA
no flags Details
another pic show the bug (6.99 KB, image/jpeg)
2005-04-06 02:59 EDT, zhang wei CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description zhang wei CLA 2005-04-06 02:55:22 EDT
I use GEF3.1 & Eclipse3.1M5a, when i run org.eclipse.gef.examples.shapes_3.1.0,
I found a bug.

I found this sample use ShortestPathConnectionRouter to create connection's router.
now I add a big ellipse, a small ellipse and a rectangle to the penal, two
ellipse both connect to rectangle. 
when two ellipse cross, the connection will through the ellipse, cannot count
correct router to the rectangle.
Comment 1 zhang wei CLA 2005-04-06 02:57:33 EDT
Created attachment 19584 [details]
this pic show the bug

this pic show the bug
Comment 2 zhang wei CLA 2005-04-06 02:59:16 EDT
Created attachment 19585 [details]
another pic show the bug
Comment 3 Pratik Shah CLA 2005-04-06 11:53:13 EDT
Aah.  Good test cases.
Comment 4 Randy Hudson CLA 2005-05-04 11:35:23 EDT
The picture in comment 1 is working as designed.  If a connection starts inside
the bounding box of another obstacle, that obstacle ignored, which is what you
are seeing.
Comment 5 Chris Lee CLA 2006-01-12 18:28:27 EST
I think we're having a similar problem with our figures (see the "another pic show the bug" picture), where the router pulls the line unnecessarily towards the other figure.  In our case however, the figures are not overlapping...
Comment 6 Chris Lee CLA 2006-01-12 18:31:06 EST
(we're also using the most recent Eclipse/GEF 3.2 milestone releases as of the beginning of January)
Comment 7 Randy Hudson CLA 2006-01-13 10:48:19 EST
After looking at the situation in comment 2, that's not a bug in the algorithm. The connection anchor's reference point is probably the center of the circle. So, SPCR is going to route from the center of the circle to the destination. After it routes, the anchor is asked to provide it's connection point closes to the nearest bendpoint, which then ends up being on the outside of the circle instead of its center.

One possible fix might be to use attachment points at the beginning, then updating them at the end, but there will still be strange cases.

Chris, please provide a snippet of draw2d that shows the problem you are having.