Cut out boxes and other stuff with a laser cutter

Similar projects worth following
An (Online) Box Generator for laser cutters.

  • Boxespy is an online box generator
  • Boxespy is an Inkscape plug-in
  • Boxespy is library to write your own
  • Boxespy is free software licensed under GPL v3+
  • Boxespy is written in Python 3

Boxespy comes with a growing set of ready-to-use, fully parametrized generators. See for the full list.


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.


  • Boxes International

    Florian Festi08/22/2019 at 22:07 0 comments

    Boxes now supports multiple - ok, ehmm, ... nearly two - languages. This started several weeks ago with a request to support a Portguese/Brazilian translation. But this only got finished because CNDK asked how to translate the UI to Chinese and came back with a translation after I pointed him to the first prototype version of the POT file.

    For now the web UI uses the preferred language set in the browser to find a language to translate to. I will probably add another means to change the language. Any particular style you'd like to see this done? As mentioned above there only exists a Chinese version with a few pieces still missing as I just now added them.

    If you are interested in other language you can go Zanata page and start working on them. Drop me a note here or open a ticket if you think the translation is ready to be merged. If you don't want to bother with yet another online tool you can also get the POT file from the repository and translate it locally.

    Update: Added a drop down box to select the language to the page footer. It's still pretty ugly. I still need to look into the CSS stuff necessary to make it fit the overall design of the page.

  • Quick update

    Florian Festi07/11/2019 at 23:38 0 comments

    Despite things being quiet here on Hackaday upstream development made quite some progress. We got a set of slat wall panels for our wood work shop. So I created a whole set of tool holders that can be hooked in a slat wall. Good pictures are still missing but the new "Slatwall" section is already in the on-line generator.

    Thanks to Stefan the post processing step is now parsing and re-writing the SVG properly. This allowed to add the parameters / URL  as a comment in the SVG file and move the drawing to the origin. It also opens up a new set of possibilities for further post processing.

    Stumbling on DeWalt Drill Battery esk8 Electric Skateboard motivated me to finally add an adaptor for Makita Batteries. While it needs a bit more work to offer it as a useful building block I already created a mobile bench power supply that can run from either an 18V Makita battery or an Lenovo power supply using the popular DSP5005 module. The MaktiaPowerSupply  generator can already be found in the "Misc" section. To be honest it is basically little more than a simple box and the interesting parts are all vitamins. Nevertheless the result is quite handy.

    Overall I hope things will slow down a little at some point so I can write dedicated log entries on all the new pieces and show some pictures of the results. In the mean time you can have fun with the brand new FlexBox5.

  • More and better Docs

    Florian Festi03/04/2019 at 21:55 0 comments

    I held a workshop at my local hacker space on how to write your own generators. As a side effect I restructured and extended the (API) docs and one participant updated the installation instructions. So now there are several new topics covered:

    The API docs have now more of an top down approach. This makes it easier to understand the concepts and where to start. Also the previously broken module index is fixed and all the methods are referenced in the index.

    There are still a lot of places the docs can be improved but I am trying to stop myself here. Overall it is probably better to crank out a few new features than loosing myself in the documentation. I guess most people are happy not needing to read docs and being able to generate a new box with the press of a single button.

  • Ponoko optimized SVG

    Florian Festi02/26/2019 at 22:26 0 comments

    Different laser cutter software need different formats and also different styles even with in the same file format. Traditionally lines have the width of the actual laser cut. Normal cuts are black and for quite a while now holes are rendered blue. But this is not the right thing to do for all use cases. One such use case was Ponoko - an online manufacturing service that does laser cutting. There the lines need to be thin and also need a different color scheme. wayn3w did not only add a new format - svg_Ponoko - but re-factored a lot of other code.

    There are still several tickets open to optimize the SVG or adjust some details. Unfortunately the graphics library used (cairo) limits the things that can be changed - easily. But if you need different colors or line width settings this is quite doable now. Please speakup either here in the comments or - preferably  - in a GitHub ticket.

  • Box with Sliding Lid

    Florian Festi12/21/2018 at 19:47 0 comments

    I made a new type of box with a sliding lid made of flex:

    This first prototype is a bit stiff as I used coarser settings for the flex of the lid. The hope was the lid would be  a bit more robust. Now the generator uses a setting in between that works just fine if the sliding surfaces are treated with wax. Rubbing a candle on the left and right most part of the lid does the job. I also sanded the front edges of the lid so they don't get caught on ridges along the track.

    The inner corner is not made with flex but multiple straight pieces connected with non orthogonal finger joints.

    This is a bit more robust as it is in part the inner bottom of the box.

    I also added another variant in which the lid continues around the second top corner, too. Sorry, no good pictures yet.

  • Anyone using in Inkscape?

    Florian Festi11/27/2018 at 19:08 1 comment

    I have been thinking about adding generators for the basic building blocks like walls, edges, ... That would probably pretty easy to do - although not that exciting. I thought that might be most interesting for the Inkscape plug-in. Then you could build your own, one of project from those primitives without bothering with Python and programming.

    But as we still don't have a way to get running on Windows I wonder how many people actually use the Inkscape plug-in at all. Well, I don't...

    Otoh having those primitives available might be interesting for the web UI, too. Not as convenient as one needs to go through all the Save as, Open, Cut and Paste hoops. But may be some people are doing this anyway but have to look through the generators to find the parts they need.

    So the question to everyone: Are you using the Inkscape plug-in and would you be interested in generators for simple parts? Please comment below!

  • New Generators and Features

    Florian Festi10/31/2018 at 08:21 0 comments

    I promised new generators. Luckily several people sent some in. So there is a pretty long list:

    • PaintStand from Jens Persson is a stackable stand for small paint bottles based in this video from Tested.
    • CardBox also from Jens Persson can house a number of playing card decks and features a nice slide in lid.
    • TwoPiece is simple box with another box as a lid that slides over the first one. While I rewrote large parts of the generator the idea and first implementation was submitted by bobm123 quite a while ago.
    • DisplayCase from Alexander Bulimov is a simple closed box optimized to be cut from acrylic for displaying small objects.
    • RoyalGame of Ur is an ancient board game featured in this video from the British Museum
    • LaserClamp can hold warped plywood down on a knife table. This already kinda works but it will probably still change form to work more conveniently.

    Additionally some old things got improved:

    • Most flex boxes now have a latchsize parameter to allow cutting them much smaller
    • Cabinet hinges can now be mounted on the outside of the box
    • The HingeBox supports a split lid that opens to both sides
    • The move parameter in the parts API now supports "mirror" to make rendering  symmetrical parts easier


    I got pictures for at least some of the new boxes / generators:

    PaintStorage (by Blancanegra)



    DisplayCase (by)

  • Finally!

    Florian Festi09/24/2018 at 16:07 2 comments

    OK, OK. I know you are actually all waiting for cool new boxes and other generators - or at least new features for the existing ones. But there is even more infrastructure work that need to be done. I do have some new generators in some - not quite finished - branches. So there will be new stuff to cut out. I promise!

    One long standing issue with the project has been the logo. The web site used a gray cube that was added as a place holder in the web UI mock up and just didn't get replaced. I wanted the logo to also be a box generator  and I have a branch that does that. It applies some transformation matrices to render a box with finger joints in an isometric projection. But the result was still closer to a technical drawing that a proper logo. After some encouragement in the GitHub tickets I finally ditched the idea and sketched something in Inkscape. It's not that great but it is a box that's green like a Python (mascot) and has a laser welding it together. There is probably some things that can be improved. The contrast between the greens and the light gray used as a background in many web browsers could be better and and the laser could be nicer, brighter ans shinier. But so far I am happy with what I have achieved - given my artistic talent. If you have some design skills and some improvements feel free to open an pull request.

    PS: The logo is also - finally - used as a favicon. So I can now find all those still open boxes browser tabs.

  • Update for the Web Instance

    Florian Festi09/17/2018 at 15:50 0 comments

    Some may have noted that I recently added a Dockerfile to the repository. Playing around a bit more I moved the public web instance into a more modern docker container. This is not in its final form. Several things still need to be done right. Nevertheless it already solves two long standing and annoying issues:

    For the later I still need to fix the docs with still state those formats or only available for local installations.

    Overall the docker container is considered being in beta test. So if you encounter any issues, please report here or in a GH ticket. But in general I expect things to work.


    Turns out this simple setup is not good enough for a public instance. I added uWSGI - a light weight web server - to the container. So now there are multiple processes and threads handling the requests. I also created a systemd service file for the container so it gets started and restarted automatically.

    I did not update the Dockerfile in the repository as I guess most people won't be using it to run their own public instance but would rather use it for development where having one single process with the SimpleHttpServer is just fine. It also contains a few specifics of my setup.

  • More Documentation

    Florian Festi09/14/2018 at 13:30 0 comments

    Updating the API docs has been on the ToDo list for one and a half year. Turns out being on vacation far away from a laser cutter is helping. Not only did I update some doc strings - which are the basis for the Sphinx generated API docs - but I wrote some new documents:

    And I added an Introduction to the Edge classes. The rest of the page probably still needs some work as some Edge types are still missing. The Settings classes and their role in creating the HTML and Inkscape user interfaces and in creating the Edge instances probably also deserves a bit more text.

    What also helped getting it done - probably not getting it done well - was a good amount of medication. It at least prevented me from doing something more complicated - and may be more rewarding - instead. I hope it does not show too much. So if something looks weird or doesn't make sense please open a ticket on GitHub or leave a comment below.

