algorithmic modeling for Rhino
Hello All,
I am amateur in dealing with lists involving more trees and branches. So here is my problem I have a list A and list B as show in the image below.
I need the branches of B from list A indices which is 3, 45 from first branch and 4, 5, 47 from second and so on. It means I need to choose branch 3 and 45 from list B using list A indices 3 and 45
I need it to be added after choosing the branch from list B, which is (branch 3 + branch 45) of list B. As you can see each branch in list B contains 101 items so if I add branch 3 and branch 45 it would give 101 items and added in same order.
Finally I need it like a list containing these 63 branches same count as list B but after adding branches that we got from list A.
Please help me with this, I tried using tree split could not achieve it still.
Tags:
Hey Gohan, can you upload the file, please? If you don't want to send the entire file you can right click on every component -> internalize data
And let me try to sumarize what you want here:
You have 63 branches in list B which shell be sorted by the indices from flattened list A. first indice is 3 so Branch 3 should be first in the new list, branch 45 second and so on, right?
Hello JJK,
Sorry for late response. I have attached the file after making similar scenario and also mentioned what I want to achieve but did for only one.. I think I could for all but pretty sure will take lot of time and still cannot make it neat and understandable. So please help me with this.
Hello Matt Gaydon,
It works perfect. I think I have to learn to use these text split components too. Brilliant work Matt, you changed the chaos into order neatly. Do I have to worry or expect anything if number of trees or items of any of the list change?
Just plugged back in your inputs and moved the sliders around, only thing i can see causing issues is i forgot to Change the Item wrap (W) input to False in the List Item Component so it does not loop back to the start of the list if the item index is not in the List B
Also just tested it with Various length B lists and it does not seem to fail.
Item wrap input doesnt seem to be a problem. Thank you very much Matt, you literally saved me lot of time in figuring out this. You are the real mvp today.
Here you have a less "hack" solution. The idea is to flatten list B and interpret each index branch of List A as the appropriate index domain relative to the flattened B list. That way you can use the List item to sort the references, similar to Matt Gaydon's method, but instead of using text, using index domains.
Thank you very much Daniel, will try this method too.. Looks Great
Nice! Like the edit, did not consider domains. To focused on groups / Single Entries ..
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson.
Powered by