Quilt is a browser tool that cuts artwork too large for a pen plotter into bed-sized, millimetre-exact SVG tiles. You plot the tiles one by one and assemble them into a single large piece. Everything runs in the browser, and the file is never uploaded anywhere.
Role: Designer & Developer
The problem
Pen plotters are small. My Quill plotter, like most hobby machines, draws on about 220 × 220 mm, but I want prints at poster and frame size. The workaround is to split the drawing into tiles, plot each on its own sheet and join the sheets. Doing that by hand in Inkscape is fiddly, and the details decide whether the result looks good:
- every tile has to come out at its true physical size, or the pieces don't meet,
- each tile has to contain only its own lines, because plotter software ignores clipping and draws everything,
- neighbouring sheets need a shared overlap to line up, and a margin for clips and tape,
- you want to choose where the seams fall, so a split doesn't run through the most detailed part of the drawing.
What Quilt does
One screen, five numbered steps in pipeline order:
- Upload: Quilt reads the SVG's real size from its units (mm, cm, in, pt…). If the file only has pixels or a viewBox, it asks for a size instead of guessing.
- Finished size: pick a frame (A-sizes, picture frames, or the artwork's own size). The artwork is scaled to fit without stretching.
- Plotter and sheets: choose a plotter-bed preset, margin, overlap, grid alignment and an optional cut border.
- Preview: a live preview draws the tile grid, overlaps and margins over the artwork. Click any tile to see the exact file that will be exported.
- Export: one zip with a correctly sized SVG per tile, plus
info.json(machine-readable layout) andinfo.txt(plain-English plotting and assembly steps).
Standout features
- Tiles that reassemble exactly. Each tile file contains only the geometry inside it, cut exactly at the tile edge, not hidden behind a viewBox. Neighbouring sheets share the same overlap strip, so the lines continue across every seam.
- 3 × 3 grid alignment with mm offsets. A 9-point anchor shares out the grid's spare room, and an X/Y nudge in millimetres fine-tunes it, so I decide where the seams land. The nudge is limited to the spare room, with a warning when a value is reduced.
- An alignment and cut border built for plotter and cutter software. The optional dashed border is real line segments on its own
cut-borderlayer, notstroke-dasharray, which most plotter and cutter software ignores. Its offset is the clear gap between strokes, so the cut line never overlaps the edge line. - Labels the plotter can draw. Tile labels ("R2 C1") and crop marks sit in the margin, never on the artwork, in a built-in single-stroke font.



How it's built
- A pure geometry core. All the hard logic (about 2,100 lines) is DOM-free TypeScript. It converts every length to millimetres once, applies SVG transforms, honours
viewBoxandpreserveAspectRatio, expands<use>, and flattens Béziers and arcs to polylines within a 0.1 mm tolerance. A test checks that it never imports UI or DOM code. - A hand-written clipper instead of a dependency. Tiles are axis-aligned rectangles, so a Liang–Barsky clipper for open polylines (about 50 lines) replaces a general polygon library. It rejoins closed shapes that cross an edge.
- Minimal-grid maths.
n = ceil((frame − overlap) / (bed − 2·margin − overlap)), checked by a property test over 2,000 random layouts:ntiles always cover the frame, andn − 1never do. - UX details. Errors appear under the field that caused them, and the export button lists what to fix. Settings survive a reload but the file doesn't, and everything works with the keyboard, including the 3 × 3 picker and the preview tiles.
Quality
- 155 unit tests in 17 files (Vitest, about 1 s), covering units, path parsing, curve flattening, clipping, grid maths, the cut border, grid alignment, export and settings. Byte-for-byte snapshot tests prove that new options leave the default output unchanged.
- 18 real-browser checks drive Chrome through the actual UI, export three fixture SVGs, then reopen every tile and verify the geometry lines up across every shared edge to within 1 µm.
- Strict TypeScript with no
any. Lint, type-check and the production build are all clean.
What changed from the previous version
V3 is a ground-up rebuild of the original Quilt. Before writing any code I audited the earlier version and turned its problems into rules and regression tests:
| Earlier version | V3 |
|---|---|
| Units were dropped; tiles were written unitless (220 px ≈ 58 mm on a plotter) | Every value is in mm; every tile has an explicit mm width and height |
ceil(frame / bed) ignored overlap and margin, so it could leave a gap | The correct formula, with property tests |
| Every tile contained the whole drawing, hidden by its viewBox | Real geometry clipping per tile |
| "Export all" crashed | One zip with info files, covered by tests and a real-browser check |
| Cut-border option collected but never drawn | Solid or dashed cut border on its own layer, with exact offset maths |
| Saved settings crashed after a reload | Settings persist without the file, with a regression test |
Stack
Next.js · React · TypeScript · Tailwind CSS 4 · daisyUI 5 · Vitest · Playwright
What's next
- Hatch fills for filled shapes, as real line geometry clipped like everything else
- Reading CSS
<style>classes, and converting<text>to paths - Optimising pen-travel order within each tile
- Separate export layers per pen colour








