I have a series of branches in a tree that contain the same amount of data.I am trying to identify which branches contain the exact same data.
The end goal is to rename each unique branch a unique name. Matching branches the same name
I have a series of branches in a tree that contain the same amount of data.I am trying to identify which branches contain the exact same data.
The end goal is to rename each unique branch a unique name. Matching branches the same name
How is that done? Never heard of naming branches before. You might want to look at Sets, but without posting your GH file, I won’t be able to help.
3. Attach minimal versions of all the relevant files
I meant naming all the data within the branches the same thing.
Branch Naming.gh (22.4 KB)
Branch Naming.3dm (19.7 MB)
Awesome thank you
Here is the way I see your data:
This is how I got that:
If you concatenate the CS59 and HCH values, once again there are 71 unique values:
So it appears to me that the values beginning with CS59 are unique enough to identify branches that are the same? So that gives me two list: Unique Names and Corresponding Branches:
I’m not quite sure what you want to do with that? Maybe use Tree Branch with the path values from Corresponding Branches to do your renaming? Good luck.
Yeah I started looking at it in a similar way. Index 2 & 3 (PS and TR) are the same for all. So i took the index 0 & 1 (CS & HCH) and added them together. Took those values to find the unique and duplicate branches.
I use sets a lot and understand them for single lists but get thrown off when I’m looking at groups of data in branches. It works but I was hoping there was a node or method i was unware of that treated the branch as a whole as an individual set in the overall tree.
Anyways I appreciate the help. Thank you
Did you notice that I selected the first value in each list and then flattened the input to CSet? That is the way.
I can’t read the image you posted (too small) and you didn’t post your GH file so I don’t know what you did. Since I don’t have EleFront, perhaps it doesn’t matter.
P.S. Maybe like this? I didn’t bother to rename the HCH values (perhaps not necessary?) but the bits to do that are all there.
I did, the issue is there is about 8 different HCH scattered in there so I need both the CS59 and HCH values… The file i am working with was too big to upload so i deleted a bunch of stuff out. A few HCH types must have been deleted out in the file I uploaded.
I realize too concatenating the first two index, flattening, then create set is the easy way to go.
Thank you