Which one? There are several Minimal BoundingBox components in this thread, both Python script and C#. They are compared for their different benefits.
You might want to read the whole thread to find out.
// Rolf
Which one? There are several Minimal BoundingBox components in this thread, both Python script and C#. They are compared for their different benefits.
You might want to read the whole thread to find out.
// Rolf
Hi @RIL
Thanks for your reply. Sorry for the confusion. I thought my post was made as a reply to the post above by Mathias Sรธnderskov Schaltz, but looks like it isnโt.
I did read through the whole thread, and ended up choosing Mathiasโs solution to see if it worked. However, I found that his component has the same problem that was observed about the others: it consumes a lot of computing power, sometimes taking 15 minutes to resolve (I am working with hundreds of framing members at a go), and even crashing Rhino multiple times. (His component also doesnโt preserve data structure of inputs in the output, as far as I can tell.)
This heavy computation is why I am pursuing a simplified script, instead of one of the solutions shared above. Because I donโt need the geometric flexibility of a full-blown minimum oriented bounding box scriptโin other words, because I know all the inputs will be generally long and skinny wooden members with a variety of notches and angled short endsโI can avoid all the computation by going straight to a GetBoundingBox (plane) using a plane derived from one of the long sides of a member.
The ultimate goal is an axial centerline for each member, in this case derived from a line drawn between the centroids of the two short ends of the bounding box.
See my attached script for the current state of my attempt. I am implementing this in a GhPython component in Grasshopper in Rhino 7. Seems to be working, but I was looking for feedback on my approach. My next step is to integrate a nested dictionary so that I can associate the output centerlines with their input layer, and remake the script to receive breps from multiple layers. Then I can process all the different framing members, which are all on separate layers, with one script, and output the centerlines into a data tree in GH (or a grafted list) where each branch is associated with the layer those centerlines were derived from. Maybe this is done with a headingโeach branch index 0 is the layer name. Not sure yet.
Python script
24 0130 OrientedBoundingBoxForFramingMembers.py (5.3 KB)
GH file
24 0131 OrientedBoundingBoxForFramingMembersTestingPythonScripts.gh (13.2 KB)
Best
Brian
Hello everyone and thank you for all these interesting insights.
Below is my 2cents on this discussion.
๐ง๐ต๐ฒ ๐ฆ๐ผ๐น๐๐๐ถ๐ผ๐ป ๐ ๐๐ฒ๐๐ฒ๐น๐ผ๐ฝ๐ฒ๐ฑ
My implementation in the ATk MinBBox component uses a multi-strategy approach:
The results have been validated: when compared to other available components, ATk MinBBox consistently offers an excellent balance between computation speed and minimum volume optimisation.
๐๐ ๐ถ๐ ๐๐ต๐ฒ ๐ฏ๐ฒ๐๐ ๐ฝ๐ผ๐๐๐ถ๐ฏ๐น๐ฒ ๐๐ผ๐น๐๐๐ถ๐ผ๐ป ๐ฒ๐๐ฒ๐ฟ? ๐ ๐ฎ๐๐ฏ๐ฒ ๐ป๐ผ๐ Computational geometry is a field where perfection is elusive. But for my practical architectural needs, it represents the right compromise between theoretical optimisation and real-world usability.
This new component will be included in the upcoming ATk v1.3.3 release, and I will share more info about it.
Given that you are going to share a working solution to the problem, I think it would have made more sense to start your own topic and post links to your topic in repliesโฆ
Hello Martin, Thank you for your suggestionโI will certainly follow it, maybe on the personal channel.
However, I would like to emphasize that the primary function of the forum and discussion is to inform the community interested in a given topic about developments over time. This discussion is a clear example of that, especially when solutions that can be tested for free are shared.
Opening multiple topics on the same subject is generally not well received by moderators and can reduce the forumโs usability. For this reason, I chose to add my contribution to the existing discussion rather than start a new thread.
Nonetheless, I appreciate your suggestion.
Stay in the loop!
L.A.
P.S.:
It has been quite some time since I last contributed to the forum, and now I remember why โฆ Did you really go through all my posts to support your latest answer? My gosh
That said, if I did provide the same answer, questions in the thread address two issues: one pertains to the implementation Grasshopper, while the other the most effective method or tool for determining the minimum bounding box for solids. If two questions result in the same answer, the issue not with the response but the existence of similar threads that have not been merged, reinforcing my earlier point about forum usability and consolidating answers within a single thread.
I responded here using a single post because it would be disappointing if this meaningful discussion devolved into akin to Facebook (I tend to avoid such situations).
Wishing you all the best
โโ
The same content in two posts can lead to two parallel discussions which I think should be avoided.
Anyway, have a nice day.