Need help! GH C# asign Data from a Tree to a list

Hello,

I need to bring a tree an a list together. I tried it with grasshopper tools, but couldn’t find a solution. Now I want to try it with a c# code.

My list needs to have the same order as my original List with the Breps. But instead of Closed Brep I need to have the index of the tree. The Breps are sorted after attributes in the Tree List.

So it should be
0 {0}
1 {1}
2 {2}
3 {2,3}
.
.
.
34 {-1}

original List:

List 2:

Thanks for any help.

Dani

Er … hmm … what means index of a tree? (maybe you mean the path.Indices[0] ? ) . And what means the {2,3} ?? Maybe this item is in path {2} AND {3} ?? And if you want a List out of the Tree by what means can you tell where item N 66 is in the Tree? And … why to do all that?

Moral: provide explicit description in clear steps like talking to a very stupid robot: (a) I have a Tree, (b) … (z)

I want to have the Indices which are from -1 to 12. In the braches of this tree is the information if it matched to one of my 62 Breps.
The result should be a list if my Breps and in which Indices it belongs.

I want to create a tool to see if buildings for a surrounding model have the same size but only in 2 directions. It helps me (an Architect Student) to build models and save material.

Modellbauhelfer.gh (24.2 KB)
3D Modell_5 Kopie.3dm (7.4 MB)

OK, here’s the deal (I haven’t got at all what you want based on your explanations(?)):

IF you can explain accurately what you want to do with these 62 things (or any thing) then I could provide a C# that does all the job.

For instance: what means same size? (same in X + same in Y + … ??) What if the buildings are not plain primitive boxes? You mean maybe same volume and/or same area and/or same N of faces and/or same N of vertices ??? Or you mean same footprint area? Or you mean same Z (within a domain). And what means direction? You mean a Ray3d that if intersects a building then this is sampled for a query? Or you mean that the building is sampled on some sort of proximity basis?

That sort of things: as I said … like talking to a very stupid robot.

BTW: Given the opportunity (speaking having a “general case” in mind) If you want to do multiple queries on things the classic way is to create a class that provides attribute info and then use Where:

Then, after populating a BrepInfo List (named in this example brepInfo) you do “sequential” Where queries: