Construct a data tree with a specific path

Hi all!
The frustration is real on this one. Because I believe the solution is pretty simple but I cannot find it.
I have a list of contour curves, each on a different plane through the Z axis. I want to convert them into a data-tree grouped together depending on the Z value.

Here, I have analyzed the Z value of each one, but I don’t want just to Graft because some curves are on the same plane. What I’m trying to do should look something like this:
{0} N=1
{1} N=1
{2} N=2
{3} N=5
|
{162} N=8

Total N = 440 , Total branches = 163

Any help is much appreciated.

Are you aware of this bug, that the Contour component is creating duplicate curves?

Aside from that, it would be easier to answer your question if you posted your code with internalized geometry. Other than the bug, I believe Contour produces the data tree you want.

P.S. If you must use your contour lines (from a scan?), there is a way to create the tree you want using MIndex (Member Index). It is a variation of this model:

1 Like