Hi I am trying to generate a model from an excel doc. i have a definition that creates the boxes but i am now needing to assemble these - essentially, i am trying to recreate this; Grasshopper Program Visualization and Packing - YouTube but o am really stuck as packrat does not seem to open (im using Rhino 7)
Any help would be greatly appreciated.
I can share my definition if anyone wished to have a look.
I believe I’ve read or even replied to one of your previous, related discussions.
PackRat seems to be an abandoned add-on. The website is offline and their is no official support for Rhino 6 or 7. I’d say, maybe forget about it?
If I remember correctly, you read sizing values for boxes from an Excel file, and you
look to pack or stack these boxes somehow?
Do you have a certain system in mind, meaning rules on how the boxes get packed, can be connected, or stacked on top of each other?
OK, packaging problems are as far as I know very challenging to solve nicely and algorithmically - though not impossible -, but very easy for use humans to do. Evolution seems to have given us the ability to quickly and efficiently discern patterns and react accordingly. This possibly posed a big advantage in our more primal past, when mankind still lived in nature, instead of next to it. The ability to quickly distinguish between the bush and the hidden, stalking sabre tooth tiger made those survive and probably pass on their genes, who had that skill down. The others were breakfast.
Packing boxes or rectangles usually happens within a container: a box that is meant to get filled with other, smaller boxes. In your case, this container would probably be two stories high, or you could define a container for the lower and another one for the top level that get filled separately.
Now, this is quite an involved topic, but I’d look into greedy packing algorithms, since they are an easier topic and should give you an idea on how to tackle this. They are called “greedy” because they use brute force to find a convenient solution.
While looking into it, you should get some ideas on how to structure an approach to your problem. One thing is clear! You need to develop very precise rules for your packing system, otherwise it’s very difficult to tackle this. Think about how you would stack the boxes, and how you could potentially make Grasshopper do something similar.
I don’t know if this can be done with vanilla components. You probably need scripting for this?
Here are some topics from the past that might be helpful: