This macro may be used to find out, what END is closer to PANE (or all other types) that is intersects SCTN.
We use clash tool, to find out at what point we have collision and than check which end is closer to it.
!sctn = =23584/6386
!pane = =23584/6854
REM OBST ALL
var !allClashes CLASH COUNT CLASHES
var !ClashPos CLASH 1 POSITION
AID CLEAR ALL
if(!sctn.poss.distance(!clashPos.position()) lt !sctn.pose.distance(!clashPos.position()))then
$p POSS – Position: $!<sctn.poss>
AID TEXT ‘POSS’ AT $!<sctn.poss>
$p POSE – Position: $!<sctn.pose>
AID TEXT ‘POSE’ AT $!<sctn.pose>