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 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.