Skip to content

Feature: cut-ready exports — true-scale SVG/PDF of numbered pieces (per-piece templates + full pattern) #106

Description

@dompm

The app already gets users from photo → calibrated, glass-assigned pieces, and has a multi-page tiled print path (App.tsx:762-920). The missing last mile is what a stained-glass builder actually takes to the bench:

1. True-scale pattern sheet (PDF)

  • Full pattern at 1:1 using patternScale, tiled across pages with crop marks and overlap glue strips (the tiling logic largely exists in the print generator — extract to utils/print.ts and extend).
  • Each piece labeled with its number/name and assigned glass sheet; a legend mapping numbers → glass.
  • Optional line-width rendering matching the chosen solder/foil thickness (the project already stores solder presets), since pattern shears cut a real kerf between pieces.

2. Per-piece cutting templates

  • One outline per piece at true scale (this is where the cutting-gap offset matters — see the smart-pack gap issue), grouped by glass sheet so you cut all pieces of one glass together, packed onto pages.
  • Mirrored option (for cutting on the back of the glass / opalescent sheets).

3. SVG export

  • Vector export of the piece outlines (polygons + restored Bezier curves from curvePoints, not the flattened approximation) with real-world units in the viewBox.
  • This unlocks plotter/vinyl-cutter users (Cricut/Silhouette for foil patterns), laser-cut jigs, and import into Inkscape/Illustrator — and it's nearly free given the data model: pieces are already polygons + curve metadata.

Implementation note: SVG generation is pure string templating over existing geometry; PDF can ride on the browser print path already in App.tsx (print-to-PDF), so no heavy dependency is required for v1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions