How do I find the smallest possible bounding box for a solid?

I have script for orienting brep/solid in such a way that its bounding box has minimum “Z-height” - it is useful for 3D printing (on SolidScape printers) since in most cases this will reduce printing time.
Since you need minimum bounding box (minimum diagonal) I added few lines of code to find position (by rotating it around Z-axis) where resulting box will be minimum.
Result is approximate based on incremental angle (number of steps per 180degree, 180 steps will give us incremental angle of 1 degree)…
MinimumBB.gh (28.7 KB)

2 Likes