Assign rectangular panel to surface

This might be useful? I adapted some Python code (somewhat blindly) that generates combinations of a list of values, from here:

The code generates 524K combinations in 3.5 seconds. Then I filter those that add up to 9.

5+4
5+2+2
4+3+2
3+3+3
3+2+2+2


assign panels_2023Sep5b.gh (33.1 KB)

Inserting CSet prior to Split (Text Split) was crucial to improving performance.
Split was producing ~five million results in 3.3 seconds but MA was taking 1.6 minutes :exclamation: