Cut out boxes and other stuff with a laser cutter

Similar projects worth following
A small python library for generating SVG drawings used for cutting out boxes or other structures using a laser cutter. It also offers a command line and web interface allowing control over many parameters.

It also comes with a growing set of ready-to-use, fully parametrized generators:

* Various simple boxes
* Flex boxes with rounded corners and living hinges
* Boxes with proper hinges
* Type trays with and without walls and floors
* Bin trays
* Display shelf
* Book cover with flex spine
* Magazine file
* Traffic lights
* Honey comb wine rack

Parts to be used in other projects:

* Pulleys
* Gears
* Knobs

And a few one trick ponies:

* An arcade cabinet
* A small robot
* A drill stand
* A rotary attachment for a laser cutter
* A castle tower
* A cutlery stand

It also offers an API to easily draw your own parts. See link to the documentation below. It is licensed under GPL v3+.

You can get the sources directly from github. You can also find some more examples there.

There are multiple ways to use the available generators:

  • Use them online
  • Use them as Inkscape plugins
  • Run scripts/boxesserver which provides an web interface on port 8000
  • Execute the scripts/boxes tool and pass the name of the generator together with the measurements on the command line
  • scripts/boxes --list gives you the list of available generators
  • Run scripts/boxesserver as an WSGI script in your web server.

You can also create your own generators using boxes/generators/ or any of the generators in boxes/generators as a starting point.


Of course the library and the generators allow selecting the "thickness"
of the material used and automatically adjusts lengths and width of
joining fingers and other elements.

The "burn" parameter compensates for the material removed by the laser. This
allows fine tuning the gaps between joins up to the point where plywood
can be press fitted even without any glue.

Finger Joints are the work horse of the library. They allow edges
and T connections. Their size is scaled up with the material
"thickness" to maintain the same appearance. The library also allows
putting holes and slots for screws (bed bolts) into finger joints,
although this is currently not supported for the available generators.

Dovetail joints can be used to join pieces in the same plane.

