algorithmic modeling for Rhino
(Copied from Rhino.Python; I'm told this is where more people who can help me hang out)
I'm building a series of window-blind models to be used for lighting simulation, and I'd like to be able to generate and bake them, using python and Grasshopper.
More concretely, I have a list of pairs of blind heights and angles that looks like this:
Angle | Fraction Down |
0 | 0.5 |
0 | 0.75 |
0 | 0.875 |
15 | 0.25 |
15 | 0.5 |
... |
I'd like to set the angle and the height in my Grasshopper solution, bake it to a layer, then export that solution to an OBJ file, and repeat until all angles and heights are done.
I got an answer for baking the solution—I think—but I do not see how to synchronize the setting of angles and heights with the baking operation.
I would like to be able to write something like:
for ang,hgt in [...]:
# ... allow solution to work ...
# bake and export
But this is not very Grasshopper-ish and I do not see how to do it. Please let me know how!
(BTW, is there a standard way for inserting code in this visual mode editor?
Tags:
make a slider that selects a given pair, using the index of the pair.
connect everything so that it will bake the selected pair
right click on your selection slider and go to "Animate"
I'll give that a try.
Ah. Finally figured out how to upload a script--as an attachment. So here it is, for anyone who is interested.
A few notes on the script:
Regarding number 7. this might help.
Thanks!
I got it working; since I can't figure out how to post code in a reply, I'll put it up in a new thread.
I've now tried to post twice. I give up. Look here for my post: http://python.rhino3d.com/threads/1261-Baking-Grasshopper-Solutions...
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by