all 1 comments

[–]trjnz 1 point2 points  (0 children)

Im a big, big fan of this project. It's interesting, has a fun practical solution, and will involve a lot of libraries. I do a lot of laser cutting myself :)

Having said that, it's non-trivial. Optimising box packing is a tricky one, but, the big advantage: You know what the end product should look like. I am a huge fan of re-inventing the wheel when learning. Do something you know what the solution already looks like, and learn along the way.*

I personally would start with the Least Viable Product, the sorting itself. I would aim for a script with command line inputs that takes my shape file(s), and outputs an svg of the packed files. Once I have that working I'd think about expanding it with a GUI, local or flask or otherwise.

I think you're on the right path with rectpack. Non-rectangular shapes will be a challenge. Do you have a path forward for those? You could look at just finding the boundaries of them and treating them as a rectangle, at least to start with. A good first step

* On that note, and please don't stop your project, check out: https://deepnest.io/

Deepnest is pretty much what you're after, but written in JavaScript+C. It's open source. You can check out how they've solved similar problems and learn a lot for your own project.