Data dam toggle/trigger

I’m using the kinect component project owl, it constantly reads the kinect and outputs new point cloud, but I only need new data when I need it, so I’m using a data dam and it works great.
But the problem is i have to click the data damn manually, I’m wondering if it’s possible to trigger it with code/components.
For example, I’m reading an integer value from a file, and if the file is equal to a specific value, new data is let thru the data damn.
I see that there’s a timer for data damn, but the interval of when i need new data isn’t constant.

I’m quite sure it’s a data dam :wink:

And maybe you can use the Gate component for this to switch paths dependent on the input.

1 Like

Are you referring to a stream gate?
Owl will constantly output new data, but I only need one instant the data to be persistent, and only update to a new instance when trigger, so if I use a stream gate, wouldn’t it’d end up empty when not trigger?

I’ve found the solution here:

Yes, it would be nice to have a ‘trigger’ input for Data Dam. But I don’t agree that either of the proposals in the thread you refer to are a solution.

  • The one in using VB Script appears to trigger all data dams?
  • The one using Metahopper appears to be more selective using its “Get objects in group” feature but it’s a little obscure. The connection is only “explicit” in the sense that Data Dam and ObjFromGroup (and only those two components?) must be in the same group, a condition that is easily broken by accident. Besides, installing Metahopper for this feature alone isn’t worth it to me.

It would be best if the trigger is an event rather than a condition (“an integer value from a file is equal to a specific value”). Events don’t really exist in GH while a condition could be true thousands of times.

And there is serious flaw with Data Dams, mentioned a few days ago by @ivelin.peychev in another thread: they leak and pass data once when a GH file is opened! Very bad. :man_facepalming:

You don’t need Python since Stream Gate does the same thing:

data_dam_2019Jul20a (7.4 KB)

However… two things:

  1. To replicate multiple inputs supported by Data Dam (like Merge, Entwine and similar components), you have to either use multiple ‘Stream Gates’ activated by the same toggle (best solution) or Entwine first and BANG! (Explode Tree) after a single Stream Gate. (14.9 KB)

  2. Gates are not data dams since they don’t retain their values after the trigger event. Adding a data dam after the gate doesn’t solve that problem either (I tried it). This is an important difference. Data Recorder after the gate is tempting but highly problematic.

Conclusion: Gates solve the dam leak problem (pun intended) but don’t offer the same functionality in terms of multiple streams and more importantly, data retention.