algorithmic modeling for Rhino
I use the Timer component, which as I understand it, expires a component's solution, thus expiring all the components that it plugs into, and onwards.
I'm also using the data recorder component / this custom VB data recorder to store some data. What I want to do is to stop the effects that the timer has on the data recorder, so that everything 'downstream' from that data recorder only recalculates a solution when a value changes, like normal Grasshopper. Is this possible?
My specific use-case: I'm using a camera control plugin to grab the location and orientation of the camera. When I press a button, I store the location and orientation of the camera at that moment into a list with Data Recorder, and turn that into geometry, and boolean all the results on the list together. But since the list slowly grows, the boolean gets more and more heavy. This wouldn't be a problem, except that the camera control plugin that I wrote requires the GH Timer with a high refresh rate (~20ms), so then the Data Recorder continues to refresh every 20ms, and then the boolean union operation is retriggered every 20ms, even when I want it to only trigger when a new item is added to the Data Recorder List.
Thanks a lot!
Tags:
Just bumping this if possible: Essentially, what I'm trying to do:
I suspect the expiration/re-solving of components is happening with a rule along the lines of "expire all things that are connected downstream, no matter what their logic is". What I need is a data recorder component that can block the propagation of this expiration.
Hi Dan did you arrive to any conclusion? I have the same problem - how to stop a timer to affect components downstream... I'm thinking maybe we need to apply some parallel programming solution? so that component1 with timer1 is a thread, and component2 with timer 2 is another thread, and later they are joined in the rest of the grasshopper flow, which can choose somehow which timer to follow... I am reading about that... but I have no conclusion yet.
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
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by