Minimum Bounding Box - refresh

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.

Download: MinBoundingBox-RhinoScript

Awesome! I used to use this all the time (and will in the future) in making tooling - super easy way to minimize the depth of a mold. Many thanks!

Thanks Thomas!

Hi,

I have differents results running this script when the same reference object is oriented in different ways.

I just tilt it around Z axis but boundingbox volumes are not the same.

I have the same issue with a gh script too.

Is it about tolerance?

BoundBox tests.3dm (160.2 KB)

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.

Could it be the rotation incrementation ?

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.

Even if the object is exactly the same but rotated in space?

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.

Thanks for taking time to explain