Applying a single index topology to multiple point branches

datatree handling problem.gh (31.9 KB)

I am currently facing a challenge related to handling a DataTree structure in Grasshopper.

I have a tree of points organized into three branches, and I also possess point‑to‑point topology information generated by a lattice topology component. My goal is to use this topology data to reconstruct the original lattice.

The issue arises because each physical vertex is duplicated across the three branches of the DataTree. When there is only a single branch (i.e., a single list of vertices), the reconstruction works without problems. However, with three branches, the indices in the topology data no longer correspond correctly to the vertices in each branch, leading to a mismatch that prevents proper lattice reconstruction.

I would prefer to solve this using standard Grasshopper components, without resorting to Anemone or custom scripting.

Thank you in advance!

Hey Quan Li! Not sure I fully understood what the desired outcome is.

Are you trying to pick the 158 points in the first branch without exploding the tree or are the indices supposed to pick points across all three branches not just the first one?
datatree handling problem.gh (46.4 KB)

datatree handling problem v1.gh (33.2 KB)

Thank you, @René_Corella !

I have a set of points (moved them a little bit with noise) and a topology (connection) map of the points. I like to rebuild the lattice with the moved points with the topology map. It is easy, just do it this way.

But, when it comes to 3 sets of the points in one data tree, I don’t know how to rebuild the 3 set of lattices in elegant way without coding or Anemone.

Ok so you should end up with three rebuilt lattices?

Dear Quan Li (and Renè)
Like to learn something too. If I understand this well, this should be the result? Three lattices on top (or around) eachother??
The way I did this now (explode tree) + copy/paste is not elegant in any way, so that’s where I love to learn more about data handling. Regards, Eef



datatree handling problemEW.gh (40.8 KB)

Thank you, @Eef_Weenink .

Yes, that is exactly what want to achieve, but without the Explode Tree method.

This problem has puzzled me for years. Sometimes I think this kind of processing tree data with tree data problem might be a limitation of Grasshopper’s datatree operations when using only native components.

Surely somebody else on the forum will know how to do this. Maybe one of them, like @René_Corella , @inno @leopoldomonzani (may I please, as for your help) will jump in, with a nice instruction.

Thanks for the clarification “I see it” now. You have X amount of points (A) and each connects to 3 {topologized/indexed} points (B) to form lines into a lattice structure. You want to apply this same “recipe” to the three stacks of points without exploding/flattening anything to end up with three separate lattices. I think you’ll have to repeat the indices as three stacks as well. I might have thoughts beyond that for tomorrow :sleeping_face:, but I am sure someone will catch it sooner.

Here are two options, the longer one without creating duplicate lines

datatree handling problem mrtn.gh (50.1 KB)

datatree handling problem_FF.gh (52.5 KB)

an alternative to remove duplicate lines would be finding a way of filtering the repeating pair of indexes before creating the lines (0-1 is same of 1-0 and so on)

You guys are solid rockstars.

Changed topic title as this isn’t a datatree operation “limitation”, it’s a data alignment problem. :nerd_face:

This is a very simple, easy‑to‑understand, and efficient solution. I think I was overcomplicating things. Thank you very much!@martinsiegrist