View all 45 project logs

Enjoy this project?



bwente wrote an hour ago point

Suggestion for the new LaserHoldfast... Can you add a taper to the shaft? It would give it tighter fit.

Maybe an option to step and repeat? I know it is easy enough to duplicate and rotate in inkscape so it's not a big deal.

  Are you sure? yes | no

Stevemcl wrote 09/24/2019 at 19:33 point

Hi, it would be great to have a test template that has a range of burn settings so that I can select the best burn setting for my laser cutter.  Rather than cutting out multiple boxes with different burn settings.  Great stuff, thanks!

  Are you sure? yes | no

Florian Festi wrote 10/13/2019 at 20:14 point

Ok, this is now available as BurnTest in the "Parts and Samples" section. Thanks for this great idea!

  Are you sure? yes | no

Aram Perez wrote 08/07/2019 at 00:48 point

Another nitpick: when building a box with a lid, the software does not account for the thickness of material so that the lid does not close. My current solution is to created two boxes. The first with the dimensions I want. The second box I lengthen the x value (I believe it was the x value) by the thickness of the material. After downloading both svg files, I open both (with Inkscape). After ungrouping both files, I delete the back/top and sides (from the first file with the correct dimensions). I copy the back/top and sides from the second file and paste them into the first file. Then I cut the parts of the box, put it together and now the lid closes correctly.

