I was picturing a script or expression that would allow for mask manipulation by another mask, based on which side the "secondary" mask comes in contact with the "primary". So, the first pixel of the masks that touch, if its last coordinates were 1 pixel lower in x screen position, it would alter the primary mask so that it appeared as though the secondary masked object was moving in front of it, and if the masks came in contact and the secondary's previous pixel location was 1 pixel in x position higher, it would not affect the primary mask, appearing as though the object went behind it.
For orbiting type scenes. The secondary and primary masks' positions and paths and size could all be calculated to determine when the mask should "appear" from "behind" the primary mask.
I think that this variable of the previous pixel location for the mask determining how they interact could also be used for other situations, too. Auto trace, too, could use the feature added. I think the information is already there, just not used, that way. You could then have many auto traced objects from different comps or projects that could immediately interact with each other, correctly as soon as dropped into a new comp.
Blood type O negative. I bleed zeros and ones
I dabble on the desktop
Shifted Leering, Any Perspective
Shifting Literally All Perceptions
FWIW, finding a particular location on a mask path is not something that could be done by an expression, and to do it with a script you would have to know the math that AE uses under the hood to calculate the curves. The only data you have available are the locations of the nodes and handles. Assuming you could do all that, any time you tweak the animation, you would have to restore the paths to their original shapes and run the tool again.