Grasshopper

algorithmic modeling for Rhino

After adding timer upstream's component , how to let downstream's refreshing value become constant ?

     Hello , I added a timer 100ms to python or GH component , for example create number output for example 0, 1 ,2 ...

     it start to refresh in 100ms for 0000 , 11111, 22222 ...

 

     I hope to solve this , because : 

     if I link to data recorder or buffer or data log,  it create all same number ( in timer 1ms refresh) , 

     But if I use data dam ,  max 10 sec later , I get the new one only , can not get previous value .

     I hope to have idea to get the switch between "0 and 1" , or "1 and 2" , then generate output : "a = CONSTANT(0)" , "b = CONSTANT(1)"  or  "a = CONSTANT(1)" , "b = CONSTANT(2)

 

     I am sorry I have no idea for 3 days thinking . 

Thank you very much !

Views: 792

Attachments:

Replies to This Discussion

Hi Winsion!

Maybe i didn't understood completely your request... but have a look at this:

It's a workaround, probably heavy.

Used a data buffer to get only last 2 values, when those 2 are different it dispatch away last value to a data log. Then, because data log doesn't behave like a buffer, i split the log to get only last x (10) values...

Hope it helps, cya! :D

Attachments:

Hello, Riccardo , 

    You are rock with component : Buffer , List item , Equality , dispatch  ... 

    I just test with your gh , it seems good , I will immigrate to my GH to test . Thanks again !

Attachments:

Hello, Riccardo , 

      Your design solve part of my question  , just I found another small issue . 

      Plesae link Data Log again to the last component as list , then you will find the data start to auto-refresh again  :-) 

      Maybe it is a issue .  Thank you 

Winsion

Attachments:

See picture

Hi again, Winsion.

I don't get what are you aiming for.

What kind of sorting/extracting data you need?

In my solution you already get ALL new changing values with the first data log,

then with reverse/split/reverse i just extracted a sublist of the whole.

Can you give an example of what would be the list you need?

Cya!

Hello , Riccardo , 

     I use your GH example , then add data log again , link to reverse list component , 

     I had though it was CONSTANT value , but to my surprise,  it is fast Dynamic refreshing ...( see purple circle)

    

     Your GH file is good , I have solved my issue and finish my test project, just to let you know what I found only

     If you hope to know what I am doing , I would be glad to share to you . 

     Thank you again !

Oh... i misunderstood then :P

Well... good then.

:D

Hello, Riccardo , 

     At present , for the issue :

      fast Dynamic refreshing ...( see purple circle) 

     I make another group of component to solve . ( buffer , item list , equality , dispatch , data log ) ,  some repeat job ... 

     Thanks

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