It would be nice if the software accounted for this automagically.


  Are you sure? yes | no

Florian Festi wrote 08/07/2019 at 13:14 point

There are a lot of different boxes. Can you please post the link to the box you are creating here or in a ticket on GitHub (

Ehm, I just saw your comment below. So I guess this is about FlexBox3. I'll have a look.

  Are you sure? yes | no

Florian Festi wrote 08/08/2019 at 20:56 point

Ok, should fix this. It's not in the online instance yet. Can you test the change on a local instance? Otherwise I'll just push it on the server.

  Are you sure? yes | no

Aram Perez wrote 08/09/2019 at 01:47 point

I'll just wait until you push it to the server. Thanks!

  Are you sure? yes | no

Florian Festi wrote 08/09/2019 at 21:20 point

Ok, pushed the patch to the web instance.

  Are you sure? yes | no

Aram Perez wrote 08/09/2019 at 23:04 point

Great, thanks!

  Are you sure? yes | no

Aram Perez wrote 08/06/2019 at 19:19 point

First, this is a great project! But I have a nitpick when making a "FlexBox3" (, I expected the Z to be the height of the box so the lid is at the Z height. For example, using X = 25, Y = 25 and Z = 100, I expected tall square box with the lid at the top. You can see what I mean by going to and entering the following program: "x = 25;y = 25;z = 100;cube([x, z, y]);". It appears that if I swap the y and z values (similar to OpenSCAD), I do get the box I want. Any chance of making z the height (or having the option to do so)?



  Are you sure? yes | no

Florian Festi wrote 08/08/2019 at 20:31 point

Those x, y, z, h params need at some point be replaced by width, height, depth, ... But so far I have not been bored enough to start this project.

  Are you sure? yes | no

Aram Perez wrote 08/09/2019 at 01:48 point

I understand. I think I've figured it out for now so I can create the boxes I want. Thanks!

  Are you sure? yes | no

dmiarka wrote 07/23/2019 at 09:38 point

Hi, there is a problem with exporting from some of the templates. Like , I used it some time ago, and now i cant. I got error "This XML file does not appear to have any style information associated with it. The document tree is shown below." when tryinx exporting to svg. The tool is great besides it, but could You fix it please? :)

  Are you sure? yes | no

Florian Festi wrote 07/23/2019 at 15:44 point

There is still an issue with the web instance. It restarts after a while and then is unavailable but comes back up on it own. I will change the setup as soon as I find the time. IN the mean time you can either wait a while or run an instance locally - which is easy on Linux but probably too much hassle under Windows.

  Are you sure? yes | no

Florian Festi wrote 07/23/2019 at 15:49 point

OK, hit it with a bat just to be sure.

  Are you sure? yes | no

dmiarka wrote 07/23/2019 at 18:21 point

Now works great, thank You very much :).

  Are you sure? yes | no

