Grasshopper

algorithmic modeling for Rhino

I want to make a pair of GH components to allow for very basic loop functionality. Hoopsnake and Anenome don't get the job done for me. All I want to do is pass a boolean through a loop 'x' amount of times.

To achieve this, I'd like to call ExpireSolution on a specific component from within another component. I simply want component (4) to tell component (1) to refresh. There is a good bit of discussion on the forum that is similar, but nothing I could find is getting me quite there.

 Is this more complicated than I make it out to be?

Views: 696

Replies to This Discussion

The biggest complication is that you need to make this expiration plumbing go outside of the solution plumbing. Component 4 will have to schedule a new solution with a callback, and when that callback is invoked you have to expire component #1 and maybe copy some data around.

Have you figured out a good solution to this? I think I have a similar issue, but I haven't figured out how to do it yet...

http://www.grasshopper3d.com/forum/topics/python-class-loop-recompu...

I am not sure if we have exactly the same problem... but I got around my problem by making duplicate copies of the initial class data using deepcopy() for each loop, so that there is no need to refresh the original component data.

https://docs.python.org/2/library/copy.html

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service