Reference

Command line

python -m src.lowpoly_pdf_to_svg [options]

Option Default Description
--config data/example/example.yaml Project YAML manifest
--output the YAML’s folder, data/<project>/ Output directory
--dpi 180 PDF render resolution
--page all pages Convert only this 1-based page; repeatable
--pdftoppm pdftoppm Poppler pdftoppm executable

Make targets

Target What it does
make Convert every page in the manifest into data/<project>/<project>.svg
make page PAGE=4 Convert one page into output/<project>/page-4/
make export Last step: data/<project>/<project>-export.svg with short glue-pair labels and cardstock fills, see Export SVG contract
make export-check Rebuild the synthetic export fixture and check it against the contract
make install Install the Python dependencies
make report Render this site into report/_site
make preview Serve this site on localhost and re-render on save
make report-data Write the summary statistics the public site is built from into report/data/<project>/
make clean Remove generated output

Manifest

data/example/example.yaml
project: example

source:
  pdf: example.pdf         # in data/, not committed
  page_size: letter

folds:                     # which printed line style is which fold
  dash_dot: mountain       # Pepakura default; swap if a template
  dashed: valley           # draws mountain folds dashed

output:
  default_sheet: a4        # a4 or 12x12 for nesting

materials:                 # one entry per cardstock colour
  - id: red
    name: Red cardstock
    pages: [4, 5, 6, 7, 8, 9, 10]

Outputs

File Contents
data/<project>/<project>.svg One Inkscape SVG, one row of pages per cardstock (not committed); document size in inches, drawing in millimetres
data/<project>/previews/page-PP-<material>.png Each PDF page as rendered for tracing (not committed)
data/<project>/edge-numbers.csv One row per printed edge number, read by the glue pairs page
data/<project>/README.md Conversion status and edge check; its first paragraph is shown on the home page

Edge table columns

Column Description
number The printed edge number, as text (leading zeros kept)
piece Piece id piece-PP-NN, PP the PDF page
side edge, tab or none (no cut edge found under the number)
length_mm Length of that edge
x_mm, y_mm Position of the number on its page
ocr_trusted yes when the number was read with confidence
partner_piece, partner_side, partner_length_mm The other place the same number is printed
length_diff_mm Difference between the two edge lengths
status ok, length mismatch, both tabs, no tab, unpaired, line not found, printed N times