I have created a definition that uses lists to set dimensions of a model for 3D printing.

For example: if I had a rectangular extrusion, one list would correspond to the width of the rectangle (10, 20, or 30 mm wide), another list would set the height of the rectangle (10mm, 20mm, or 30mm) and another list would set the depth of the extrusion (10, 20, 30, or 40mm).

Is there a way to find every possible combination of these two lists, then output the resultant objects in grid?

For example: the first object would be a 10 X 10 X 10mm rectangular extrusion, the second object would sit 100mm away from that and be a 10 X 10 X 20mm rectangular extrusion, and so forth until all possible combinations were exhausted and baked into a Rhino document.

The white group adds labels showing the dimensions of each permutation. Note that some of them are simply 90 degree rotations of others, it would be interesting to remove those eh?

The white group in this model is a fragile effort to ignore rectangles that are rotated 90 degrees (X and Y dimensions are swapped). It uses points as a data structure so while looking for a way to sort the output, I used Sort Points before â€śdecodingâ€ť X, Y and Z coordinates to use creating boxes and tag labels, as before (gray group).

27 unique combinations according to this, suggesting that nine of 36 permutations in earlier models were copies of others, just rotated 90 degrees?

This version keeps the abstract points as a data type so Sort Points can be used on the result but completely bypasses the check and culling for rotated shapes. Consequently, all 36 permutations are displayed in a different order from earlier versions. Makes sense!

After experimenting a bit with the different options people so graciously offered I realised I had to redefine my request.

To make the definition work, I need to resort the options before they enter the component inputs.

Below is an example. I have 12 lists, each of those lists has a different amount of items. Iâ€™d like to be able to index every combination of those items so that I can call up a combination simple by entering the index number. Each list item would then be plugged in to its respective socket.

Thanks so much for this. I tried recreating your example with all 12 lists. It appears you have multiplied the second two list together to get the number of repeats for the first list. When I tried this with all the lists the Repeat Data component timed out.

mmhhhâ€¦ Iâ€™m trying to figure out how this should be working

letâ€™s say you want to see combination number i, and you have 12 lists with different amount of elements inside

for the last list, namely list 12, you want to see item at position i plain and simple, it will just iterate through the items contained

for the last-but-one list, namely list 11, you would like to see item at (i calculated on base â€śnumber of items in list 12â€ť )
which should be equivalent to i \ [integer division] list_length(list_12)

to which should follow for list 10, i \ [ list_length(list_12) * list_length(list_11) ]