generative modeling for Rhino
Hi all,
I'm looking for the possibilities of Python with running simulations within Grasshopper. I'm familiar with running these in VB.net, meaning Dim a variable in the secondary part of the script, so that it updates this global variable every time the script refreshes and connect a timer to the component to get the simulation running. (I added a small definition to illustrate what I mean)
My question is if anyone is familiar or has some thoughts about this within the GH_Python component? I guess it has to do with how the component updates and completely reads the script every time it updates, right?
I guess another result of this way of updating is that the Python component seems to work significantly slower then the VB.net component, for as it has to import it's full classes with every refresh. Maybe something for on the wishlist? I don't know if it is so easy to change this?
Any help or experience with this?
Thank you very much!
Jeroen
Tags:
Permalink Reply by Giulio Piacentino on November 24, 2011 at 11:12am There is a sticky dictionary inside the scriptcontext module that you can use for that.
I hope it will help,
- Giulio
_______________
giulio@mcneel.com
Permalink Reply by Jeroen Janssen on November 25, 2011 at 5:01am Hi Giulio,
Thanks for the quick reply!
I checked that and it looks promising! I'll start playing around with the sticky dictionary.
Jeroen
Permalink Reply by Michael G on March 8, 2012 at 11:22pm Hi Giulio,
Thanks for your reply. It really helps me a lot.
Guo
Permalink Reply by Ognek Kciroks on March 9, 2012 at 4:53am Do you dimension things only in the second line when you want them to be persistent data?
Permalink Reply by Giulio Piacentino on March 12, 2012 at 4:17pm Hi Ognek,
I am not so sure about this question... can you elaborate on it a little bit? (maybe opening a new thread could be useful).
Thanks,
- Giulio
________________
giulio@mcneel.com
Added by Aditya Patil 2 Comments 2 Likes
Added by T.Masui 0 Comments 0 Likes
© 2013 Created by Scott Davidson.
Powered by