Say I have 10 cubes in a line, I'd want to represent that as 1 cuboid with a size of 10 units along whatever axis they're lined up on. However, if I add another cube next to the first to form a little "L" shape, then it'd take at least 2 cuboids to represent the shape.
If I had some complex arrangements of connected cubes/cuboids, how could I calculate the minimum number of cuboids necessary to represent their shape/volume?