This is useful in many contexts (e.g. to compare visually poses of different 3D reconstruction methods). Ideally, it would directly support different representations: meshes, 3d point clouds. This exists in CGAL: https://doc.cgal.org/latest/Optimal_bounding_box/index.html, but CGAL is quite hard to install I also found this functionality in Open3D: http://www.open3d.org/docs/latest/python_api/open3d.geometry.OrientedBoundingBox.html and in trimesh: https://github.com/mikedh/trimesh/blob/3bbe6b368c723f171b9d1aa7c58cfbaf77279546/trimesh/bounds.py#L108