Polyline Longest List

Hi everyone,

I am having trouble generating lines or polylines connecting points along other polylines. I have a series of polylines that I then explode, and I wish to connect each vertex to the following. Some polylines have more vertices than the other, so all extra points need to connect to the last point of the previous polyline. I can’t achieve this.

I was able to create this one branch at a time, but not on my entire tree…

Left: GH output. Right: Expected.


PolylineLongest.gh (15.0 KB)

Thanks for any help,
Shynn.

repeat last based on the longest tree


PolylineLongest.gh (26.9 KB)

1 Like

Hi Thomas, thank you. But ssn’t there a way to make this with lines to both sides instead of one polyline? The ultimate goal is to loft these lines, the problem with the polyline approach, I realized, is not so much the duplicated ones that can be culled, but the fact that in my general case some of the red lines in your picture, originate from the same point. And so the polyline collapses these points, and then the loft gets messed up.

Check this as well.

PolylineLongest_re.gh (11.9 KB)

1 Like

Exactly!
Thank you Kim.