Grasshopper - intersection issue

Hi there.

I have a problem about ordering sections resulting from intersection Brep-plane. I have one Brep, a series of 4 surfaces (moved vertically), intersection command. The result is 4 groups of intersections (as shown on panel).

The problem comes when I tried to retrieve a single group of intersection (for example the first, that includes 2 closed curves). The list Item “0” should give me 2 curves, but when I take out the set from “list Item → 0” 4 curves are highlighted…. and the problem is the same when is try with “list item → 1,2.3…”…

Do you know why? Could you kinldy help me?

Thank you in advance.

I don’t see the issue. Those trees look exactly the way they should look with branches for the different amount of intersections at each layer.

List Item doesn’t return branches. Only indexes. So using List Item on a tree will give you all items at index 0 on every branch.

Rather just upload your code.

Thank you for you answer. Maybe I didn’t explain wuell my issue.

The tree looks exactly the way I want, it’s ok. My problem is: when I try to retrieve, for example, the first branch (i.e item 0), I expect to have only 2 curves selected (those one of the first set). But now, when I select the “item 0”, Gh gives me 4 curves, apparently randomly taken.

I want to retrieve every branch correctly organized, every one with its corresponding curves.
Let me know if the issue is clear.

Daniele, you need to better understand how datatree works.

@Joseph_Oster do you have your usual “tree explorer” definition ? That would be handy here…

List Item = Index. So if you have 4 branches and each branch has an item at index 0, then using List Item on that tree will give you 4 items at index 0 (one item from each branch). List Item is not used for getting branches, it’s for getting indexes.

Ok thank you.

Now I understood.

P.S. This thread is not in the Grasshopper category :question:

P.P.S. No GH file posted :interrobang: :-1:

Here is the Gh file.

branches.gh (9.6 KB)

You didn’t internalize the geometry, so the file is useless..

I’ve taken the liberty of retagging it to Grasshopper.