Find SCTN end clashed with Panel

This macro may be used to find out, what END is closer to PANE (or all other types) that is intersects SCTN.2018-03-06_003234

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

DESCLASH
REM OBST ALL
OBST $!pane
CHECK $!sctn
EXIT

var !allClashes CLASH COUNT CLASHES
if(!allClashes.real().eq(0))then
return
endif
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>
else
$p POSE – Position: $!<sctn.pose>
AID TEXT ‘POSE’ AT $!<sctn.pose>
endif

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s