-
Notifications
You must be signed in to change notification settings - Fork 102
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
Irregular bins #10
Comments
What I can do and surely will in the next few weeks, is make the most out of the current "brain" to handle irregular bins. What you can expect is that you can use a simple polygon as a bin and items will be inside of it -- the boundaries will be respected. But the result can be stupid, I probably won't fix that for a while. You can improve that however with a custom optimization kernel which you can pass as a function object to the nest() function. |
Thanks for the reply. It would be very interesting if we could pack shapes to a circle or n-sided poly bin. I didn't have anything complex in mind like a bin with exclusion zones, so simple polygon bins are fine by me. |
I think that this should be possible even with the current code. Go on and try to define a Circle as the bin shape and pass it to the nest function. The App PrusaSlicer for which this library was initially developed, supports circular print beds and it works. Not as polished as for the box shaped bed though. |
Thanks, I tried switching the bin to a Circle, but the compiler can't find a matching overload function for it: //size_t bins = nest(input, Box( s,s, {0,0} ) ); cannot convert from 'libnest2d::_Circlelibnest2d::PointImpl' to 'const libnest2d::Box' |
Hey all! EDIT: I managed to "activate" circular placement by modifying libnest2d.hpp. |
Do you have any plans to support fitting shapes to irregular bins?
You briefly mentioned it here:
#7
But, you didn't say if you plan to improve it or expand upon it.
I would also be interested in seeing something like this.
Thanks.
The text was updated successfully, but these errors were encountered: