MoI discussion forum
MoI discussion forum

Full Version: 3-Point-Align Script

Show messages: All  1-5  6-9

From: Michael Gibson
21 May 2018   [#6] In reply to [#5]
Hi Ray, it looks like the black piece is of a slightly different size than the spot you're trying to put it so it's not going to be an exact fit there.

I used this script to get the length of a selected edge:
script:moi.ui.alert( moi.geometryDatabase.getSelectedObjects().getCurves()[0].getLength() );





I thinking building a more complete wire framework like Stefan was showing above is probably better.

But anyway the way you can do a 3 point align currently works like this - you select the object that you're moving then run Transform > Orient. Place the origin point of the orientation picker onto your first known point.

Now comes the part that's a bit tricky - the way the orientation picker works is that one of the 3 axes has a dot over it, that one is the "primary axis" and if you drag it, it can be freely moved to point in any direction. The other 2 axes are restricted when you drag them to only pivot around the primary axis. You can set the primary axis by clicking on one of the axis lines without dragging it.

So the next step is to place the x axis pointing at your second point. Click on it once to set it as the primary axis and then drag on it and release over your 2nd point.

Then drag the y axis and release it over your 3rd point.

I'll try to make a video of this for you in a bit.

Since it's a little complicated I've been meaning to make a "3 points" option in the orientation picker as well.

- Michael

Image Attachments:
ray_align1.jpg  ray_align2.jpg 


From: Michael Gibson
21 May 2018   [#7] In reply to [#5]
Hi Ray - so here's the way to do a 3 point align.

1 - Place origin point at your first reference point.

2 - Click (click and release the mouse, not drag) on the orientation picker's x axis line. It is now the primary axis which can be oriented in any direction.

3 - Drag on the x axis line and release it on your second reference point.

4 - Drag on the y axis line and release it on your third reference point.



- Michael
From: RayCAD1962 (RAYCAD003)
21 May 2018   [#8] In reply to [#7]
Hi Michael,

I follow your instructions video and I made the 3D Ball with your help. I am so happy that I made it. I just take 5 minutes to do it.

Yes, the first file that I sent you was mislead measures but I correct them. The one that I send you is correct and good measures.

Thank you for your help and support.

regards,

Ray

Attachments:
3D Done Ball.3dm


From: Michael Gibson
21 May 2018   [#9] In reply to [#8]
You're welcome Ray, I'm glad that worked for you!

- Michael

Show messages: All  1-5  6-9