Split tree according to tree path into subranches

Hello,

I am currently designing a a ribbed shell structure, and I came across a problem I could not solve :

I am trying to generate longitudinal curves from the list of points that generate the transversal curves.
As you can see, I can achieve that result by selecting manually every item, however, if i want to increase the density of longitudinal curves, i will need to copy and paste my components which does not seems the right way to do it.

I thought I could find a workaround by splitting my tree into sub-branches based on the number of points or segments for each transversal curves. However I dont know how to split my tree from these data, I was wondering if there was a way to achieve this. (I assume there must be one ?)

Has anyone an idea how to split my tree into subranch base on the data on my cull pattern ?
The results I was expecting to find for my points would be something like
Branch 0 : Subranch 0 and 16
Branch 1 : Subranches 1, 2, 14, 15
Branch 2 : Subranches 3 to 13

Then I think i’ll be abble to pick items and merge them in order to generate my curves
(My end goal is to sort the points by longitudinal curves to generate the polylines)

Thank you for reading

Subdivide tree branches.gh (20.2 KB)

forum_tree.gh (24.7 KB)
here is a quick fix
i assume your transverse point branches always have even number of items, and that they increase symmetrically

truth is unless you keep track of the position of the 2 points of shorter branches, there is no way that GH knows how they match with another branch that has 6 points. one always has to do what you did.

Hello Will, your solution is neat and clean, thanks a lot for your time.

Your Assumption is right : my transversal branches will always have even number, and they will increase symmetrically. (for now. Maybe best tol keep that as a design constraint.)

Regarding your last comment, something I tried (whitout any success for hours) was to split my tree into sub-branches according to the lenght of each branch. This way, I was expectingto be abble to track when to add points into the longitduinal list (like i did manually) further more it would allow me to work with non symetrical design.
That’s maybe what you meant by keeping track of the 2 points of shorter branches ?

Best,

exactly right
and that is what i did with that python component
it’s a layer of data structure management that is very tedious and perhaps mind bending with native GH components

Dear Thomas,
Here a solution with native components. Hope this helps! The initial branch count should always be odd.
Mr A.

forum_tree_V1.gh (30.8 KB)

Hi Will, Mr. A

Thank you again for your time and answers, both solution work fine !

Mr.A thanks for the native version which is easier to read for me, it is indeed mind-bending.

Best,
Thomas