# Drawing pack tool - guide for AI agents Purpose: turn a STEP model into an A4 first-angle technical drawing pack (SVG per sheet + one PDF). The ONLY thing you author is a JSON "spec" (schema: /spec.schema.json). The tool draws all geometry itself from the loaded STEP file. Never invent dimensions, counts, prices or times. ## Rules - Dimensions come only from the STEP. If a figure is not in the STEP or the user's files, write UNVERIFIED in the text. - Every sheet carries an UNVERIFIED status pill. Never mark anything approved or released. - Compute totals/quantities with code, not in your head. For BOM tables set check:{pack,price,each} so each = price/pack is verified. - Keep notes short: 2-6 plain sentences per sheet. No filler. - Frame is one line. Do not ask for a ruler or a double frame. ## Layouts (sheet.layout) - cover | iso | single : one view. view = iso|front|right|left|back|plan|bottom. Optional scale (2 = 2:1, 0.5 = 1:2), hidden. - ortho : right / front / left in first-angle with auto scale and overall dimensions. plan:true adds the plan view below. - sections : cuts:[{axis:"x|y|z", at:, hidden?:bool}], hatched cut faces labelled A-A, B-B... - table : columns, rows, widths(pt), heading, subheading, blocks:[{heading,lines}], check. Cells are text, a list of lines, or text with \n. - contents : built automatically from the sheet list (uses section + desc). - conventions : automatic line-weight and projection sheet. - blank. ## Hidden lines (dashed or not) are chosen per drawing hidden: true | false for the whole sheet, or {"front": true, "right": false, "left": true, "plan": false}. Defaults: dashed on ortho, off on iso/cover/single/sections. ## Workflow for an agent 1. Read the part size (partInfo) so section positions (axis, at) fall inside the part. 2. Write a spec that validates against /spec.schema.json. Use setSpec(spec) - it returns validation errors with paths; fix and retry. 3. Call render(); read warnings (BOM mismatches, undrawable sheets). Fix them by editing the spec, not by hand-editing SVG. 4. Fetch results with getSvg(index) or exportPdf(). ## Browser API (window.drawpack) version, guide(), schema(), partInfo(), getSpec(), setSpec(spec) -> {ok, errors[]}, loadStepUrl(url), loadStepBase64(b64, name), render() -> {warnings, sheets:[{index,title,layout}]}, getSvg(index) -> string, exportPdf() -> base64 string. Sharing: the page also accepts #spec= in the URL. Schema: /spec.schema.json Sample part: /sample.step