Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic QuickRouter routing issue (Read 2570 times)
j poz
Junior Member
**
Offline


I Love MindFusion!

Posts: 78
Joined: Nov 21st, 2012
QuickRouter routing issue
Jan 24th, 2013 at 3:48pm
Print Post  
There is a routing issue in the QuickRouter, and have spent some time reproducing it in the MindFusion.Diagramming Demo.

In certain situations routing between two nodes can be interrupted by another node below it, provided the node below it was added to the diagram before the other two nodes.

Open the attached XML in the MindFusion.Diagramming Demo, select the top two nodes and their link, then drag them down about an inch with the mouse. The routing will unnecessarily bend more than it should.

Now, delete the node at the very bottom of the diagram and try moving the top nodes and their link again. The routing will not bend unnecessarily and work as expected.

Also, if you then re-create the third node at the bottom, the top nodes will route correctly. They only route incorrectly when the bottom node was created BEFORE they were.

This routing bug is causing an issue in our product with complicated diagrams.

See the attached XML and png files.
  

QuickRouter_Routing_Issue.zip (Attachment deleted)
QuickRouter_Issue_1a.png (Attachment deleted)
QuickRouter_Issue_1b.png (Attachment deleted)
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: QuickRouter routing issue
Reply #1 - Jan 24th, 2013 at 6:41pm
Print Post  
You can set a smaller U-bend length to alleviate this effect:

((QuickRouter)diagram.LinkRouter).UBendMaxLen = 5;

Or try using GridRouter with smaller grid size and NodeVicinity* values in RoutingOptions.

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


I Love MindFusion!

Posts: 78
Joined: Nov 21st, 2012
Re: QuickRouter routing issue
Reply #2 - Jan 24th, 2013 at 7:06pm
Print Post  
We use a UBendMaxLen of 0 in our product, and it still does this behavior in similar situations. I have attached a screenshot of how this behavior looks in our product. You can see in "UBendLength 0b.png" that it routes correctly, but in "UBendLength 0b.png" it has the bad routing behavior of the previous examples. LinkRouter is QuickRouter, Granularity is Normal, UBendMaxLen is 0, and TurnCost is 100.

Because the Demo project does not allow me to tweak the UBendMaxLen settings of the QuickRouter, I can't exactly duplicate this behavior in the demo project and know if it's still an issue when the UBendMaxLen is 0.

If it was possible to change the QuickRouter settings in the Demo project, I could attempt to provide you another XML example that reproduces what we are seeing in our project as shown via the attached screenshots.
  

UBendLength_0b.png (Attachment deleted)
UBendLength_0.png (Attachment deleted)
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: QuickRouter routing issue
Reply #3 - Jan 25th, 2013 at 7:25am
Print Post  
As I said UBenMaxLen only alleviates that effect. It is applied when QuickRouter detects segments of the link doing U-bend within the same tile of the map built to represent free space in the diagram. In your screenshot all U-bends that are in the same tile are already shortened, and the rest cannot be detected without some expensive processing time. If you don't mind the extra processing time, use GridRouter, e.g. this won't create bends in this case:

Code
Select All
diagram.RoutingOptions.GridSize /= 2;
diagram.RoutingOptions.NodeVicinityCost /= 2;
diagram.RoutingOptions.TurnCost *= 4;
diagram.LinkRouter = new GridRouter(); 



Alternatively, you can handle the LinkRouted event and do some post-processing to remove bends from the link's ControlPoints.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint