Measure the volume of solid objects using unit cubes