OrientOnSrf scripting


Is it possible to script the OrientOnSrf command is such way that the script determines the orientation of an object and than inserts the correct arrow with the correct orientation?

This file might clarifies my question:
Object orientation.3dm (108.8 KB)

The OrientOnSrf command (with Rigid=Yes) is just a transformation command - transforming geometry from one plane to another. The source plane us a plane based on the current construction plane and through the picked “base” point. The target plane is some plane calculated from the pick point on the surface (origin), the normal direction at that location (z-axis) and some other orienting information to get the x-axis and y-axis in the directions you want. All of this can be calculated using scripting.

Thanks! I will create a start and might get back to you…