3-Point-Align Script

Next
 From:  RayCAD1962 (RAYCAD003)
8945.1 
There is a script that allows you to precisely align an object by aligning three points on the object to any another three points in space.

I have create the 3D ball with 3D Moi v4 May beta and I took a lot of time to Align it with the Transform / Orient command.

Thank you for your help and time. If there is, I can make my work more easy.

Ray
Image Attachments:
Size: 68.7 KB, Downloaded: 75 times, Dimensions: 683x460px
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  amur (STEFAN)
8945.2 
Hi Ray,

i don't know how long it took you to create the football and i can not
help with a script, but thought of the following procedure:

1. Import a truncated icosahedron with the .obj import script,
shell the solid.

2. Select all the edges, copy/paste and then loft those copied
edges individually, so that you get a "cutter" object for a
sphere.

3. Place a shelled sphere inside the cutter objects and cut
the shelled sphere with the cutter objects.

4. The result should be individual solids, forming the football.

Bildschirmfoto_2018-05-21_um_16.46.32

Regards
Stefan
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  RayCAD1962 (RAYCAD003)
8945.3 In reply to 8945.2 
Hi Stefan,
Thanks for your useful help that you gave me. The ball took me around half an hour and I learn a lot from it. Your idea is good but I prefer to use 3D Moi commands for this exercise and I've done it. I found a good video that make me eager to do it. The only I ask for a script because I believe that someone who programming Moi knows how to do this script and I hope to have more functions incorporate to the new 3D Moi v4 to improve the abilities of it. These commands are important to be there for the artist and designers and users like me.

Thanks anyway.

regards

Ray
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
8945.4 In reply to 8945.1 
Hi Ray, you can do a 3 point align with the Transform > Orient command, the first point is done by the origin placement and the 2nd and 3rd points are done by clicking and dragging on the x or y axis lines and releasing them on your target points.

If you can post the 3DM model file that you show in your screenshot I can make a demo for you of how that works.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  RayCAD1962 (RAYCAD003)
8945.5 In reply to 8945.4 
Hi Michael,

Thanks for your help that you always gave us. I am sending you the file of 3D ball and I like to show me how please.

I am so pleased with the 3D Moi Beta v4 of May. I feel the changes and the environment of it and more easy to manipulate the commands but sometimes still need help to understand.

Thanks again for your help

Ray
Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
8945.6 In reply to 8945.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

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
8945.7 In reply to 8945.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
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  RayCAD1962 (RAYCAD003)
8945.8 In reply to 8945.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:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
8945.9 In reply to 8945.8 
You're welcome Ray, I'm glad that worked for you!

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  大道刀 (SUIYAN)
8945.10 
https://www.bilibili.com/video/BV1Yp421U762/?spm_id_from=333.999.0.0
https://www.bilibili.com/video/BV1Zq4y197ii?p=7&vd_source=913e265b028433d7f4030496da189d83
我做的,关于标准足球建模并上色的最快方法。moi3d的问题是被轮廓边缘穿过的面实际会被分割(rhino也有这个问题),导致这些面不能倒角(fillet)成功。因此应该采用圆形阵列来做。(第二个视频展示了如何通过旋转避开球的轮廓边缘)

EDITED: 17 May 2024 by SUIYAN

Image Attachments:
Size: 102 KB, Downloaded: 12 times, Dimensions: 846x576px
Size: 130.3 KB, Downloaded: 11 times, Dimensions: 522x524px
Size: 200.1 KB, Downloaded: 10 times, Dimensions: 601x609px
Size: 179.9 KB, Downloaded: 19 times, Dimensions: 1026x811px
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  pafurijaz
8945.11 In reply to 8945.10 
This must be a coincidence in time, I did the same thing but without using the script but construction lines this morning.
but the script is useful
soccer_ball</mg>
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All