Orient with CopyToPoints

 From:  mkdm
8536.1 
Hi Michael.

I often find myself to repeat this operation :
1) Extract iso curves from some surfaces, 2) use the "_PointsOnCurve" script to distribute some points on the iso curve, 3) use the "orient" command to
make multiple copies of some input object that I want to replicate along curve, but with regards of the surface normal of the surface from which the iso curve was extracted.

I've made a search and if I'm not mistaken, there's only a "vClone" script made by max, but for what I've tested so far,
it's not what I want.

So I'm trying to piece together these operations with a bunch of Moi's Js code, picked here and there to create a new script.

The script I'm trying to write should do these things :

1) Select one input object like the "orient" command
2) Selects a bunch of destination points
3) make multiple copies of input object, like the "orient" command, but without the need of manually select the destination orientation
for each points.

I guess that I'm not made myself clear :)
So, I've recorded this little video to show you what I want to do with this new script : http://take.ms/xOC3v

These are the scripts I have used to create this example : http://take.ms/981KB
(_PointsOnCurve, CenterAtOrigin, CopyToPoints, Orient)

And this is the script I'm trying to write (orientWithCopyToPoints) : http://take.ms/UZM7b

As you can see in the video the problem is that I don't know how to apply destination frame automatically to target points.

This is the 3dm test file you can use to test what I'm saying: http://take.ms/BQkPu



I hope you have some spare time to help me to complete this script.

Thanks a lot and have a nice day.

- Marco (mkdm)