Computational divided box, for different sizes and different number of divisions.
Not sure if I did it in some odd way that made it more complicated or if the scad language simply doesn't lend it self to this sort of thing.
Think that it would be way better to use python and some object oriented approach to this in the future.
Change the p variable to 1 if projection that can generate dxf files are desired else leave it at 0 and it will be assembled instead.