I'm looking for an algorithm that finds the smallest box enclosing a polyhedron.
My idea is as follows: find the largest side, and move the solid so that side aligns with the x axis. Find the next largest side that meets this side, and align it as close as possible to the z axis, while leaving the other side on x. Then, calculate the greatest differences in x, y and z. Use those dimensions to create the surrounding shape and then shift the box back to the object's original location.
Is there a more efficient strategy for this? Does my idea overlook some corner cases?
Edit: For now assume the object to be bounded is convex. Though, an answer for the general case would also be welcome.