-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could your nodes be used for 2d packing? #11
Comments
@Vanman989 yes, the node can be used for 2D packing although I don't know off-hand how optimised it is for 2D because EB-AFIT was originally written for 3D. Feeding 0 for Z for items or containers into the algorithm will fail (something I need to fix in future releases) so I used a value of 1 for items and containers and then ignore Z from the outputs and build rectangles instead of cuboids. I have attached a sample graph to this comment which is adapted from the sample included in the package for ContainerPacking: Miscellany-Samples-PackContainer2D.zip (I had to zip it to add to the comment as GitHub doesn't support adding dyn files to comments). I hope this is of help |
One additional thing to note is that EB-AFIT will test all possible orientations, so in its current form it isn't possible to restrict the X and Y dimensions to their original axes, which I assume you would want given that you want to use it to place views on sheets (and I assume you don't want them arbitrarily rotated 90 degrees just to fit in) |
Thanks Thomas, this is great. Yes, unfortunately I would not want the rectangles rotated and positioned top left of the page to start and then along the page, then placed underneath and so on. Thank you for the sample. Missed your original sample you uploaded getting a good understanding of github. I will definitely be testing with your nodes to see what sort of results I can get. The only solution I can think of to achieve the rectangle stacking I want at the moment is to place the rectangle (view) in the center of a rectangle (sheet) and create some sort of python loop to move the rectangle towards the top left until it clashes with the sheet bounding box. Then proceed with the next. I have very minimal knowledge of python at the moment but hoping I can implement it with some more research into what other nodes are out there. |
As well as in this repository, the samples are included in Miscellany when you install from the Dynamo package manager, within the folder An implementation in Python could follow similar lines to this Ruby version. Most implementations seem to follow a tree route. As for 2D implementation in MIscellany, I can look to add one where it would be possible to choose the starting point and also whether objects are allowed to be rotated. I'm reopening this issue as an enhancement with the aim of adding it soon. |
Anything you do would be appreciated. Thank you for the great info. Points me in the right direction. I know many people on the dynamo forum struggle with the issue of stacking views like windows, shop drawings, precast and steel onto sheets from a list. I'll be sure to share any of your Miscellany enhancements towards 2D on the dynamo forum. Your output of unpacked things is great. Can use that to create the next sheet for stacking |
Hi John, if its of any interest to you. This guy has so many great methods to 2D Bin packing :) |
Could your nodes be used for 2d packing? If the z values were just 0? Wondering if I could then pack rectangles and get there centre points for locations to pack views on sheets. I would be inputting bounding boxes. Not sure what your exact container input formula is that the nodes take. Sorry for the comment in the wrong place. Still understanding git hub and couldn't figure out how else to ask.
I'm not at work to try it with 2d. What node is going into the algorithm inputs? Do you have a YouTube video or some example graphs set up?
Originally posted by @Vanman989 in #1 (comment)
The text was updated successfully, but these errors were encountered: