I am trying to figure out where a geometry is residing in respect to another geometry. My Image explains things better, I have Square nodes A, and B. and I have circle Child nodes X, and Y. I have all the nodes available. Is there a way to find where the node is residing in respect to its parent ? -if it is on top of the node, bottom, right side, left side-
So for my example I am on node X, and I have it’s parent Node A. so X is ABOVE A, if X was on it is right, then it would be on the Side of A.
I tried using the shape of node X and then getting its segments, then examine each segment by extending a line from the middle of it and see if it intersects the parent node, but then I dont know where each segment is located so that failed.
I could probably use the X,Y coordinates of each node to find it’s location in respect to it’s parent but is there another way ? maybe something within the APIs that I missed ?