Grasshopper

algorithmic modeling for Rhino

Hi everyone!

I have been looking for this information around in the different discussions but I haven't found the solution I am looking for yet.

I was wondering whether there is a Data Dam component which could take externally the true/false value (at the moment I need to switch it on and off with a mouse click - however I would like the on/off switching to be linked to an external event). What I am trying to achieve is to use the Data Dam to stop the continue computation of data that I don’t need, in order to decrease the CPU workload. My sketch is too heavy! Specifically I’d need a Data Dam that will let the data flow through an external Boolean value.

Thank you!

Emanuele

Views: 5132

Replies to This Discussion

Hello Emanuele,

have you tried stream filter. seems like it can do what you are after

best,

alex

Hi Alex

Thank you for your answer. I tried with the stream filter but unfortunately it doesn't work as the main problem is with the timer. Namely, it seems like the timer goes through the stream filter. To be clearer, I explain better what I am trying to do.

I am using Arduino with 14 potentiometers which give the imput to my sketch (which is quite heavy).I am trying to interrupt the entire data flow in a way that only one stream at a time goes through. I noticed that using the stream filter, my sketch components read anyway the data depending on the timer, while the Data Dam seems to block the timer. Hence, I was thinking of a Data Dam with a true/false input.

i am not sure i understand what you are after. You want the component to read the potentiometer values not continuously but when you decide you tweaking is over(rotating the potentiometer)? or you want to cycle through 14 potentiometer values one at a time and not read all 14 of them?

since data dam does not use Boolean toggle, rather expects you to press play, one workaround could be gate component. for all these components make sure you take advantage of ZUI (adding inputs outputs through the plus minus signs that appear when you zoom in)

if these fail i guess some sort of custom c# component is needed to be written.

I manage to let flow one data at a time, my problem is that even just this single data, makes the sketch heavy because the data is sent continuously because of the timer. So I am looking for the way to the data passes only one time (not continuously) when I switch the potentiometer. Thank you for your answer and I will try with the gate component in the meantime.

Hey did you manage to work it out?

I have a similar issue while working with Leap Motion inputs. I needed to read data just once for every time i flip boolean true, instead of letting a stream of data flow endlessly until i toggle false.

Since firefly's Leap Motion input runs at a smooth clip, i would get at least 10 recordings of data when i press the Button component once.

i'll keep trying to work out a method in python, as i don't know c# of VB, but if someone knows the solution please help!

Hi Emanuele,

you should check out Metahopper.

You can set the value for the Data Dam to either 0 or 1.

I used this to connect / synchronize multiple Data Dams.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service