A recent discussion on this topic reminded me to look into this very old script and tidy it up a little.
It can handle now any geometry that I can think of including block instances, meshes, and such.
Mitch has done a great job with his python version, so between the two, you guys have some options.
Edit: I know nothing about Py or rvb scripting but I see line 259 a very small condition value that should lead to a minimum Bbox but not the case here.
It is expected since the script is iterational (it’s an approximation).
If we were solving a mathematical equation, then we’d expect the result to be the same no matter the approach. but … this script is not analytical, it’s approximating. It tests bounding box sizes at various angles, finds the smallest and then zooms in that location and gets finer and finer angles until a tolerance is reached. So, the result will be asymptotic, but NEVER an exact number.
Yes. When you rotate the object in any way, not just z flip, the approximation starts from a different angle. It will try to get close, but will not be exactly the same. The variation should be within a small range (unless you discovered a specific corner case), but the randomness of the objects and the randomness of its rotation insert some randomness in the result.
This script is not used for laboratory or mathematical purposes, we used it to find the “close enough” volume of packaging boxes for products.