Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic AnchorPoint in the center of node leads to strange line-routing (Read 5126 times)
benjamin huser
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 26
Joined: Oct 23rd, 2014
AnchorPoint in the center of node leads to strange line-routing
Mar 2nd, 2015 at 6:56am
Print Post  
Hi there

I have a node which has an anchorpoint in it's center (50/50). Now if I connect two other nodes to this nodes, the line-routing is not straight to the center, but always goes around above node and then goes from there to the center (see attachment 1).

Now I would like that it behaves like you see in attachment 2, the lines should go directly to the center. At the moment, the user would always have to modify the lines in order to achieve that.
Is it possible to set this behaviour somewhere in the properties?

Thanks in advance
  

anchorpoint_problem.PNG ( 0 KB | 100 Downloads )
anchorpoint_problem.PNG
anchorpoint_solution.PNG ( 0 KB | 91 Downloads )
anchorpoint_solution.PNG
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: AnchorPoint in the center of node leads to strange line-routing
Reply #1 - Mar 2nd, 2015 at 11:10am
Print Post  
Hi,

Apparently when link's end point is inside a node the router selects the shortest path that will take it outside the node first, and only after that checks for directions. When at the center there are four such paths but the router always selects the first one found at the top. At this time you could use an AnchorPattern with points at middles of four sides instead of one in the node's center:

Code
Select All
new AnchorPattern(new[]
{
	// percents of width / height
	new AnchorPoint(50, 0),
	new AnchorPoint(100, 50),
	new AnchorPoint(50, 100),
	new AnchorPoint(0, 50)
},
"MiddlePoints");
 



then routing with RoutingOptions.Anchoring = Reassign should attach the link to the correct side.

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


I Love MindFusion!

Posts: 26
Joined: Oct 23rd, 2014
Re: AnchorPoint in the center of node leads to strange line-routing
Reply #2 - Mar 5th, 2015 at 2:34pm
Print Post  
Hi Stoyan

this was the solution I had also in mind. The problem is, that we have a model behind this diagram which is according to a standard. This standard does not know different anchor points for a node, so it would be really hard, as our tool must be able to read standard conform files (where then this information is missing...)

Isn't there another possibility?

Thanks anyway for your fast feedback
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: AnchorPoint in the center of node leads to strange line-routing
Reply #3 - Mar 5th, 2015 at 2:54pm
Print Post  
Hi,

You shouldn't have to specify anchor point values yourself if that's what troubles you. Depending on what features you are using and whether you let users move nodes, try setting properties such as link.Dynamic=true, RoutingOptions.Anchoring=Reassign, or calling the ReassignAnchorPoints methods of links to move link end points towards the connected nodes.

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


I Love MindFusion!

Posts: 26
Joined: Oct 23rd, 2014
Re: AnchorPoint in the center of node leads to strange line-routing
Reply #4 - Mar 5th, 2015 at 3:56pm
Print Post  
Hi Stoyan

ok thanks, I will try this out as soon as I find time.
I will give you feedback either if it worked or not.

Thank you for your help!
  
Back to top
 
IP Logged
 
benjamin huser
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 26
Joined: Oct 23rd, 2014
Re: AnchorPoint in the center of node leads to strange line-routing
Reply #5 - Oct 18th, 2017 at 8:50am
Print Post  
Hi

I know this thread is quite old, but I wanted to ask if in the newest version the same problem still exists and if so if it is planned to be fixed, so that we could work only with one anchor point in the center and the routing still would work properly?

Thanks for the info.
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Online


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: AnchorPoint in the center of node leads to strange line-routing
Reply #6 - Oct 18th, 2017 at 10:11am
Print Post  
Hi,

Try this build, our developer extended the EvaluateFarPoints option a bit to handle that case -
https://mindfusion.eu/_beta/wpfdiag352.zip
Code
Select All
diagram.RoutingOptions.EvaluateFarPoints = true;
diagram.RoutingOptions.Anchoring = Anchoring.Reassign; // EvaluateFarPoints doesn't work with Keep
diagram.LinkRouter = new GridRouter(); 



Regards,
Slavcho
  
Back to top
 
IP Logged
 
benjamin huser
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 26
Joined: Oct 23rd, 2014
Re: AnchorPoint in the center of node leads to strange line-routing
Reply #7 - Oct 18th, 2017 at 10:25am
Print Post  
Hi Slavcho

thanks for this very quick response.
Cool this sounds promising, I will try it as soon as I can.
However one issue there might be is that for most of our Nodes we want no automatic reassigning, just for a certain type. Right now we use the solution with the 4 nodes and manually trigger the reassignment of the anchor point for the impacted links upon moving of nodes...Would this as well be possible somehow?

Thanks for your help
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Online


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: AnchorPoint in the center of node leads to strange line-routing
Reply #8 - Oct 18th, 2017 at 10:45am
Print Post  
We'll extend it to work with the Keep option too then.

Regards,
Slavcho
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint