# Boxes.py: Parametric Box Generators for Laser Cutters

> Boxes.py is a Python library and Inkscape plug-in that generates cut-ready box designs as SVG from parameters such as material thickness and the width of the laser kerf. It ships an online generator, a growing catalogue of ready-made designs, and a library you can script against, all under GPL v3 or later.

**florianfesti/boxes** — Boxes.py - laser cutting boxes and more

- Repository: https://github.com/florianfesti/boxes
- Stars: 1,285 · Forks: 511
- Language: Python
- License: GPL-3.0
- Published: 2026-10-19 · Updated: 2026-10-19 · Language: en
- Canonical page: https://hysenlabs.com/projects/florianfesti-boxes

## Three Ways to Use the Same Generators

Boxes.py describes itself in three ways, and all three are real entry points rather than a marketing list. It is an online box generator, it is an Inkscape plug-in, and it is a library you can write your own generators against.

The online generator lives at boxes.hackerspace-bamberg.de, and the Inkscape route means you draw your design in the vector editor you already use, with the box geometry generated inside it. The library route is the one for automation, where a script computes the dimensions and emits the files.

Underneath all three is a growing set of ready-to-use, fully parametrized generators, with the full list published in the documentation. The examples directory in the repository shows the breadth of the catalogue, with files for an ABox and its several lid variants, an AgricolaInsert, an AirPurifier, an AllEdges, an AngledBox, an Arcades style design, a BayonetBox, a BeeQueenCage, a BinTray, a BirdHouse, a BottleStack, a BreadBox and a BrickSorter among many others.

The output is SVG, which can be viewed directly in a web browser. The README also mentions PostScript, and with pstoedit as an external helper it can produce other vector formats including dxf, plt, also known as hpgl, and gcode.

## The burn Parameter Is the Point of the Whole Tool

Two parameters decide whether a generated box fits together, and they are the ones worth understanding before anything else.

The first is the material thickness. The library and the generators allow selecting the thickness of the material used, and automatically adjust the lengths and width of joining fingers and other elements to match it. That is the difference between a parametric generator and a drawing program: the finger width is not a number you type, it is a function of the stock you have.

The second is the burn parameter, and it is the more interesting one. It compensates for the material removed by the laser, and the README says this allows fine tuning the gaps between joins up to the point where plywood can be press fitted even without any glue.

That sentence describes the thing a maker actually wants. A design drawn to nominal dimensions will be too tight after the kerf, and a design drawn with a guessed fudge factor will be wrong on the next machine or the next material. Making the compensation a parameter means the same generator can produce a snug finger joint in 3 mm birch ply and a looser one in corrugated cardboard.

The cost of that approach is that the burn value is machine and material specific, so it has to be calibrated once for your setup. The README does not document a calibration procedure, which is the first thing to look for in the full documentation.

## Finger Joints, Dovetails and Flex Cuts

The joint vocabulary is short and each type has a defined role.

Finger joints are described as the work horse of the library. They allow 90 degree edges and T connections, and 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, and the README is candid that this is currently not supported for the included generators. So the capability exists in the library, and the shipped designs do not use it yet, which is worth knowing if your design needs a bolted joint.

Dovetail joints can be used to join pieces in the same plane, which is the case finger joints do not cover, since a finger joint works between perpendicular faces.

Flex cuts allow bending and stretching the material in one direction. That is the mechanism behind rounded edges and living hinges, and it is the feature that turns a box generator into a general sheet-design tool, since a living hinge is not a joint at all but a deliberate weakening of the material.

The AngledBox and FlexBox2 samples in the documentation show the two of those in use, and HingeBox is a further example of a design built around the hinge.

## The Library Route and the Generator Catalogue

The project explicitly presents itself as a library to write your own, and the package metadata makes that concrete. The distribution is named boxes, with the console entry point boxes mapped to boxes.scripts.boxes_main:main, and two more entry points for the web side, boxesserver and boxes_proxy.

The dependency list shows what the geometry work is built on: shapely for the vector operations, svgpathtools for path handling, numpy for the numeric work, rectpack for the bin packing behind the tray generators, affine for the geometric transforms, pillow for the image handling, PyYAML for the configuration, qrcode and markdown as extras, and typing_extensions for the annotations.

The project is marked as Development Status 5, Production/Stable, with the intended audience given as Manufacturing, and the topic keywords are boxes, box, generator, svg and laser cutter.

The repository also carries an examples.yml, an examples/ directory holding the generated SVG files for the catalogue, and a documentation/ directory with Sphinx based documentation for usage, installation and development, rendered at florianfesti.github.io/boxes/html/index.html. There is a flake.nix for the Nix users, a docker-compose.yml for the web server, and a setup.py with custom build steps that compile the Inkscape extension and refresh the translation files.

## The Web Server Runs Under Gunicorn in a Container

