Grasshopper

algorithmic modeling for Rhino

Hi all,

Does anyone know how Grasshopper decides about the order of the execution for unconnected components on the canvas? I put an example here together with four GHpython components. I want to know if there is a way to change the current order of the execution.

Or is there a way to make one of the components to execute as the first component when I open the file?

Thanks,

Mostapha

Views: 1488

Attachments:

Replies to This Discussion

I do!

It's complicated. The document contains a flat list of components (and other objects). When a new solution starts it simply iterates over this flat list from left to right until it finds a component which has expired. It then tells this component; "Hey you! Yes you. It's your turn to solve yourself." This component (or parameter) then goes through all the motions required to compute its output values. The first step in doing this is collecting all inputs. It could be that the component depends on another object which has also expired but which is further down the list, so it's still in un expired state. It will then kindly ask that component to solve itself. And so on. This can cause a shockwave of components triggering other components to solve until everything up to and including the component that was asked first have indeed solved themselves and are no longer expired. Then control is handed back to the document which will continue to iterate over the list of components until it finds another expired one.

The order the objects in the document list is the same as the draw-order. I.e. objects that are solved first are also drawn first and thus appear to be underneath later objects. However due to the recursive nature of the solving process this order may be much more complex.

If you want a component to be solved first, you can probably put it at the bottom of the list by selecting it and pressing Ctrl+B. This is however a pretty volatile way of controlling the solve order, but there is no other mechanism.

--

David Rutten

david@mcneel.com

Hi David,

I wondered that someone should know! ;) Thank you for the explanation. Ctrl+B does the job in my case.

Thank you so much.

Mostapha

David,

Can I script the "ctrl+B" functionality from the component itself?

Mostapha

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