I tried this component, which works well, except it does not preserve the data structure of the input in its output, which makes it unusable for me.
Does anyone have thoughts about how to implement a more simple minimum oriented bounding box problem in GhPython? Here’s the scenario:
Every input geometry I will be working with is a skewed or modified rectangular prism. They are wood beams, rafters, posts, some with angled cuts on the ends, some with notches (bird’s mouths). So overall the form is rectilinear, except on the ends, or some notches on the long faces.
I am working towards drawing the centerline of each of these members, which I have achieved in a python script, by creating a bounding box, and drawing a line between the centroids of the two smallest faces of the bounding box.
I am using the minimum bounding box component linked above, but for a number of reasons I would like to make my own in python. However, I have not yet been successful. I tried to orient the bounding box to the largest face (or one of them as there will always be at least two with identical area) of the original geometry, which would by definition identify also the primary axis or long axis of the member. However, I can’t seem to solve that.
I can share my code, but I am mainly interested in how you all would approach it.
Thanks
Brian