The docker-compose file in the repository shows how the online generator is served. It builds from a Dockerfile in the scripts directory, and the command runs gunicorn with the reload flag, bound to all interfaces on port 8000 with two workers, serving the scripts.boxesserver application:

```yaml
services:
  web:
    build:
      context: .
      dockerfile: scripts/Dockerfile
    command:
      - /app/env/bin/gunicorn
      - --reload
      - -b
      - "[::]:8000"
      - -w
      - "2"
      - scripts.boxesserver
    environment:
      STATIC_URL: /static
    volumes:
      - /app/env
      - /app/scripts
      - ./:/app
    ports:
      - 4455:8000
```

So the local instance is published on port 4455 while gunicorn listens on 8000 inside the container, and the whole project directory is mounted so the generated files and the catalogue are available to the server. The STATIC_URL environment variable points the server at the static directory, which is where the sample photographs in the documentation live.

The Inkscape side is handled by a separate mechanism. The setup.py runs a script called boxes2inkscape during the build, which generates the Inkscape extension into the inkex/ directory, and the same build step refreshes the translation template with boxes2pot and xgettext before compiling the .po files into .mo files in the locale/ directory. The presence of locale/ and po/ in the tree means the interface is translated, and the packages are built with the setuptools build backend, requiring setuptools 77.0.3 or newer.

## Where the Scope Stops

Boxes.py is a sheet material tool, and the limits follow from that.

The output formats are cutting formats. SVG and PostScript are the primary ones, with dxf, hpgl and gcode available through the pstoedit helper, and gcode for a laser cutter is a cut path rather than a milling toolpath. A project that needs routed pockets, drilled holes with a specific tool diameter, or a machine-specific post processor is outside what the generator produces, and the material removal is compensated as a uniform burn rather than modelled per cut.

The second limit is the geometry library itself. The catalogue is broad but the parameter space of each generator is narrow, and the ones that do not exist yet you have to write. That is not a criticism, since the library route is offered on the same terms, but it does mean the time to a first cut file is short for a box and long for anything specific.

The third is the burn calibration again, from the other side. A generator that is right for 3 mm plywood on one machine is wrong on another, and the README does not state a default burn value or a procedure for finding one, so the practical consequence is that the first thing you do with the tool is calibrate, and the second thing you do is keep that value in your own parameters.

Finally, the packaging constrains the environment. The package requires Python 3.11 or newer, and the version in pyproject.toml is 1.2, with the project publishing no GitHub releases, so the PyPI version is what you install and the repository history is the changelog.

## Conclusion

Boxes.py fits a maker or small workshop that cuts plywood or cardboard boxes and wants joints sized to the material rather than drawn by hand, and it does not fit a CNC workflow that needs machining files, since the output formats are SVG, PostScript and, through pstoedit, dxf, hpgl and gcode for cutting rather than for milling. Before adopting it, check the material thickness and burn parameters against your own machine, because a press fit that works on one laser will not necessarily work on another, and note that the screw holes and slots in finger joints are supported by the library but not yet by the included generators. The project is GPL-3.0-or-later licensed, the package version is 1.2 and requires Python 3.11 or newer, and the last push was on 2026-10-17.

## FAQ

### What is Boxes.py and how do I use it?

It is a Python library and Inkscape plug-in for generating box designs for laser cutters. The README presents three routes: an online generator at boxes.hackerspace-bamberg.de, an Inkscape plug-in, and a library you can write your own generators against.

### What does the burn parameter do?

It compensates for the material removed by the laser, which the README says allows fine tuning the gaps between joins up to the point where plywood can be press fitted even without any glue. The material thickness parameter separately scales the joining fingers and other elements.

### Which output formats does Boxes.py produce?

SVG images that can be viewed directly in a browser, and PostScript. With pstoedit as an external helper it can also produce other vector formats including dxf, plt, also known as hpgl, and gcode.

### Which joints does Boxes.py support?

Finger joints are the main type, allowing 90 degree edges and T connections with their size scaled by the material thickness, and dovetail joints can join pieces in the same plane. Flex cuts allow bending and stretching the material in one direction, which is used for rounded edges and living hinges. Screw holes and slots in finger joints are supported by the library but not by the included generators.

### What are the requirements for running Boxes.py?

Python 3.11 or newer, since the package metadata sets requires-python to >=3.11, and the package version is 1.2 under the name boxes. The console scripts are boxes, boxesserver and boxes_proxy, and the project is licensed GPL-3.0-or-later.

## Sources

- [florianfesti/boxes on GitHub](https://github.com/florianfesti/boxes)
- [Issues](https://github.com/florianfesti/boxes/issues)
- [License: GPL-3.0](https://github.com/florianfesti/boxes/blob/master/LICENSE)
- [README](https://github.com/florianfesti/boxes/blob/master/README.md)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/florianfesti-boxes
