algorithmic modeling for Rhino
Hi all,
Just beginning to learn list management. Any help you could extend would be appreciated!
The problem:
I have a list which has a series of branches, each with a single mesh and multiple polylines. The branches are currently organized by the volume of the single mesh that appears at the first indices of each branch (low volume to high).
My intention is to cull the 500 branches with the largest mesh volume then split the list of 500 branches into four even chunks.
The trick is, I need the final list to keep the original format ie. one mesh at the first indices and the corresponding polylines.
I have no idea how to do this! could you please help!?
Tags:
20.5 MB GH file! Wow.
You might want to spend a little more time studying the code we did three days ago:
http://www.grasshopper3d.com/forum/topics/merging-two-list-by-testi...
Because it takes only a few small changes to get from that to what you want now.
Question: why are the curves already partitioned into 555 branches (close but not quite the same number as the 558 meshes)? I had to flatten both lists for the previous code to work properly. Seems to me that merging different data types (one mesh and a bunch of curves) into the same tree (list/branch) might create headaches down the line.
Thanks again for the help Joseph,
I am just getting a hang of list management, so my apologies for the dumb question! I don't know why I didn't understand that you could create the subset before the merge, but I get it now! It makes perfect sense.
In the future, I'll keep my file uploads less than 20.5MB too!
I have been processing a large number of meshes by extracting their centerlines and then using those centerlines to reorient the meshes... which is why I have been combining them on the same branch/tree. Maybe I will see if there is another way around this if you say it may cause headaches down the line.
The reason for breaking everything into 4 chunks is because it is getting too heavy to process in Galapagos.
Thanks!
Ethan
I think you are seeing the kind of headache I'm referring to. See how easy it is to manipulate the list of meshes alone? Not so easy anymore after the meshes and curves are merged, is it? In fact, did that partitioning step do you any good? No hard and fast rules about this stuff, merging might make perfect sense for you.
If you want to split up your data, I would suggest doing this:
Now you've got four sets of meshes and four sets of their related curves. You can save each pair in a separate GH file, 'Merge' them if you wish or work with them as paired, separate data trees.
Just beginning to learn list management. Any help you could extend would be appreciated!
Have you played with this 'Tree/List Viewer' tool I wrote? Try connecting any data tree of geometry to the 'Tree' input and move the two sliders ('path idx' and 'list idx') to visually highlight the selected branch.
Very simple pair of clusters, you can look inside both of them to see how they work.
Joseph,
This is a great tool! This is going to be very helpful while I'm getting more comfortable with list management. Thank you!
Ethan
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by