Polylines from Crvs within Same Branches


Similar question to the one below:

How do I create closed polylines from crvs within the same branches in GH? In the image below I’d like to create a polyline from all curves in {0}, another from all curves in {1}, etc…

As always, thanks for any help.


Join curves. But you have posted no GH file (again) so still on ignore.

3. Attach minimal versions of all the relevant files

Thanks for the speedy reply @Joseph_Oster . I did try join curves before posting but it was not giving me the result I was after so I assumed I was approaching it the wrong way. Here’s an extract of the GH file with the my query.

Polylines from Crvs within Same Branches.gh (12.7 KB)


you had a data tree with 6 lists containing 3 curves each
after joining each list of 3 curves into a single closed polyline, you still have a data tree with 6 different lists containing just one curve each

so when you use List Item on that data tree, it retrieves the first (and only) item that is present on each branch… which is like the entire data tree again

if you want to cycle between the different curves you need Tree Branch component and travel along each branch, or you might flatten the list and use List Item component:

[edit] actually using Flatten is sort-of bad practice because it generates a “point of no return” :slight_smile: better Flip Matrix and then List Item :+1:


Or use Shift Paths. Thank you for answering this. I looked at the file @hayden posted but instead of internalizing the data tree of lines, plugins were required. Doh! :man_facepalming:


Thanks @inno for the detailed explanation. It really helps.

1 Like

also these will be super interesting :+1: https://www.youtube.com/watch?v=SmNPxKTDcQI&list=PL8q47GMo0JM-IdgOBe_AxkOb-B4P1u6Cc&ab_channel=Grasshopper3D and https://www.youtube.com/watch?v=ob3ER12ut3Y

1 Like