Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic DiagramLink::Route() method fails in certain condition (Read 3194 times)
Robin
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 5
Joined: Oct 25th, 2017
DiagramLink::Route() method fails in certain condition
Oct 25th, 2017 at 7:56am
Print Post  
Using Diagraming.Wpf version 3.5.0.451.

When trying to connect a Symbol whose width is more or equal to twice its height the DiagramLink::Route() method returns false and doesn't fire any event.
When rotating the symbol 90°, the routing then succeeds without any issue.

What could be causing this / is this a known issue?



  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3152
Joined: Oct 19th, 2005
Re: DiagramLink::Route() method fails in certain condition
Reply #1 - Oct 25th, 2017 at 9:19am
Print Post  
If using GridRouter check if it's not same problem as in https://mindfusion.eu/Forum/YaBB.pl?num=1506416396 , and try latest v3.5.2 for the fix.

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Robin
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 5
Joined: Oct 25th, 2017
Re: DiagramLink::Route() method fails in certain condition
Reply #2 - Oct 25th, 2017 at 11:04am
Print Post  
Hi Slavcho,

Thanks for the answer. I have tried with version 3.5.1.451 and the problem is still there. I don't know where to find version 3.5.2.

Best,
Robin
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3152
Joined: Oct 19th, 2005
Re: DiagramLink::Route() method fails in certain condition
Reply #3 - Oct 25th, 2017 at 11:27am
Print Post  
Hi Robin,

v3.5.2 should be available on your account page (log in from our website title page) and as nuget package too -
https://www.nuget.org/packages/MindFusion.Diagramming.Wpf/

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


I Love MindFusion!

Posts: 5
Joined: Oct 25th, 2017
Re: DiagramLink::Route() method fails in certain condition
Reply #4 - Oct 25th, 2017 at 12:05pm
Print Post  
Hi,

I am now using version 3.5.2.
When trying to Route from a rectangle symbol (see attachment 1) the method DiagramLink::Route() returns false and doesn't fire any event. If I rotate the symbol 90° then the Route works flawlessly. I have noticed trough trial and errors that the Routing fails only when trying to Route from a symbol which is more than 2 time wider than its height. In this use case the width of the symbol is 128, the height is 64 and the grid size is 16.

Robin

  

2017-10-25_13h59_59.png ( 10 KB | 82 Downloads )
2017-10-25_13h59_59.png
Back to top
 
IP Logged
 
Robin
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 5
Joined: Oct 25th, 2017
Re: DiagramLink::Route() method fails in certain condition
Reply #5 - Oct 25th, 2017 at 12:07pm
Print Post  
Here is the failing method:
  

2017-10-25_14h00_26.png ( 17 KB | 84 Downloads )
2017-10-25_14h00_26.png
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3152
Joined: Oct 19th, 2005
Re: DiagramLink::Route() method fails in certain condition
Reply #6 - Oct 25th, 2017 at 12:15pm
Print Post  
Is that rectangle pointed by the link a separate node (placed over the larger symbol node)?
  
Back to top
 
IP Logged
 
Robin
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 5
Joined: Oct 25th, 2017
Re: DiagramLink::Route() method fails in certain condition
Reply #7 - Oct 25th, 2017 at 12:26pm
Print Post  
Yes it is a DiagramNode.
The same issue also occurs when connecting a symbol directly to another symbol.
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3152
Joined: Oct 19th, 2005
Re: DiagramLink::Route() method fails in certain condition
Reply #8 - Oct 26th, 2017 at 5:50am
Print Post  
The router marks the grid tiles covering whole bounding area of node as obstacles, not just the ones where you see node's pixels. E.g. the grid built from diagram would look as upper part of the attached image, not the lower one. So it might not be finding free tiles to pass the link through because of the larger overlapped node and returns false. We cannot do pixel-by-pixel analysis of custom shapes to build a more fine-grained grid than that, but could add some method to let you return a list of rectangles if that will work for you.

It working when the large node is rotated might be coincidence, say if the smaller node happens to intersect four grid tiles in one case and just one in the other, depending on where the grid tiling starts.

Regards,
Slavcho
  

grids.png ( 5 KB | 92 Downloads )
grids.png
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint