algorithmic 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, 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 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!


Views: 590


Replies to This Discussion

There is a sticky dictionary inside the scriptcontext module that you can use for that.

I hope it will help,

- Giulio

Hi Giulio,


Thanks for the quick reply!

I checked that and it looks promising! I'll start playing around with the sticky dictionary.


Hi Giulio,

Thanks for your reply. It really helps me a lot.


Do you dimension things only in the second line when you want them to be persistent data?

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).


- Giulio






  • Add Photos
  • View All

© 2020   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service