Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Link crossings (Read 2878 times)
baba
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 16
Joined: Jan 20th, 2010
Link crossings
Nov 8th, 2010 at 1:48pm
Print Post  
Hi all,
we're using v. 1.7 here and have an issue with links crossings. We've set the following properties:

Code
Select All
diagramControl.RouteLinks = true;

diagramControl.RoutingOptions.Anchoring = Anchoring.Ignore;

diagramControl.RoutingOptions.TurnCost = 0;

diagramControl.RoutingOptions.NodeVicinityCost = 0;

diagramControl.RoutingOptions.CrossingCost = 255;
diagramControl.RoutingOptions.LengthCost = 0;
           diagramControl.RoutingOptions.DontOptimizeLongRoutes = true;

           diagramControl.RoutingOptions.EndOrientation = MindFusion.Diagramming.Silverlight.Orientation.Vertical;

 



From what I've read and can understand, this would tell the routing algorithm to avoid links crossings despite the length and the number of segments and turns of a link.

But This is not working, as soon as RouteAllLinks() is called there are a bunch of crossings that should be avoided.
The ".EndOrientation" property setting is ignored as well.

Any idea would be appreciated.

Thanks,
baba.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Link crossings
Reply #1 - Nov 8th, 2010 at 3:34pm
Print Post  
Hi,

At this time most of the RoutingOptions properties are used only by GridRouter, i.e. set diagram.LinkRouter = new GridRouter(...).

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
baba
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 16
Joined: Jan 20th, 2010
Re: Link crossings
Reply #2 - Nov 8th, 2010 at 4:09pm
Print Post  
Hi Stoyo,
thanks but it does not work at all with the RoutingOptions I've been using.
I've tried and changed them but basically it still does not mind at all about the CrossingCost value (255!!!!) while other values are set to 0.
It keeps routing crossed links and, as a bonus since I've been using GridRouter, I obtain non-orthogonal links even if I specified LinkStyle = Cascading.

This is very confusing.

Can you please provide a few lines of code to obtain a link routing effect that would reduce links crossings as much as possible given that the diagram uses a Flowchart layout?

Edit: it also seems it does not mind at all about the "RoutingOptions.Anchoring" property, which, if set to "Keep" is ignored as link endings are aligned to different points of the AnchorPattern, even to points for which a value of "false" has been specified for the "allowIncoming" parameter...

Cheers,
baba
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Link crossings
Reply #3 - Nov 8th, 2010 at 4:20pm
Print Post  
Hi,

Our developer will check this if you email a sample project showing your setup to support@mindfusion.eu.

Note that most layout classes change the Style of links, and in the case of FlowchartLayout they become polylines. You must reset their style to Cascading before calling RouteAll if you want them routed orthogonally.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
baba
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 16
Joined: Jan 20th, 2010
Re: Link crossings
Reply #4 - Nov 8th, 2010 at 4:59pm
Print Post  
Hi Stoyan, test project is on its way to support@mindfusion.eu.

By the way, resetting LinkStyle does not work either, this is also showed in the test project.

Hope to hear from you soon.

Cheers,
baba.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Link crossings
Reply #5 - Nov 9th, 2010 at 10:01am
Print Post  
Diagram.LinkStyle is a default value for new links, you should reset the Style of individual links instead. E.g. this looked nice enough for your sample chart,

Code
Select All
FlowchartLayout fl = new FlowchartLayout();
fl.Orientation = MindFusion.Diagramming.Silverlight.Layout.Orientation.Vertical;
fl.Arrange(diagram1);

foreach (DiagramLink link in diagram1.Links)
	if (link.SegmentCount > 1)
		link.Style = LinkStyle.Cascading;

diagram1.LinkRouter = new GridRouter();
diagram1.RouteAllLinks(); 



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