Grasshopper

algorithmic modeling for Rhino

Hi all, having a small issue repeating the 'move' command a specific number of times with Python. I have 4 sets of rectangle groups that I want to move a specific number of times. I'm trying to use the "_ in range()" method, but am encountering problems since each rectangle group needs to move a unique number of times. Attached is a very simple script and any guidance about what I'm doing wrong would be greatly appreciated. Thanks!

Views: 1686

Attachments:

Replies to This Discussion

Maybe this is a little closer, the objects are repeating the correct number of times, but they are just repeating the same original move on top of themselves. Anyone have a clue how to make each move iterate on the previous move?

Attachments:

And yet another attempt, I feel it's close yet so far away. 

Attachments:

I'm afraid I can't quite follow the logic of your scripts. I've attached an example of how I usually approach these types of algorithm, maybe that'll help (I used RhinoCommon, but you can just replace those methods with their rhinoscriptsyntax equivalents). Best, Anders

Attachments:

Alas the Grasshopper Python editor hints is incomplete and doesn't include the whole standard library such as copy:

As Rhino is stuck with IronPython 2.7, the standard library references are here:

https://docs.python.org/2.7/library/

https://ironpython-test.readthedocs.org/en/latest/library/

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