Minimum bounding box using convex hull

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am dealing with a 3D model that has over 50,000 components and I want to find out dimensions of all these components. I can get rangeboxes of all components pretty easilty but they are not correct. As these components are not aligned to x,y,z. All components are modelled in a way that their co-ordinate systems will match with global one when assembled.
I checked modmymachine blog and found something similar but that too doesn't find box for parts that are completely randomly oriented. https://modthemachine.typepad.com/my_weblog/2017/06/getting-the-overall-size-of-parts.html and their comment is giving me anxiety
The ability to automatically calculate a bounding box that is oriented to get the tightest fitting box possible is a very difficult problem that I haven’t seen a solution to. It’s something you could probably write a PhD paper on.
Some additional info about components: They are all cuboids with minor modifications here and there (slots, holes, tapers etc) can't share models due to confidentiality issues.
I googled this problem a bit and found that this can be achieved with reasonable accuracy using convex hull. Has anybody ever tried this before?
https://en.wikipedia.org/wiki/Minimum_bounding_box#Arbitrarily_oriented_minimum_bounding_box
There exist matlab implementations for this, but I'd still need to get extreme point/vertices from inventor. I don't think implementing the algorithm in VBa would be easy task at all.