I’ve been try to match items to a list of paths. I attach a simplified version of my project code. I was just ‘dumbfounded’ by how to do it in vanilla grasshopper, so in the end used python. But am still curious how to replicate the result in vanilla components, as it probably would speed up things and for learning
- The 1st script processes a list of paths and maps each orientation to its corresponding list of values, creating a structured data tree output. It ensures that all inputs are lists, maps each path to the appropriate input list, and organizes the results into a data tree structure with paths based on the index of each element in the orientation list.
Key Point: Each new path in the data tree is created based on the current index of the element in cell_face_orientation_path
.
- The 2nd script processes a list of paths and maps each value to its corresponding list of values, creating a structured data tree output. Each value determines which input list to draw from, and the results are organized into a data tree structure.
Key Point: Each new path in the data tree is created based on the orientation path value from cell_face_orientation_path
get branch from data tree.gh (17.2 KB)