Grasshopper

algorithmic modeling for Rhino

Unflattening a list and parametric pattern generation for sift list

Hi everyone, hope you are reading this question while in good health and happiness.

Please excuse me that I am a beginner in grasshopper and attempting to grasp the data management methodology and ran into a little speed bump.

My questions begin by describing what I have so far, and that as the screenshot describes, I have a list of centroids that I have derived out of 40 boxes (generated through a loop and hoopsnake). I have split the 40 centroids into 4 lists using the sift pattern component (1,0,0,0) & (0,1,0,0) & (0,0,1,0) & (0,0,0,1). That ended up with 4 lists each made of 40 items (lots of NULLS in the place of each 0). I then used the clean tree to remove the nulls, and that successfully gave me 4 lists of 10 items each. When feeding the four lists simultaneously to the clean tree component I got a flat list combining the 4 sublists.

Finally my questions:

1- I want to recombine those 4 lists into a single tree structure (1 list with 4 branches, 1 for each of those lists, instead of 1 flat list). I tried the unflatten component but can't seem to get it done the way I want. Please note that I want the number of branches to be variable.

2- Is there a way to automate the sift pattern component generation instead of manually entering the above mentioned patterns? Because I want the pattern generation to be parametric and responsive to the number of loops used earlier to generate the boxes.

Your help is very appreciated, thank you all.

Views: 1728

Replies to This Discussion

Hi M.K.T. Heinrich,

Thank you very much for your informative response. I have applied the solution you provided to the problem at hand and it works perfectly. I am currently trying understand the solution and will need some time to dissect it.

Thank you greatly!

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