Help with voxels, culling

I am creating overlapping voxel grids based on rectangles drawn on the CPlane. The basic script works but there are two key things I need to implement, the second of which may require rewriting of the script:

  1. extend box array in more than 1 x/y dimension. This is because the starting rectangles are not necessarily at the extent/edge of the space and I need to fill both ways in x and y (Z is only going up).

  2. I would like to add a directional influence to the culling. I need to show a gradient of culling from one end of the voxel grid boundary to the other