engineering-drawing
БесплатноБез исполняемых скриптовНе проверенMakes an engineering drawing of a part as a PDF, projected from its 3D geometry so the drawing follows the model, with dimensioned orthographic views, hole…
от earthtojake★ 27 943 звезды на GitHubОб этом скилле
Engineering drawing
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.
Start with the task
| 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 |
Setup
Written for cad==0.11.21. 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
Workflow
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
- Get the part. Call the model and take its
.shape; for a part with no model, read its file (step.read,xbf.read, the path anchored onPath(__file__).parent). Any build123d shape works. - Import the model's facts (hole pitch, overall size, wall) instead of retyping them, so moving a feature moves its dimension.
- Place views.
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 withoutiso).sheet.view(part, name, at=(x, y))is for a custom layout, in sheet millimetres from the bottom-left corner. - Dimension what a maker needs, in model coordinates: overall size (
view.overall()), feature positions and sizes (view.dim, withtol=orfit=where the design requires one), holes as callouts (view.hole: thru, depth, counterbore, countersink, thread) and notes with leaders (view.note). Leavetextunset so the value is measured, andoffsetunset so the dimension takes the next free row outside the view. - Run it and read the PDF.
Check each change
The run prints the PDF it wrote and anything it noticed while drawing. Read those first:
- "measures blank paper": a dimension's model points do not land on the view's geometry. Usually the part was built from a corner and the script assumed it was centred: check its bounding box.
- "annotation overlaps": two callouts print over each other, usually one view's outermost
dimension against the label of the view above. Pass a larger
three_views(gap=...)or place one withoffset=.
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.
What the drawing holds, and what it does not
- Visible edges heavy, hidden
Установить engineering-drawing в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл engineering-drawing?
Makes an engineering drawing of a part as a PDF, projected from its 3D geometry so the drawing follows the model, with dimensioned orthographic views, hole callouts, notes and a title block. Use when the person asks for a drawing, a dimensioned sheet, shop or manufacturing drawings, a blueprint, or "2D views of this part". Not for DXF cut layouts or flat patterns, which the cad skill makes.
Как установить скилл engineering-drawing?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл engineering-drawing запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic