/text-to-cad:engineering-drawingfrom text-to-cad
Generates dimensioned engineering drawings as PDFs from 3D CAD models, with orthographic views, hole callouts, notes, and title blocks. Use when someone requests a blueprint, shop drawing, or 2D views of a part.
Ships in text-to-cad. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
An engineering drawing is a document derived from a part. cad.eng_drawing projects views from the
part's geometry, places dimensions between points on that geometry, finds centre marks, and lays the
result out on an ISO sheet with a frame and a title block. Change the model and rerun the drawing
script, and the views, hidden lines and measured values follow.
The output is one PDF, written by a Python script: there is no command and no DXF. A cut layout or a flat pattern is a toolpath, not a document: that is the cad skill's.
| Task | Start with | Reference |
|---|---|---|
| Draw a part | <name>_drawing.py beside the model, from the script under Workflow | The calls |
| Place views, dimensions, hole callouts, notes | Sheet and View | Sheet API |
| Check the drawing | What the run prints, then the PDF itself | Check each change |
Written for cad==0.11.22. Before first use in a chat, run cad --version. If it fails, or cad is missing or older
than 0.11.12, run uv tool install --force cad. If it is older than the release this skill was written for, run
cad update.
If cad is a major or minor version newer than this skill, tell the person to update the text-to-cad plugin: https://github.com/earthtojake/text-to-cad A project written for an earlier version may need changes; the migration guides say what: https://github.com/earthtojake/text-to-cad/tree/main/docs/migrations
from cad.eng_drawing import Sheet, eng_drawing
from enclosure import HOLES, L, H, W, enclosure # the part and its facts come from the model
@eng_drawing(out="../PDF/enclosure_drawing.pdf")
def enclosure_drawing():
part = enclosure().shape
sheet = Sheet("A3", title="ENCLOSURE", part_number="ENC-001", material="ABS",
revision="A", general_tolerance="ISO 2768-m", notes=["BREAK SHARP EDGES."])
top, front, right, iso = sheet.three_views(part, iso=True)
top.overall()
top.dim((HOLES[0][0], W / 2, 0), (HOLES[2][0], W / 2, 0))
top.hole((HOLES[3][0], HOLES[3][1], H / 2), 3, depth=8, count=len(HOLES))
front.dim((L / 2, -W / 2, 0), (L / 2, -W / 2, H))
return sheet
if __name__ == "__main__":
enclosure_drawing()
cad run enclosure_drawing.py
.shape; for a part with no model, read its file
(step.read, xbf.read, the path anchored on Path(__file__).parent). Any build123d shape works.sheet.three_views(part, iso=True) returns four views: top, front and right in
third angle with room for two rows of dimensions, and an isometric in the free corner (three
without iso). sheet.view(part, name, at=(x, y)) is for a custom layout, in sheet millimetres
from the bottom-left corner.view.overall()), feature
positions and sizes (view.dim, with tol= or fit= where the design requires one), holes as
callouts (view.hole: thru, depth, counterbore, countersink, thread) and notes with leaders
(view.note). Leave text unset so the value is measured, and offset unset so the dimension
takes the next free row outside the view.The run prints the PDF it wrote and anything it noticed while drawing. Read those first:
three_views(gap=...) or place one
with offset=.Then open the PDF. The sheet keeps callouts clear of the views and reports annotation over annotation, but it does not check annotation against line work: confirm no dimension text sits on a view, hidden lines appear where features are behind faces, every hole has a centre mark, and no leader crosses the part. A dimension of a few millimetres puts its value on its own extension line: dimension the larger feature instead.
The script raises instead of writing a wrong or partial document: views that run off the frame (the
error names a scale that fits, or says that none does), an argument outside the vocabulary (an
unknown view, sheet size or projection; a hole both thru and given a depth; notes= given a bare
string instead of a list; a note wider than the sheet's note column), or a missing renderer. A failed
run leaves any earlier PDF untouched.
SHEET n OF m) with numbered notes above it. Text longer than its
title-block cell is set smaller, then cut with an ellipsis, and nothing says so: read the title
block in the PDF. Hidden tangent edges (a fillet running into a face) are not drawn.tol=, fit=, general_tolerance=), from the design's
requirements or the person, never invented. A dimension without one is nominal.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub earthtojake/text-to-cad --plugin text-to-cad8 skills in this plugin
/cadDesigns and edits 3D CAD - parametric parts, assemblies, mechanisms and 2D cut profiles, written as build123d Python and shown live in the text-to-cad viewer. Use for any request to model, change, measure, inspect, animate, export or convert a part or a CAD file (STEP, STL, 3MF, GLB, DXF, xbf), for references and Quick Edit prompts copied from the viewer, and to check whether a part can be machined, cut and bent, molded or printed. Not for robot descriptions, which the robot-simulation skill writes./feaChecks whether a part, or an assembly of bonded parts, is strong enough under its loads, as a linear static stress study (FEA). Use when the person asks whether a part will hold, break or bend too much, where it is most stressed, how much load it takes, how to make it stronger or lighter, or for FEA, a stress analysis or a strength simulation. Reports peak stress, safety factor against yield and deflection. Static loads only, not vibration, buckling, heat, fatigue or impact./pcbOther plugins' skills for the same job