Grasshopper

algorithmic modeling for Rhino

data persistence: storing input data from number sliders

Is there a way to store data values set by number sliders so that a single set of controls can be used for multiple "stations"?  For example, I have sliders and knobs that define a curve for a boat hull cross-section and want to re-use these controls to define multiple "stations" (cross-sections at different X locations from bow to stern).

At present, I have to duplicate the controls for each station, which makes it clumsy to have an arbitrary number of stations.

I searched for "persistent data in Grasshopper" before asking this question but didn't find the issue expressed this way.  Thanks.

Views: 4057

Replies to This Discussion

Thanks again for sharing this great bit of code.  I've been playing around with it, seeing how you take snapshots of merged slider values, sort them by 'X' - WAY COOL!!  Very good ideas here.

I added an interaction to view any one of the saved sections ("states", stations).  The idea is to edit the params for each of these using one set of sliders that reflect the values of the indexed (sorted) "saved state" for that section/station.

Attachments:

Hello Joseph,

The sort by X helps keep the definition organized but mainly it is crucial for the loft component which needs the curves sorted.

As for saving the data I have done something similar before, using this custom component by  Victor Leung & Remy (RMDeveloppements), together with a [read file] component (for loading). So you could save the list of sliders' values to a text file and then, when you reopen your definition, load it again (with [read file]) and plug it into the [data recorder] together with the input it already has from the sliders.

I am afraid I don't fully understand the reason for the part you have added. Don't you get the same info in the "section at current X" panel when you set X to a value that already has a section?

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service