algorithmic modeling for Rhino
Hi
I have been struggling to find a solution exemplified by this simple definition.
Even though the stream gate is channeling the data, both streams are triggering the subsequent components. Is there a way to prevent that?
I am aware that in a simple case like this I can just bypass statements when nothing is transmitted by the stream, but I am interested in knowing if it is possible to turn off an output completely. As if removing the wire between components.
Tags:
...keep in mind that the discussion was about .gha components.
Thanks. I am afraid i recuire a bit more introduction to what is written there in order to understand it. Or to understand how to apply it within a script
It seems I can get access to the functions metioned by importing Grasshopper.Kernel.GH_Component... but from there on i am a bit lost as to how I should apply it... can I adress the script component as when programming a class with a 'this' or 'self' kind of keyword?
Nope, not possible. The expire events propagate all the way no matter what.
One reason this is very hard is that the expiration happens before the new solution and it thus doesn't know whether or not the data will change.
--
David Rutten
david@mcneel.com
Ok, thanks
But it must be possible to create a dll similar to the 'Data Dam', which has a boolean input which could turn the data stream on and off, or?
Yes, that is possible. If you create a custom component and override the ExpireDownStreamObjects() method you can choose to not expire certain output parameters. However you need to make this decision without knowing that data will end up in a specific input parameter, because that data isn't there yet.
--
David Rutten
david@mcneel.com
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