Aram Perez wrote 08/15/2019 at 13:56 point

I'm having the same issue, some templates seem to work every time but others give the XML error. I tried to install the software to run the server on my Windows machine (has a Core I7) but I get the following error: ERROR: cairocffi-1.0.2-cp38-cp38m-win_amd64.whl is not a supported wheel on this platform. Any suggestions?



  Are you sure? yes | no

Lomba wrote 07/18/2019 at 09:08 point


Inspired by your project, I worked on a variant that could interrest you.

Feel free to check:


  Are you sure? yes | no

Florian Festi wrote 07/22/2019 at 07:55 point

I am currently still missing flex / arcs with finger joints. But that's a feature I want to add at some point. These rounds drawer look like the first thing to try with them. Thanks for the inspiration!

  Are you sure? yes | no

CNDK wrote 07/14/2019 at 07:16 point


  Are you sure? yes | no

Florian Festi wrote 07/23/2019 at 15:41 point

I actually already have a branch that it working towards translating But it still needs more work. Unfortunately I am not too experienced with i18n. I uploaded a first language file to but then the site went down for a few days. So I am not sure if that's the way to go. If anyone has advice feel free to provide it here or in the upstream ticket ( - which urgently needs an update.

  Are you sure? yes | no

CNDK wrote 08/01/2019 at 01:07 point

I have already translated a part, how can I use it, I want to test if it is normal

  Are you sure? yes | no

Celia wrote 05/30/2019 at 15:17 point

I've been using this tool for a while and it is amazing! Thank you so much for creating such an amazing tool. I've just started using it to create my own patterns. Right now I'm working on various versions of a box that looks like a book. I'm starting with simple closures, but plan on working my way up to a full gear closure. 

Just wanted to say thanks for such a comprehensible API. It took me some time to figure things out (mostly because this was my first time coding in Python), but I'm mostly completed with the first box!

  Are you sure? yes | no

Florian Festi wrote 07/01/2019 at 09:56 point

Feel free to submit your new generators as a pull request even if they are not yet 100% perfect. I am happy to help.

  Are you sure? yes | no

Domingo Molinero wrote 04/22/2019 at 20:31 point


first, thank you for this powerful tool, I love it!

but now the bad news: After having created maybe a hundred boxes, I am randomly unable to render boxes. I experienced the problem at first on april 18th. For example using with the predefined values leads randomly to an empty svg file. I haven't tried all scripts, but the 10-15 ones i did were similar in failing in about 75% of the cases. 

Altering values does not change anything in the behaviour and failure rate. Problem occures on 3 different PCs.

Any idea?

  Are you sure? yes | no

michael wrote 02/10/2019 at 08:40 point

Hi Florian, 

the is awesome! I have found - maybe only on my machine - a bug which I thought is easy solvable (but I was not able) - so I tell you about:

