import rhinoscriptsyntax as rs

#delet everything and start from scratch
allobjs = rs.AllObjects()
rs.DeleteObjects (allobjs)

bsize = 15
ysize = 8
xsize= 2              # side length of box
dist = 5                  #distance between boxes
offs = bsize + dist         #offset of boxes
num = 10




#creat a box
corners = [(0,0,0), (bsize,0,0), (bsize,ysize,0), (0,ysize,0),
           (0,0,xsize),(bsize,0,xsize),(bsize,ysize,xsize),(0,ysize,xsize)]

rs.EnableRedraw(False)

for i in range(num):
        for p in range(num):
            box = rs.AddBox(corners)
            rs.MoveObject(box, (i*offs, 0 ,p*offs))


