I have a reoccurring task, where I need to orient parts from one plane to another consistently for fabrication. Usually these wooden parts, so parallelly flat on at least two sides. The part outline shapes can be anything.
Because the part outline shape can be anything, defining a grain-directioned bounding box method varies from case to case. Most often it is aligned with the longest side, and I can easily find the side that will drive the orientation for fabrication.
So, finding the “minimal” bounding box is not the challenge here, but the inconsistent plane orientation of the box. So basically, I can have 6 different orientation for the same box, and only 1 would perfectly suit my needs. The starting point needs to be the bbox, because the method for its generation can be pretty much anything - so the bbox itself is a good and consistend starting point on all kinds of geometries.
So my question is, as the bbox as the starting point, how would you go about in unifying the bbox directionality?
Unification in this context means that, eg. box points A-D produce the part “bottom srf”, the exploded sides are always in the “same” order (what ever that means in varying orientations).
Here’s a simple test with a couple of different geometries, to show the different orientations of the otherwise correct bboxes.
Simplified bbox generation for meshes and breps.
Unified Bbox orientation.3dm (274.6 KB)
Unified Bbox orientation.gh (21.9 KB)
This would be a good end result.