When selecting as Top Edge L Edge for slide on lid - both on the universal box and the Type-Tray there is an error on the server:

Traceback (most recent call last):
  File "/usr/lib/python3.6/wsgiref/", line 137, in run
    self.result = application(self.environ, self.start_response)
  File "./boxesserver", line 399, in serve
  File "./../boxes/generators/", line 60, in render
    t1, t2, t3, t4 = self.topEdges(self.top_edge)
  File "./../boxes/", line 118, in topEdges
    if t1.char == "t":
AttributeError: 'str' object has no attribute 'char'

All other Top Edges work perfectly. I just did not find the mistake (even if it was mine...) - I think I did not search enough...

And again: GREAT WORK!!!



  Are you sure? yes | no

Florian Festi wrote 02/10/2019 at 18:58 point

Thanks for the bug report! Fixed in

Will update the web instance the next days.

  Are you sure? yes | no

michael wrote 02/10/2019 at 19:02 point

Many thanks! Works like a charm!



  Are you sure? yes | no

sven.wagner wrote 01/06/2019 at 22:52 point

Hi Florian. is realy great. Thanks for sharing it! I try to use a gernerated universal-box on my cnc machine, but I the inner edges of the finger joints where generated with a "over routing" of the edges. Example see: I can't find an option to deactivate this "over routing" - is it possible to deactivate it with an option? It would be very great to try more of the designs on my cnc router. Regards. Sven.

  Are you sure? yes | no

Florian Festi wrote 01/11/2019 at 22:18 point

Yes, you can set burn to zero. But then you have to do the kerf correction on your own. Probably with some CAM software.

As the kerf correction is done by doing these overruns cannot do kerf corrections without them.

  Are you sure? yes | no

Scott wrote 12/30/2018 at 17:21 point

This tool is wonderful. I am really enjoying it. I do have a question about the TypeTray function. There is an option to make a stackable bottom but it doesn't seem to make the top stackable. Am I missing something. I can fix this in post but I figure there is an easier way.

  Are you sure? yes | no

Florian Festi wrote 01/01/2019 at 21:53 point

There currently isn't. But I am currently working on the type tray generator anyway. So i should be able to add this feature the next few days.

Update: Created a ticket at

  Are you sure? yes | no

Florian Festi wrote 01/11/2019 at 22:22 point

This is fixed now. TypeTray can not have the same selection of top edges as UniversalBox - including the stackable edge.

  Are you sure? yes | no

Mohab Fawzy wrote 10/24/2018 at 01:39 point

HI Florian , love your project , and can help you with the visuals or logo if you like , since i'm really dumb when it comes to coding XD
I wanted to ask you about running it in windows , but scrolled down and found that it doesnt have an obvious solution , i messed with it but im dumb XD so i think i'll run it on my linux laptop for now .

  Are you sure? yes | no

Florian Festi wrote 10/24/2018 at 07:30 point

Sure, I am not much of a web or graphics person. So help is welcome in this area.

 Yeah, on Windows is still a sad story. There is still the bounty up for working installation instructions.

  Are you sure? yes | no

Mohab Fawzy wrote 10/24/2018 at 16:09 point

cool , see what i can help with and i'm up for it =)

  Are you sure? yes | no

Andrew Bills wrote 10/18/2018 at 05:00 point

FYI - Took me a little bit to figure out what I was doing wrong, but if you generate a flexbox4 too small (i tried 25x25x40) the sold curve wall part doesn't get added to the model. Took me a bit to realise (after I broke the pieces trying different things to make it go together)

  Are you sure? yes | no

Florian Festi wrote 10/19/2018 at 09:40 point

There are two issues here. The generator reduces the radius of the flex if there is not enough space. But there is a bug where this reduced radius is not used for the length of the flex.

The second issue is that there is just not enough room for the flex in this dimensions. One could make the latch configurable to allow making more space or just some heuristics for small values.

On the larger picture there is the question of using unsuitable parameters. So far I have avoided to add checks for the most part and left the checking to the user. This has obviously fail here - to some extend due to the bug above.

I hope I can get the bug fixed today or tomorrow. But this may still not make the box work with this small dimensions.

  Are you sure? yes | no

Florian Festi wrote 10/24/2018 at 07:49 point