Flex allows bending and stretching the material in one direction. This
is used for rounded edges and living hinges.

  • Side Projects

    Florian Festi2 days ago 0 comments

    I has been a bit quiet here the last couple of weeks. But this has little to do with me not working on but rather with me working on something so big it needs its own project page: Flipper the Cocktail Bot

    Yes, yes, it is only in part made with and still not in the GitHub repository. But it turns out a working cocktail bot doesn't help with that...

    As a consolation I made you a new box.

  • Submitting to 2017 Hackaday Prize

    Florian Festi10/02/2017 at 20:37 0 comments


    Laser cutters are awesome! Really - get one (for your hacker space)! But they are inherently 2D. So you need to be a bit creative to create something three dimensional. One way is using finger joints to join sheets to larger structures. Another is using flex cuts to bend flat pieces into the 3rd dimension.

    The Challenge

    I looked for a way to do that. Preferably a way to generate generic sketches that can easily be resized, that can be parametrized for different thickness and kerf. A solution that would not just scale size but adjust the number of fingers and flex cuts. A solution that would not only allow picking the size but also the style of the joints and other features - and that is open source so I can share my creations.

    I looked at various CAD programs and available boxes generators that could be extended with my ideas. FreeCAD was still not there yet at the time. OpenSCAD did not support simple cuts which are needed for flex. The available box generators were either closed source or not really worth the effort. In addition, most parametric tools were 3D and required extra steps to generate a 2D drawing suitable for laser cutting.

    The Solution

    So I decided I can do this by myself. All it takes is a bit of turtle graphics. Can't be that difficult.

    Four years and 10k LOC later you can create over forty different things. There is an API to build your own stuff - and some people have. Many users just generate parts, and modify and arrange them in a vector graphics program like Inkscape.

    I started with simple boxes. Today the project stretches far beyond and includes things like trays and shelves, traffic (aka Jenkins) lights and a honey comb wine rack. has even spawned its own sub projects here on A cute little robot and my first steps towards laser cut gear boxes.

  • Knobs for all!

    Florian Festi10/02/2017 at 10:57 0 comments

    Ok, this is kinda embarrassing: About a year ago I added knobs to go on screw heads. They got used by generators like the Rotary Attachment (a contraption to laser engrave round objects) or the Pole Hook (a contraptions to hook a huge recorder to a music stand). Turns out they were not available anywhere else - although they are pretty handy for all other kind of thing. So:

    ConcaveKnob and WaivyKnob

    As always probably not the best names, but at least they are reasonably good looking. Please actually measure the size of the hex head you want to use and may be even reduce the value by a tenth of a Millimetre or two. Hex heads are typically a bit smaller than their nominal width to fit comfortably in the wrench while you probably want to press it in.

    Not so good looking is the text output as rendered on my server. Locally everything is fine but for a while now the Cairo library only renders weird characters instead of the size of the reference block. If anyone has an idea how to fix this (on libcairo on Python 2.7) let me know. Setting the font face does not help.

  • Honey Comb Wine Rack​

    Florian Festi09/16/2017 at 10:07 0 comments

    So we had set aside one shelf in our new IKEA Besta storage cabinet for wine bottles. Unfortunately I could  not find a wine rack that fitted in there without wasting too much space. So to the rescue. The new WineRack generator  arranges a honey comb pattern of holes on the front wall and renders finger joints and walls to connect to a back wall enclosing each hole with the the six walls of the honey comb. To strengthen the front wall - which is reduced to little more than holes - and to hide the finger joints poking out a second layer is glued onto the front. This makes the wine rack quite good looking - especially when using a nice wood. Mine is made out of Baltic birch plywood as it is available in really good quality. A quick coat of oil gives the final touch.

    The holes should probably be around 92mm in diameter to fit most regular wine bottles but as space is limited and most of my bottles were of the narrow type I went with only 82mm diameter and just 4mm material strength to fit 38 bottles (6 x 7) instead of 27 when loosing both a row and a column (5x6).

    When building the rack I realized that in the roughly 150 parts are quite a lot. So the generator now supports leaving out the vertical walls or even also all others that do not carry a bottle.

  • Otto Bot LC now has its own home

    Florian Festi08/17/2017 at 19:38 0 comments

    You might have seen Otto LC in a project log a while ago. We now had two workshops for kids. Before and after the workshops I did quite some tweaks and add-ons. Now the PCB is held in place and the head is held shut. While at first the feet were just pressed onto the servos now they are attached using a servo horn - similar to the original model.

    As the Otto Bot is more complicated than most boxes and needs its own instructions and components list it now lives in its own project. There also has been done a lot of work to create a better firmware and also a UI to create moves. I hope we can get that published and documented soon. We'll keep you updated over at the new project.

  • Images for the (Box) Generators

    Florian Festi05/20/2017 at 13:40 0 comments

    Getting some images for the generators has been on my list for quite a while. I got my not so professional prototypes into a very professional photo studio. It took me nearly another to months to get to fix up the web part to actually be able to serve them. Now they are available in both the standalone web server and - with some tweaking of the configuration - my public httpd/wsgi instance. This also meant that the CSS finally is a stand alone file that no longer has to be merged into the web pages.

    The pictures are now visible if you hover the mouse over the entry in the list of all generators. As I am still not a web developer things could probably better and nicer. But that's what I got so far. There is still need for better descriptions and building instructions. There are still pictures missing. Step by step...


    Florian Festi04/30/2017 at 22:14 0 comments

    I've been working on the gear box generators recently. I considered submitting them for the Hackaday Contest. But submitting only a part of the project is kinda weird. So I set up a new daughter project: which it submitted for the Design your concept round. All the programming will be done in the same repository but the project logs and pictures will be in this new project. I hope I can make enough progress to submit it to either the Wheels, wings, and walkers or the Anything goes competition.

  • Meet Otto LC

    Florian Festi03/12/2017 at 14:03 2 comments

    We have been looking for a project to offer in our city's summer program for kids and came across Otto DIY which looked just right. Although our hacker space has two 3D printers printing like 20 of the chassis was not something we were looking forward to. So the question was if the same can be achieved with our laser cutter. Turns out Otto is basically made out of 3 boxes. So...

    Isn't he cute? How he looks a little bit insecure wondering about his future...

  • goes Inkscape

    Florian Festi02/26/2017 at 16:01 0 comments

    Going to a web page just to download an SVG and opening it in Inkscape gets old quickly. It tuns out that generating a Inkscape extension file is not really more complicated than generating a html form. As Inkscape passes the resulting values as command line parameters there was not much missing to make a (set of) Inkscape extensions.

    A new "install" section in the docs gives hints on how to make things work it you don't just " install" everything in your (Linux) system. Good instructions for Windows are still wanted.

    The box generators shop up in the Extensions menu under sorted into sub menus similar to the menu page of the web interface.

    As the project gets more and more mature I should probably start doing releases and clean up the packaging, may be push it up to PyPi and the InkSpace gallery. More paper work ahead...

  • Robot Arm made out of Boxes

    Florian Festi02/22/2017 at 22:11 0 comments

    For another - still to be announced - project I created a robot leg housing a small 9g servo. This looked promising and I started wondering if one could build a whole robot arm this way. Basically having little boxes containing servos that are connected to each other. Here is the first prototype:

    For now only 9g servos are supported but all the servo specific code is already factored out into a class of its own and new sizes can be added easily. For now I only have variants that do not require different widths on opposite side of the box. I am still pondering how to do that in a mechanically sound and not too ugly fashion. For this reason there is not yet a part that has a servo on one end and the hinge knuckles (is this the right word?) on the other side with the same orientation.

    For now the servos are just built into the surrounding box without attaching them with screws. You can see the servo mounting flange protruding through the end plate of the second segment. Unfortunately this is not stiff enough. Even with the flimsy 3mm poplar plywood the closed form of the segments give great stiffness and it is a pity wasting it this carelessly. So I will add some furniture on the inside to attach the servos more firmly.

    For now I do not actually plan to build a robot arm myself. But may be some one in my hacker space will pick up the project. I will probably add more parts if need arises. A gripper and a base would be the most obvious next additions - unless someone wants to create a hexapod...

