Grasshopper

algorithmic modeling for Rhino

Hi there

I've been using grasshopper for a while now and have decided to start tackling python.

I'm having trouble with some basic functionality of forming lists.

So far, I am just trying to write a simple script which moves a box one unit in the z, and a random amount in the x and y, so as to create a random stack of boxes.

The trouble I'm having is that if I use a for loop and do any amount of generations to create a larger stack, python only gives me several of the final cube in the stack, ie. if I did 6 generations, there'll be 6 cubes all occupying the same space of where the 6th cube should be.

Help anyone?

Views: 631

Attachments:

Replies to This Discussion

Hi Daniel

I think that you meant to copy the box each time, no?

Something like this:

Giulio
--
Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com

Attachments:
Ahh yes!! Perfect!! I knew it had to be something simple..

Thank you!!

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service