Errrm,
This rule is too simplistic and will result in laying pattern that will not fit together. The algorithm needs to be much more complicated. You have to dynamically adjust the grouting or gap to cater for the different slab sizes. Imagine a very simple arrangement where you have 3 1x1 (flags/pavers/slabs) next to each other, then compare the length against a 1x3 flag and you see the problem, with a 1 cm jointing gap one row is 3 units + 2 cms and the other is just 3 units and they do not fit.
We have developed a tool which actually achieves this.
For further information contact us at:
Nick Deakin
Bloom Media UK Ltd
http://www.bloommedia.co.uk/services/creative_graphic_design/multimedia_and_3d/index.shtml