I honestly wouldn't know how to figure that out. How would I check to see if a voxel is an exterior corner, or an interior corner? Like, if I had an L-shaped container?
Each Voxel is assigned to a group called a Component, and the type of Component determines what those voxels do. For example, a Chamber component can contain liquids, while Containers can hold solid cargo, and Pipes, which can hold and transport liquids.
The volume calculation is important only to Chambers and Containers at present, and the player places the walls of the chamber or container; once the player saves the current set of voxels, a class builds a new in-game Component based on what the voxels would do. That's why I need to be able to calculate irregular spaces, since odds are that players will be making irregular shapes.