Append tree item to branch path

I’m wondering whether there is a more compact (elegant) way to add the item values in the list like I did here:


Append tree item to branch path.gh (11.6 KB)
Perhaps by using the Path mapper component.

For context I am sorting curves and need to add new branches where the segments for each curve are sorted by angle.

I’m having some troubles understanding what is the final goal of that operation :upside_down_face:
could you please post a wider screenshot or a bigger portion of gh file?

@inno I have a bunch of curves, which I explode and then need to sort the segments into branches for all the curve segments that are parallel. In this test case, all lines are orthogonal, hence there’s only 0 and 1 outputs for the Create Set mapping, but that’s certainly not the case for what I plan on using this on.


Basically, what I am doing is altering the tree structure for the exploded curve segments and sort them by angle to test whether segments of the curve are parallel.

I think this would simplify the flow:

Append tree item to branch path_inno.gh (19.6 KB)

in the screenshot I have connected the Angles List because the curve list was not provided and wanted to show final data structure, but there should go the Lines instead

1 Like

Here’s another method: use the create set mapping and replace the } character.


Append tree item to branch path.gh (14.6 KB)

1 Like