Grasshopper

generative modeling for Rhino

Hello everyone!

I`m a Chinese student,and I like grasshopper very much!

Now,l have a question during my grasshopper study:

How to use the Timer?Maybe I need an example to know it.

Thanks!

Share

Attachments:

Reply to This

Replies to This Discussion

Hi Skywoolf,

why do you think you need the timer?

--
David Rutten
david@mcneel.com
Poprad, Slovakia

Reply to This

Hi David,

I`m not sure,perhaps out of curiosity.

My friend want to make a Video by grasshopper.

we think the timer will be helpful.

Reply to This

Hi David, (or Giulio if you look in on this)

While we're talking about the Timer component I don't seem to be able to get Giulio Piacentino 's render animation definition to work as its meant to. I just get null values from the component that the timer is tied to and the arrow of the timer is red does this indicate that its working or not working. I've made sure that the global abort is free for timers but nothing is happening?

Best regards,
Danny

Reply to This

Hi Danny,
could you have a look if this definition is working for you?
It is meant to work with Grasshopper version 0.6.0019. To check if you have it, click on Help -> About. If it still does not work, could you please send me your Grasshopper log after opening the definition (send to the email address below)? For that, click on View -> Event Log -> Save As...

- Giulio
______________
giulio@mcneel.com - Barcelona
Attachments:

Reply to This

Thanks for this I think I have identified the problem, I'm currently using a pre-release version of GH for testing 0.6.00030 and there does not seem to be an EH_OGLShader

21:47:58 (+270ms): Error: The type or namespace name 'EH_OGLShader' does not exist in the namespace 'Grasshopper.Kernel.Types' (are you missing an assembly reference?) (line 113)

I'll email the file when I get to work tomorrow if it helps.

Reply to This

Danny, all classes have been renamed from EH_ to GH_ prefix.

EH = ExplicitHistory; GH = GrassHopper.

If you rename those in the script it might work again.

--
David Rutten
david@mcneel.com
Poprad, Slovakia

Reply to This

If we can use timer to make something run itself along a circle?(without using sliders)

Reply to This

You can use the timer to periodically expire a single object. The timer frequency does not represent that actual time between ticks, but rather the idle time between the completion of one solution and the start of the next. So, typically the actual tick frequency is the timer frequency plus the time it takes to recompute the solution.

Timers are used mostly to read out serial port data or to parse textfiles.

You can use the timer to get the current system time, which could be used to animate something without use of sliders.

--
David Rutten
david@mcneel.com
Poprad, Slovakia

Reply to This

I beg your helping please,david,my hero.How can I make the Z value of a point increase 1.0 every second,using Timer.I've failed so many times.

By the way,I and my friends are now translating into Chinese,We've already get to 7.8,maybe we'll need your help after a few weeks. ^_^!

--
Chen Hui

Reply to This

Using a timer itself will not get you there. If you want to change some data every interval, then use that new data fot the next iteration, you either have to find a way to store that data outside the Grasshopper data structures, or you have to somehow link the time variable to the data.

Solutions:

1) Store the point as a static variable inside a Script component., then increase whenever the RunScript function is called.

2) write the data to a file, then read that same file on the next iteration, move the point, overwrite the file again.

3) Use a Script component to extract the total number of seconds that have passed since time T, then feed that number info the point component.

--
David Rutten
david@mcneel.com
Poprad, Slovakia

Reply to This

Thanks for your answer,David.I think I have found the meaning with your help.


Best wishes!
skywoolf

Reply to This

Hi David,

What if you want to send packets of information to a serial port in specific intervals?
let's say i want to send the travel distance in Z axis every 2 seconds?
I guess what I have in mind is a component that works similar to the Metro object is max/msp and pd.
is there an example definition for the timer that you suggest looking at? I can't figure out how i'm supposed to work with it.

Cheers,
mani

Reply to This

RSS

© 2009   Created by Scott Davidson on Ning.   Create a Ning Network!

Badges  |  Report an Issue  |  Privacy  |  Terms of Service