← back to pin listBrick 33: drawing-sheet intake -- extract the 1:1 flat pattern in the app
kerfmaster pin list · UI / workflow decisions
recordStates what the code does today. Auditable against the code — this is the only type that can go stale.
Content last changed 2026-09-02 — computed from the item itself, not typed.
Built 2026-09-02 (Jordan's go, from the Lathrup RFQ 23488F packet). Engine sheet_intake.py (docstring = design record), generalized from the proven Lathrup extraction and verified to reproduce ALL 29 shipped flats entity-for-entity from the raw customer drawings.
- DETECT at upload: signals only (dimension entities, title text, several view clusters) -- a detected sheet FLAGS intake (warn never block) with the honest words that heal/QC below judge the SHEET, not a part. Nothing extracts automatically: THE SCALE IS NEVER A GUESS (the vector scale-gate rule). Scale notes read off the sheet's own title text ('1:4' beside 'SCALE:') ride as SEEDS -- seed, never bind, the operator confirms. The original upload is preserved as drawing.dxf forever.
- EXTRACT (POST /api/jobs/<id>/sheetextract {scale,width,height}; GET /sheetintake = the document): the operator states the PRINT's flat size (pdf-dims-govern: the callout is the authority). The flat view = the ONE cluster whose scaled bbox matches the stated size (zero or several = refusal naming the cluster sizes it did see); clusters run over ALL layers (a layer name is a customer convention, never a rule); arc bboxes carry crossed axis extremes (the brick-3 lesson). Annotation ink separates by the four recorded rules: exact duplicates (a bend line drawn twice pairs into a fake closed loop), non-solid linetypes, then the subset search over open chains gated by 'removal leaves ONE closed outer boundary at the stated size, every loop inside it' -- ambiguous = refuse loudly, no valid subset = keep all and QC tells the truth. Every drop recorded with endpoints, never silent.
- PIPELINE: success writes the 1:1 flat ($INSUNITS=1 -- units stated, not inferred) as source.dxf and re-runs the standard pipeline; the standing stale rule comes free (downstream judgments drop, O-numbers kept, deliveries marked). Re-extract always runs from the preserved drawing. A refusal is a plain 400 in the engine's own words, nothing changed.
- UI: the Intake tab renders the yellow detection row, the scale seed ('found on the sheet: 1:4 -- a seed, confirm it'), stated-size unit inputs and Extract; after extraction the honest note (stated vs measured, drops recorded, original preserved).
Proven: test_sheet_intake.py NEW (36 controls: engine detect/extract/refusals verbatim, LV00151-304 and the banana 804 entity-identical to the proven flats, full HTTP e2e upload->flag->refuse->extract->re-extract) + app/verify_sheet.js live Playwright (11 checks on the real 304 drawing: seed prefill, real-mouse extract, 34 x 11.875 at 1:1, heal+QC green, on-screen notes, refusal); test_sketch/test_tooling_doc/test_rules/test_nc_warn/test_drag/test_healedit stay green.
Honest limits: detection is signals, not proof -- a titled 1:1 part file may flag (operator just doesn't extract); extraction trusts LINE/ARC/CIRCLE views only (a polyline-drawn view refuses and says so); one flat view per file (a multi-part sheet is not split); stated size comes from the human reading the print -- reading the callouts off the print PDF itself stays the recorded pdf-dims-govern goal.