View all 29 project logs

Enjoy this project?



Chris wrote a day ago point

Thanks for sharing this project with the world, it looks fantastic. Do you do any further post-processing of the generated SVGs prior to cutting, and if so what is your preferred application? Also what software do you use to generate gcode/control your laser? I'm using LaserWeb 4, and I can't figure out what I need to do to the SVG output to make it work properly in LaserWeb 4. If I open the SVG in Adobe Illustrator and save it, that only seems to increase the number of errors. Any hints or tips would be greatly appreciated.

  Are you sure? yes | no

Florian Festi wrote a day ago point

Our Chinese laser cutter comes with some proprietorial front end program that allows arranging the pieces. For other stuff I often use Inkscape. But this also is a mixed bag as it is not really a CAD program and adds the line widths to all measurements.

There are a few pitfalls: creates a lot of very short segments. If you have some auto connect feature that tries to connect single line segments to a continuous polygon make sure if has only 0.01mm range. The common default of 0.1mm is too big.

Both SVG and also DXF do not really come with units. So all lengths are just a numbers that can mean different things to different programs under different circumstances.

If you need DXF you might want to install locally and also install ps2edit. Then can create DXF directly (among some other formats).

  Are you sure? yes | no

Yash Gupta wrote 10/21/2017 at 20:56 point

Great project. I wonder if there is a way to automate splitting of the files across pages of a specific size to laser cur larger projects on laser cutters with limited real estate?

  Are you sure? yes | no

Florian Festi wrote 10/21/2017 at 23:22 point

No, this is not possible right now and I am not planning to add this. It turns out that the parts need to be rearranged by hand most of the time anyway. Even if they fit in the laser cutter they do not fit on the leftover sheets which at least I often use for one ofs.

In case you want to do a larger run with one size you'll want to optimize by hand anyway to make sure you make the best use of the your sheets.

  Are you sure? yes | no

Jarrett wrote 10/02/2017 at 16:12 point

I just want you to know that I really appreciate this project! Especially the web interface. It has saved me so much time in CAD stuff to just be able to directly generate profiles.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates