Joining items within nested lists?


How does one combine nested items within sub-lists?

I’ve got it figured out for one of the items (above yellow line), but cannot combine while preserving the sub-list structure.


GOAL: draw lines between each point, within original sub-list (each represents a row of beams).

CHALLENGE: create sub-lists without making them into one long continuous chain of beams.

Thank you in advance for your time!

I’d try running the points through a " PolyCurve.ByPoints" and then extracting the pc’s individual curves. Tho make sure that your points are sorted correctly.
Another way of doing this would be to chop the list into sub-lists with the “List.Sublists” node and running the output through a “Line.ByBestFitThroughPoints” node.


Since you’ll be needing curves to create beams eventually in ny case, I would take another approach: Create a polycurve from each sublist, explode each polycurve into a set of curves and then lose the last curve in each sublist. Done.

Oh dang, missed the part about not wanting them to be continuous. Maybe try “List.DropEveryNthItem” to extract every other beam curve?


Haha, looks like we tackled this one simultaneously, Dimitar. I think we need to coordinate more… :wink:


Thank you very much!!