Grasshopper

algorithmic modeling for Rhino

Converting n separate lists into a tree with n branches

I've got an ugly array of components from a 0.5 build that I'm trying to streamline in 0.6. With time and persistence I can clean up a lot of redundancy, but sometimes it's too much trouble to backtrack, and I just want to convert multiple streams into one stream with multiple branches. At one place in the definition, I have n number of lists, each with, say, 100 items. I'd like to funnel all items into a tree with n branches.

Currently, the only way I've been able to pull this off is to flatten each list with its own flatten component (one component for every list), with each destination path ({0;0;0}, {0;0;1},..., {0;0;n-1}) assigned manually. As n grows large, this becomes very cumbersome. I'm almost certain there's a way to streamline this, but I'm not sure if it involves being more clever with the flatten component, or finding a different route. Any help? Much appreciated.

Views: 249

Replies to This Discussion

[nudge]

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