Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Shortest path between two nodes. (Read 1984 times)
vtortola
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 104
Joined: Nov 26th, 2008
Shortest path between two nodes.
Apr 8th, 2009 at 4:16pm
Print Post  
Hi,

Is there an option for make the link as short as possible?

What I want is something that changes the both link end point and start point to meet the minimun distance between two nodes.

If there isn't, how may I do it? some idea or guideance...

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Shortest path between two nodes.
Reply #1 - Apr 9th, 2009 at 8:53am
Print Post  
Hi,

Try the ReassignAnchorPoints method. It does not place the end points exactly at the shortest path, but might be close enough for what you need?

Stoyan
  
Back to top
 
IP Logged
 
vtortola
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 104
Joined: Nov 26th, 2008
Re: Shortest path between two nodes.
Reply #2 - Apr 10th, 2009 at 11:06am
Print Post  
Finally I did it my self, but would be nice have that in the component.

What I did is, now everytime you move a node, all the node links recalculate their start and end positions to find the shortest path between the node that you've moved and the related node. It's like in the Microsoft SQL Server Studio, in the diagram utility.

I do a straight line from node to node, and after I route it (link.Route()). Besides from the shortest path choose the one that doesn't cross any node if it's possible.

Now draw big diagrams is a matter of minutes, seriously I recomend you add that feature.

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