Ok, so the issue with FlexBox4 not calculating the length of flex correctly is fixed. I also added a latchsize param to FlexBox, FlexBox2 and FlexBox4 and updated the code of the flex boxes to a more recent code style.


Remove the &render=1 at the end of the URL to get to the parameter form.

  Are you sure? yes | no

megajas wrote 10/17/2018 at 03:45 point

Hi Florian, first of all, stumbling onto your project is really an eye-opener for me and I'm sure for many others! Great job!

I've only played around with the online box generator for a few minutes and I will spend much more time later. Is there a way to set the number of 'fingers' and have them evenly spaced along an edge of a wall?

  Are you sure? yes | no

Florian Festi wrote 10/19/2018 at 10:17 point

You can adjust the style of the fingers in the Settings for Finger Joint section that can be opened on most generators. Right now there is no way to evenly space them as the fingers have a fixed size. But you can change the size of the fingers and the amount of space required towards the corners. 

  Are you sure? yes | no

Thomas Pearce wrote 08/14/2018 at 15:46 point

What would be the feasibility of adding a grayscale based dovetail joint to this generator? I made them a while ago, but it didn't go anywhere because it was too tedious to make the joints. This is an awesome project, I'll have to play with it when I get the chance. the old link to the dovetails, I probably should rewrite it and move it somewhere better at some point.

  Are you sure? yes | no

Florian Festi wrote 09/11/2018 at 21:18 point

It should be possible to add something like this to The question is what parameters are needed, to make things fit. One would also need some test piece to read the parameters from.

  Are you sure? yes | no

ornery shard wrote 08/06/2018 at 14:44 point

This tool is really great.

@Florian Festi Do you have pics and/or instructions how to  assemble the "rotary attachment for a laser cutter"

What kind of raw materials would I need for this?

  Are you sure? yes | no

Florian Festi wrote 08/07/2018 at 12:28 point

I don't. I am currently travelling so it may take a while until I can take pictures. The rotary attachment consist of two parts that slide on a metal bar. One side houses a NEMA 23 stepper that drives two rollers. The other part is a scissor lift with two free rollers.

You will need to adjust the bottom hole for the metal bar you are using.

Overall I am not 100% satisfied with the rotary attachment. The scissor lift is not as smooth and rigid as I'd want. But IIRC I made it from 5 or 6mm poppler. You want to use birch ply for that. I am still thinking about making a version without scissor lift that can be tilted as a whole.

You need a stepper motor that is electrically compatible with your Y axis of your laser cutter. Mine has 3 phase steppers which make getting one a bit more difficult. Your laser cutter needs to have a outlet for plugging the rotary device in. Or you need to do the wiring yourself.

The attachment also is still missing some accessories like rollers to limit left to right movement and pressing the inside of glasses against the driven rollers.

Beside these short coming it works reasonably well and we have engraved several glasses and bottles with it.

  Are you sure? yes | no

Jan wrote 08/03/2018 at 11:50 point

Love this tool. One can spend so much time optimizing stuff like that but you "just" write a script for it and automate it for everyone to use for free. NICE!
But I wonder: don't use wood laser-cutters DXF files like the whole sheet metal industry?

  Are you sure? yes | no

Florian Festi wrote 08/03/2018 at 17:00 point

Yes, they do. can generate DXF using ps2edit. Edit: That's now available in the online generator, too.

  Are you sure? yes | no

paul wrote 08/02/2018 at 12:00 point

this tool is great but it outputs the svg into the browser, how do I download it?

  Are you sure? yes | no

Florian Festi wrote 08/02/2018 at 16:01 point

Just right click and "save as"

  Are you sure? yes | no

dejan.k wrote 06/26/2018 at 08:13 point

Hello, absolutly fenomenal work, thank you very much, you shoud think about adding a feature to universal box top_edge edge with hinges and click on, on other side so it closes :) 

  Are you sure? yes | no

Florian Festi wrote 08/03/2018 at 11:32 point

The click-on edge probably deserves some more love before that becomes really feasible. But adding lock and latches to the lids is on my todo list. To my shame I have to admit that I hand drew a pair of latches for the box I recently build...

  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