Grasshopper

algorithmic modeling for Rhino

hey, i am confronted with the following (simplified) challenge: dynamically create and assign spheres of radius x and curve parameter y (location of sphere center on the segment)  to segments of a polyline (see image). 

it should work as follows: choose the segment-index with one slider, choose the number of spheres for that segment with another one. finally, step through spheres to set their radius and location on the respective segment.

can this be done at all? any help appreciated.

best regards from vienna,

heinz.

Views: 803

Replies to This Discussion

Is the radius to be pre-set or assigned based on its location or proximity to the other spheres?
no, the user should be able to raise and lower the amount of spheres per segment and freely edit the radii and sphere positions.
For this scenario you would either need to have a maximum number of spheres limit where you created a slider for location and one for radius for each individual sphere up to your maximum. or you would have to edit the values in a text panel manually.

Sliders: Individual Spheres created using individual sliders


Panels: Multiple Spheres created using panels

hey danny, thanks a lot!

however, since the number of segments may change throughout the design phase (up to approx. 100), and the number of spheres per segment may vary a lot (up to 10 also), manual editing of values won't be efficient.

to become more specific, my question was targetted at how to dynamically organize a data-tree in order to achieve a data-structure capable of holding the described scenario. do you think this is possible in some way?

best, heinz.
Sorry I missed the Segments bit. I'll have re-think and get back to you.
I think I would approach this with the data being managed in Excel to generate csv files with the dynamic data. And then streaming the contents of text files into GH with the panels. Split the text strings with GH v0.7's string tools and plug these into the location and sphere components.

hey danny, this is definitely heading into the right direction. do you think there is any chance of interactively setting the contents of the leftmost lists in your image via grasshopper?
Up to 100 segments, possible 10 spheres per segment, 2 variables per sphere. Makes for 2000 interactive inputs.

Is this something you need to do interactively?

There are ways of linking Excel with grasshopper so that when data is changed in Excel you can see the results in Rhino.
hey danny, the spheres thing was just a largely simplified example for something i need in a design tool, such that editing excel-sheets is not really an option. i now c-sharped a component holding an appropriate data-tree which can be edited interactively. works well, but took me quite a while.

thanks a lot again, heinz.

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