← text-to-cadCONTENT HISTORY

Update to text-to-cad

Snapshot Oct 6, 2026 · 00:02 UTC · version 0.7.10

Collection source: downloaded plugin package.

WHAT CHANGED · RULE-BASED ANALYSIS

First saved snapshot

No earlier snapshot is available to establish a change.

Compare saved observations

Download comparison JSON
Full technical diff · 0 changed fields
Full snapshot data
{
  "description": "Make an engineering drawing of a part as a PDF - orthographic views with hidden lines and centre marks, real dimensions, hole callouts, notes and a title block on ISO sheets, all projected from the part's geometry so the drawing follows the model. Use when the user asks for a drawing, a dimensioned sheet, shop or manufacturing drawings, a print, or \"2D views of this part\".",
  "included_files": [
    {
      "relative_path": "LICENSE",
      "size_in_bytes": 1074
    },
    {
      "relative_path": "agents/openai.yaml",
      "size_in_bytes": 297
    },
    {
      "relative_path": "references/sheet-api.md",
      "size_in_bytes": 6970
    },
    {
      "relative_path": "requirements.txt",
      "size_in_bytes": 15
    }
  ],
  "name": "engineering-drawing",
  "skill_md_contents": "---\nname: engineering-drawing\ndescription: Make an engineering drawing of a part as a PDF - orthographic views with hidden lines and centre marks, real dimensions, hole callouts, notes and a title block on ISO sheets, all projected from the part's geometry so the drawing follows the model. Use when the user asks for a drawing, a dimensioned sheet, shop or manufacturing drawings, a print, or \"2D views of this part\".\nlicense: MIT\n---\n\n# Engineering drawing\n\nProvenance: maintained in [earthtojake/text-to-cad](https://github.com/earthtojake/text-to-cad).\nUse the installed local skill files as the runtime source of truth.\n\nAn engineering drawing is a DOCUMENT derived from a part. `cadgen.eng_drawing`\nprojects views from the part's geometry, places dimensions between points ON\nthat geometry, finds centre marks on it, and lays the result out on an ISO\nsheet with a frame and a title block. Change the model, rerun the drawing\nscript, and the views, hidden lines and measured values move with it. Nothing\non the sheet is drawn by hand, and nothing on it is a number you typed unless\nyou chose to override a value.\n\n**The output is one PDF.** That is what a shop receives and what every\noperating system opens. No DXF is written, nothing is paired or linked, and\nthere is no CLI: the script is the interface. `$dxf` makes cut layouts and flat\npatterns, which are toolpaths, not documents; the two are different jobs.\n\n## Workflow\n\n1. Get the part. `cadgen.read_step(Path(__file__).parent / \"../STEP/part.step\")`\n   reads the artifact a `@step` model wrote (run `python <model>.py` first); a\n   live build123d shape works just as well. The drawing documents geometry, it\n   does not build it.\n2. Write `<name>_drawing.py` beside the model, from\n   [the template](references/sheet-api.md#template). Import the model facts the\n   dimensions reference (hole pitch, overall size, wall) from the model module\n   rather than retyping them, so moving a feature moves its dimension.\n3. Place views with `sheet.three_views(part, iso=True)`, which returns FOUR\n   views: top, front and right in third angle with room for two rows of\n   dimensions, plus an isometric in the free corner. `sheet.three_views(part)`\n   returns three. Use `sheet.view(part, name, at=(x, y))` (sheet millimetres\n   from the bottom-left corner; A3 is 420 × 297, A4 is 297 × 210) only for a\n   custom layout.\n4. Dimension what a maker needs, in MODEL coordinates: overall size per view\n   (`view.overall()`), feature positions and sizes (`view.dim`, with `tol=`\n   or `fit=` where the design requires one), holes as callouts (`view.hole`:\n   thru, depth, counterbore, countersink, thread), and notes with leaders\n   (`view.note`). Leave `text` unset so the dimension is measured; give a\n   value only where the model does not define it. Leave `offset` unset too and\n   the dimension takes the next free row outside the view; pass one only to\n   place a dimension deliberately, and remember it is measured from the\n   dimension's own points, not the view's edge. Keep notes few and short; one\n   wider than the sheet's note column is refused, and `notes=` takes a LIST\n   (`notes=\"BREAK EDGES\"` is a sequence of eleven characters, so it is refused\n   too).\n5. Run `python <name>_drawing.py`. It prints the PDF it wrote, and **anything\n   it noticed while drawing** — read those first:\n   - *\"measures blank paper\"*: the dimension's model points do not land on the\n     view's geometry. Almost always the part was built from a corner and the\n     script assumed it was centred. Check the part's bounding box.\n   - *\"annotation overlaps\"*: two callouts print on top of each other, usually\n     one view's outermost dimension against the label of the view above it.\n     Pass a bigger `three_views(gap=...)` or place one with `offset=`. The text\n     is measured as the renderer draws it, glyph by glyph, so this fires on ink\n     and not on markup: a chain of toleranced dimensions is silent when the\n     values clear each other.\n\n   Steps 3 and 5 stand on their own: a sheet of views with no dimensions on it\n   yet is a drawing, and writes its PDF.\n\n   When running unattended, set `MPLCONFIGDIR` to a writable directory so\n   matplotlib's font cache does not warn.\n6. **Read the PDF** and fix what collides. Check that no dimension text sits on\n   a view, that hidden lines appear where features are behind faces, that every\n   hole has a centre mark, and that no leader crosses the part. Very small\n   dimensions (a few mm) put their value on their own extension line; dimension\n   the larger feature instead. Move `at=` or `offset=` and rerun.\n\n## What the sheet contains\n\n- Layers with meaning: `VISIBLE` (heavy outline), `HIDDEN` (dashed), `CENTER`\n  (centre marks), `DIM`, `NOTES`, `TITLE`, `SHEET` (frame), each printed at its\n  own weight — 0.5 mm down to 0.18 mm, so thick reads against thin on paper.\n  An edge is drawn once: a silhouette that the kernel returns as both visible\n  and hidden stays on `VISIBLE`. Hidden TANGENT transitions are not drawn at\n  all — a fillet running into a face, or the seam where a cylinder closes on\n  itself, marks nothing a shop can see, and drawn dashed it reads as a hidden\n  edge that is not there (on a bore, as a line down the hole's own axis).\n- Dimensions measured from the geometry, with filled arrowheads and witness\n  lines, and true-size values at any drawing scale.\n- A title block with title, part number, material, author, scale, units,\n  projection, revision, `SHEET n OF m` and the drawing function's name;\n  numbered notes above it (the general tolerance, when given, is note 1);\n  a revision table top-right when `revisions=` is given. Text longer than\n  its cell is set smaller, and cut with an ellipsis rather than overrun.\n- PDF bytes that are a function of the content: no creation date is stamped, so\n  an unchanged drawing rebuilds to an identical file.\n\n## What fails loudly\n\nThe script raises rather than writing a wrong or missing document:\n\n- Views that run off the frame, naming a scale that has been laid out and\n  verified to fit, or saying that no standard scale does.\n- A part argument the vocabulary does not define: an unknown view name, sheet\n  size or projection, `orientation=` other than `\"h\"`/`\"v\"`, a negative or zero\n  diameter, a counterbore that is not a `(diameter, depth)` pair, a `tol` that\n  is not a number or a pair, a hole that is both `thru` and given a depth,\n  `notes=` or `revisions=` given a bare string, a note wider than the sheet,\n  `angle()` legs that are collinear or zero-length, a non-finite `at=` or\n  `offset=`.\n- A missing renderer. The PDF is the drawing, so no matplotlib is a failure,\n  not a skipped half. A failed render leaves no file behind.\n- `out=` missing or not naming a `.pdf`, at import time.\n\n## Limits to state in the handoff\n\n- Tolerances come only from `tol=`, `fit=` and `general_tolerance=` that you\n  write; get the values from the design requirements or the user, never\n  invented. A dimension without one is nominal.\n- Views are orthographic projections with hidden lines from the kernel; no\n  sections, details, or auxiliary views yet. Say what a view does not show.\n- The sheet keeps callouts clear of the views it knows about, and reports\n  annotation that still prints over other annotation, but it does not check\n  annotation against line work. Read the PDF.\n"
}

SHA-256 of public snapshot: b934b50bd6909cad2cd5b49036c6bab7dbc7a3e101c472a13599e60ebb4ec41a