ScriptSpot home

Forum topic · General Scripting

Anyway to align selected nodes of multiple objects to a specific face ?

By Iga · 2012-04-25

Description

Hello everybody,

I 'm very new to scripting, just started studying it for my university...
I came across the following problem:

1.Let's say we have a number of boxes, each with random rotation and position.
Can we select them all, choose base nodes - 000,001,010,011 for each different box, and then align them all in a plane ?

2. Make a position variable so that they don't end up in the same place, and have them separated like making a let's say box index ?

Can this be done ! ? Can I do it ! ? lol :P

Any help or guidelines where to start is greatly appreciated.

Regards

Comments (6)
Iga

Of course, let's suppose we have a construction of 30 box / beams forming a roof. The boxes have been created parametrically, and each one of them has its own position and rotation and length, but they all have the same width.

What i would like to do is make a script, select all the boxes, align them to a plane according to the base nodes, and prepare a cnc router cutting plan automatically if possible, in a similar way it can be done in grasshopper.

The idea is to take similar items with random position and rotation and put them in one plane in an organized layout so the data can be used for real model creation.

I hope I could give you a clear idea !

Thank you for your interest.

Reply to Iga
Branko Živković

Man, i'm architect and I understand completely what you want to achieve.
It's not easy task.
You need "Parametric Array" tool.
Is similar to grasshopper but this is maxscript.

I'm an architect too :PI

I'm an architect too :P
I have already made my model with parametric array.
I just need to make the construction plans for the cnc !
That's why i need the multiple align script ! I can do it manually but it would save me some time.

Thank you again

Iga

Thank you for your reply!
I 'll try to look about it, but as I understand I need something like mass align, instead of scatter. Scatter isn't used for 1----> many ?

Thank you again

Reply to Iga
Branko Živković

Can I ask for what you specifically need this?

Branko Živković

Try to use some scatter tool.
On this site you have several good scripts.