TopologicSverchok icon indicating copy to clipboard operation
TopologicSverchok copied to clipboard

Feature Request: Optimized Oriented Bounding Box (OOBB)

Open TZwielehner opened this issue 2 years ago • 6 comments

For analyzing topologies (cells in particular) I would need to calculate OOBB cells. Two versions would be great: A) smallest BB (oriented freely in 3D space): image

B) Z-axis is fixed: image

1, 2, 3 being Width, Depth, Height of the resulting bounding box.

TZwielehner avatar Jul 15 '22 09:07 TZwielehner

Hi. Apologies for the delay in responding to your suggestion. I was on annual leave. This can be achieved through the Evolver node in Blender. In fact, their demo is exactly this issue: to find the smallest enclosing bounding box. Please take a look at: https://nortikin.github.io/sverchok/docs/nodes/logic/evolver.html

wassimj avatar Jul 21 '22 07:07 wassimj

Thank you! I thought there was maybe an analytical way to calculate it, I did not consider a numerical solution. Will have a look into that.

TZwielehner avatar Jul 21 '22 18:07 TZwielehner

Thank you! I thought there was maybe an analytical way to calculate it, I did not consider a numerical solution. Will have a look into that.

There may be an analytical way, but I don’t know it. If you find anything that can avoid using a GA, please let me know. I will see if I can add it.

wassimj avatar Jul 21 '22 18:07 wassimj

I found this implementation in Matlab. If you can convert the code to python, I would be happy to integrate it with Topologic:

https://github.com/chadogome/OptimalOBB

wassimj avatar Jul 22 '22 08:07 wassimj

Still beyond my coding skill I'm afraid. I'll see if I can get my head around the example you provided.

TZwielehner avatar Jul 22 '22 08:07 TZwielehner

Dear @TZwielehner, Apologies for the extensive delay in addressing this. I am glad to let you know that Optimized Oriented Bounding Box (OOBB) is now implemented in Topologic using the library pyobb (https://github.com/pboechat/pyobb). If possible, I kindly would like you to test it before I released it publicly. Please contact me at [email protected] to arrange access. Thank you. oobb

wassimj avatar Oct 09 '22 15:10 wassimj