Grasshopper

algorithmic modeling for Rhino

Hey Guys,
I am recording curves every 2 seconds. Is it possible to have these curves automatically baked at a certain time interval (15 seconds) and then have the recorder reset?

I then want to select the baked curves automatically and insert them back in the definition? I am guessing a bit of scripting is needed. Anyone else done something similar?

Views: 1232

Replies to This Discussion

Is what you described exactly what you're after or is that already an assumed solution to the real problem?

I.e. do you really need the baking and do you really need it in steps of 15? And do you really need them referenced back in?

--

David Rutten

david@mcneel.com

Hi David,

Yes this is what I need. Basically I am using Kinect and reading curves from movements of the body, so I need to record them every 2 seconds.

Then, because the script gets very heavy if the recorder is for too long, I want it to reset, but I do not want to lose the previous curves, so I want it to bake them.

Does that make sense?

 referencing them again after they are baked is for the purpose of lofting the curves that were baked in GH, so I do not need to do any lofting in Rhino. 

So the problem is that it gets too slow to keep all the curves 'live' and your assumed solution is to bake them in groups of 15, then later read them in again in the correct order.

What bit of it gets slow? Is it the display of recorded curves? Are you using those curves downstream to perform more calculations?

Note that baking increases memory usage and also slows down performance. Storing the curves in memory would be quicker. Since this problem will almost certainly require some scripting, I think it makes sense to try and figure out the absolute ideal solution to your problem rather than already constraining ourselves to things like the DataRecorder, Baking and Referencing.

How about a component that internally maintains a list of curves, and always outputs the most recent 15 of them in one parameter, then creates a loft of all cached curves when another input is set to TRUE?

--

David Rutten

david@mcneel.com

Hey David, 

You are write - storing in memory is much simpler and also faster.

I managed to do it without scripting (as I am not experienced with doing so). I simply used a partition set at 15 on the original list of curves. In the end this gives me the result. It refreshes every 15 curves and creates a tree with branches of 15 curves - I then loft these branches separately. The nice thing is, that with this method only the last branch of 15 curves is shown - which is what I wanted in the end. 

I can then, very simply with a [list Item] component browse through all the lofted branches.

hope this makes sense. 

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