3 ms·
Grids are easy. I recently wanted to print almost 600 randomly-sized images on as few sheets of paper as possible. I could only find academic papers and maybe-w
by thanatos519 6y ago
Grids are easy. I recently wanted to print almost 600 randomly-sized images on as few sheets of paper as possible. I could only find academic papers and maybe-working academic byproduct code.
So I made https://github.com/trathborne/guillot https://github.com/trathborne/guillot
It was also an exercise in learning Ruby, and it only depends on Ruby, *nix pipes and GraphicsMagick, the more-open way-faster descendant of ImageMagick.
Share and enjoy!
- auxym 6y agoThat's neat. Do you think it could be modified for nesting, in the context of laser cutting? Last I checked there were no OSS nesting options, o my commercial options marketed for industrial production.
- thanatos519 6y agoI don't think guillot would be right place to start, since it was only intended to do one thing: Place axis-aligned rectangles for guillotine cuts. That is, you can cut out all of the rectangles only by cutting all the way across the paper. I wanted to be able to cut the pages up with a paper trimmer (because I am not very good with scissors! :-P ), and this restriction made the brute force algorithm relatively effective. Laser cut nesting optimization is the opposite of guillotine cuts: irregular shapes with arbitrary rotations allowed. This 2 years inactive, but still working open source tool is more likely to get you where you want to go: https://deepnest.io/ https://deepnest.io/ or the web version https://svgnest.com/ https://svgnest.com/