Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Node/Table intersection (Read 2829 times)
asloan
YaBB Newbies
*
Offline



Posts: 35
Joined: Mar 6th, 2006
Node/Table intersection
May 16th, 2006 at 3:47pm
Print Post  
What is the best way to determine if two FC objects intersect?

When my diagram is created, I create a "Legend" table which I place in the top left of the diagram.  Almost always, it is on top of nodes in the diagram.  What I want to do is move it directly down until it is not obscuring any nodes in the diagram.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Node/Table intersection
Reply #1 - May 16th, 2006 at 5:20pm
Print Post  
Hi,

You could use the NodesIntersect method to determine whether the legend box intersects with other boxes. That would require testing the legend against all other boxes, and if there is intersection, moving the legend down at some distance.

Stoyan
  
Back to top
 
IP Logged
 
asloan
YaBB Newbies
*
Offline



Posts: 35
Joined: Mar 6th, 2006
Re: Node/Table intersection
Reply #2 - May 17th, 2006 at 2:50pm
Print Post  
Thanks!  That's what I thought, but I was hoping that there was an easier way.  When you get over 1000 boxes on a diagram, this can take a while.

Alan
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Node/Table intersection
Reply #3 - May 17th, 2006 at 5:27pm
Print Post  
Well, you could call FitDocToObjects, get the DocBottom, put the legend there and restore the original document size. However that will place the legend below all boxes along the whole X axis, whereas the first method will only place it under the bottom-most box on the same X location where the legend is. You can speed that up a bit by calling NodesIntersect only for boxes whose Left value is smaller than the legend's Right value.

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