Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Arrow auto routing questions (Read 1967 times)
jstraylor
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 50
Joined: Dec 28th, 2006
Arrow auto routing questions
Mar 5th, 2007 at 5:44pm
Print Post  
Hello,

I am using FC.NET 4.3 and have a couple of questions about auto-routing arrows as I can't seem to make them behave as I would like them to.

I am drawing a simple electrical layout diagram and need the arrows to always have a vertical orientation at the start and end, so I set those properties in the RoutingOptions.  The arrowstyle is set to Cascading.  However, sometimes when I move a box up or down in the chart the start and end segments switch to horizontal.  Do I need to trap a routing event and force the orientation to what I need??  If so, which event should I trap??

Second observation/question.   When I allow the arrows to autoroute the arrow lines actually overlap (they are drawn right on top of each other).  I need to force a space between arrow lines so that the diagram is readable.  Do I do this in one of the routing events??  Or, do I just need to set some different RoutingOptions??

Thank you again,
Jeff
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Arrow auto routing questions
Reply #1 - Mar 5th, 2007 at 7:45pm
Print Post  
Hello,

That could happen if two boxes are very close. The algorithm searches for a path in a grid whose squares are marked as occupied when an Obstacle box intersects them. That could lead to some free space between two boxes marked as occupied if the RoutingOption.GridSize is larger than half the distance between the box borders. To fix that, set smaller RoutingOptions.GridSize - however this will make routing work slower.

A similar problem could happen if the routing algorithm decides that a path lying exactly at the box borders is less expensive than a path where arrows go farther from the box. Increasing the NodeVicinityCost should fix that.

Arrows should not overlap if there is enough space between boxes, measured in number of grid squares. Decreasing the routing grid size should help here too.

You could handle the ArrowRouted event and check where the found path satisfies your criteria. If it doesn't, you might assign new coordinates to Arrow.ControlPoints.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
jstraylor
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 50
Joined: Dec 28th, 2006
Re: Arrow auto routing questions
Reply #2 - Mar 8th, 2007 at 11:28am
Print Post  
Thanks for the tips Stoyo!

By setting the options that you suggested I was able to determine the problem.  I was using a background box to show the allowable drawing area, and the Obstacle property of that box was set to TRUE.  OOOPS.

In any case, once that was taken care of, I set the routing grid to 1 and have had no further problems.

Thanks again!
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint