grasshopper2 Rhinorhino3d.com
ComponentData
Split List
00000000-b269-440e-acfc-2c342f145153
object preview List inputlist · requiredList to split.Index inputinteger · item · requiredIndex of first item in the second output list.First List outputlistThe portion of the original list that comes before the splitting index.Second List outputlistThe portion of the original list starting at the splitting index.

Split an existing list at a given index and output the two sub-lists on either side of the break. The index identifies the element from the original list which starts the second sublist. I.e. if the splitting index equals 15, the break will occur between indices 14 and 15.

1
2
3
4
Example file SplitList2.ghz.Interactive in Grasshopper 2
Split a list of 18 colours into two sublists and display them side-by-side in a panel.
1
2
3
4
5
Example file SplitList.ghz.Interactive in Grasshopper 2
Split a list of points into two, and place circles on the points in the leading sublist, and triangles on points in the trailing one.