Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Routing randomly "fails" (Read 5044 times)
JGG
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 17
Joined: Feb 27th, 2006
Routing randomly "fails"
Feb 27th, 2006 at 9:27pm
Print Post  
Hello there,

I'm having strange problems happening with arrow routing.

It seems that within some conditions, the routing simply doesn't occur after creating an arrow, and the arrow is just a straight line which goes to the target node, crossing nodes when it really shouldn't.

Even stranger, it stays as a straight line even after moving nodes around. If I delete the arrow and recreate it with the same nodes, it routes correctly. It's as if routing was "disabled" somehow.

I've been able to narrow it down to a case where it can be reproduced easily. In the FlowChart.NET Demo application, go to "Miscellaneous features" and select the "Grouping" tab.

Modify the Behavior of the FlowChart to "FlowChart". Draw an arrow from the "Johny M." box to the "This is a numeric field" box. It crosses through the baby picture instead of avoiding it. Move the box around and it stays straight even if it should be very simple to avoid. In such a case, delete the arrow, recreate it, and it routes correctly.

So, it seems there's a bug in arrows where routing never occurs given some conditions.

Is it possible to have a follow-up on that? Am I overlooking something?

Thanks!
JGG
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Routing randomly "fails"
Reply #1 - Feb 28th, 2006 at 9:35am
Print Post  
Hi,

In that case routing fails because the initial arrow start point is overlapped by the picture box. The routing algorithm does not move the start and end points of arrows but only the intermediate ones, so it cannot ever find a path through the picture node. If you use such grouped nodes, you might have to explicitly define outgoing anchor points so the arrow does not start from inside a group member.

If there are some background boxes, set their Obstacle node to false so the routing algorithm does not try to avoid them.

Stoyan
  
Back to top
 
IP Logged
 
JGG
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 17
Joined: Feb 27th, 2006
Re: Routing randomly "fails"
Reply #2 - Feb 28th, 2006 at 11:05am
Print Post  
Hello Stoyan,

Thanks for your response. Your logic is correct, in fact that was an hypothesis I had while trying it out. However, I forgot to mention the routing still fails if you move the "Johny M." box a bit away from the picture box, leaving enough space for no intersection to occur. I also moved the "This is little Johny..." box out of the way to make sure no intersection was happening, to no avail.

I couldn't post a picture yesterday since I was at work (attachments blocked), so here it is.



Even stranger, the routing works in some other positions.



So what's happening? Is it possible elements within a group somehow conflict with each other in intersection/obstacle detection?

All objects in this chart have "Obstacle" set to true, except for the decoration boxes I think, but they are not affected in this situation.

Is there any way to fix this?

Thanks for your time!
JGG
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Routing randomly "fails"
Reply #3 - Feb 28th, 2006 at 12:28pm
Print Post  
Hello JGG,

You can decrease the value of flowchart.RoutingOptions.GridSize to make routing work in that case. The routing algorithm works on a grid where each piece represents several pixels - if two boxes are close one to the other, a piece between the two boxes might be marked as an obstacle because some of the box pixels lie in it.

Stoyan
  
Back to top
 
IP Logged
 
JGG
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 17
Joined: Feb 27th, 2006
Re: Routing randomly "fails"
Reply #4 - Feb 28th, 2006 at 12:43pm
Print Post  
You are right, I was just about to post my mistake of not considering the grid size of the routing algorithm, now that I'm at work and did some more testing. Sorry about that! You're quick on answering, thanks Smiley

In that case, defining anchor points also helps a lot with routing when you know better about the position of objects, especially when objects of the same group are very close to each other (which is the case in the software I'm developing). Otherwise the start/end points might be defined wrong and routing won't affect those.

Thanks again!
JGG
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Routing randomly "fails"
Reply #5 - Feb 28th, 2006 at 12:54pm
Print Post  
You are welcome Smiley I guess the routing algorithm should move the arrow end points too if they are covered by another box. I'll pass a link to this thread to our developers, hopefully they will implement that in next version.

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint