Script for random rotation of several objects wanted

Hi,

I placed a lot of grass objects from the new V-Ray library Cosmos but all my old randomize scripts doesn’t work at Rhino 7. Could someone help please? (Best a script which can be added to a button.)

On the long run random rotation and scale could be useful, for example for a forest.

-Micha

Hi Micha - here is one for rotation in world Z - it can be made fancier, it is what I had…

RandomRotateEach.py (1.1 KB)

To use the Python script use RunPythonScript, or a macro:

_-RunPythonScript "Full path to py file inside double-quotes"

You can send me the ones that do not work in 7 and I’ll have a look.

Here’s a little bit fancier version that includes scaling…

RandomizeEach.py (6.6 KB)

-Pascal

1 Like

Wonderful. Thank you very much for you quick help, the scripts are great. :slight_smile:

One question - could it be that are used different units for each script? At the rotate script 1 looks like 100%=360° and at rotate&scale 1 looks like 1°.

@Micha - I probably did mess up someplace - here is a little better version (I think) of the latter script - let me know if I messed it up as well.

RandomizeEach.py (6.5 KB)

-Pascal

2 Likes

Perfect!!!

Thank you very much,
Micha