Longest List
00000000-360e-41f5-bf4b-b5331275ebd1
First List inputtree · optionalFirst list to expand.Second List inputtree · optionalSecond list to expand.First List outputtreeFirst expanded list.Second List outputtreeSecond expanded list.Repeat items in the input lists until the lists are all equally long. More inputs can be added by zooming in on the component until the add and remove buttons appear.
This component applies the Repeat Trailing lengthening mechanism by default; this is also the default logic used by Grasshopper when pairing up mismatched value collections. Grasshopper provides a total of eight lengthening algorithms, which can be manually selected from the menu of this component, as shown in figure 1.

Figure 1. The component menu provides access to all eight list lengthening mechanisms.
The available mechanisms are as follows:
| Value | Name | Info |
|---|---|---|
0 |
Repeat Leading | Repeat the first item of a collection. |
1 |
Repeat Trailing | Repeat the last item of a collection. |
2 |
Repeat Extreme | Repeat the first and last items of a collection. |
3 |
Repeat Inner | Repeat the centre−most item of a collection. |
4 |
Interpolate | Repeat all items as regularly as possible. |
5 |
Wrap | Repeat the entire collection. |
6 |
Flip | Repeat the entire collection, with every second repetition being reversed. |
7 |
Zig−Zag | Repeat the entire collection, reversing every second repetition, without allowing duplicates where repeats meet. |
Note that the Expand component offers this mechanism selection as an input, removing the need for manual selection at that juncture.
