engineering-drawing
できること
このスキルは、パーツの寸法入りのPDFの図面シートを、図と注記とともに作ります。工場や製造用の図面が必要なエンジニアやメイカー向けです。
使う場面
- ✓パーツの寸法入りの図面や印刷物を依頼されたとき。
- ✓図、寸法、表題欄を持つPDFが工場で必要なとき。
- ✓3Dモデルの2Dの図で、隠れ線と穴の注記がほしいとき。
スキルのリンク
https://github.com/earthtojake/text-to-cad/blob/main/skills/engineering-drawing/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“このパーツの、寸法と表題欄を入れたPDFの工学図面を作ってもらえますか。”
毎週5つの新しいスキル。1分で読めます。
仕組み
AIは、パーツの形状から図を投影し、その上に寸法を配置するスクリプトを書きます。モデルが変わったら、スクリプトを再実行すると図面が更新されます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)を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 on it, and lays the result out on an ISO
sheet with a frame and a title block. Change the model, rerun the drawing
script, and the views, hidden lines and measured values move with it. Nothing
on the sheet is drawn by hand, and nothing on it is a number you typed unless
you chose to override a value.
The output is one PDF. That is what a shop receives and what every operating system opens. No DXF is written, nothing is paired or linked, and there is no CLI: the script is the interface. Cut layouts and flat patterns are toolpaths, not documents, and a different job.
Setup
Run the cad command (~/.local/bin/cad where ~/.local/bin is not on your PATH, or where a
project's environment puts its own cad first; cad.cmd on Windows). If cad is not found and
the CAD app was only just added, its server may still be starting: wait five seconds and run the
command again, for up to a minute, before anything else. Otherwise install text-to-cad, outside a sandbox or with its permission:
curl -fsSL https://texttocad.dev/install.sh | sh
On Windows, in PowerShell: irm https://www.texttocad.dev/install.ps1 | iex. Any other failure
says what to do, and cad doctor explains the installation.
Workflow
Get the part. Call the model:
enclosure(), imported from the model's script, is built by text-to-cad's server (a replay when the server already holds it), and its.shapeis the part. For a part with no model, read its file:read_stepfor a STEP,read_xbffor an xbf, anchored onPath(__file__).parent. Any build123d shape works. The drawing documents geometry, it does not build it.Write
<name>_drawing.pybeside the model, from the template. Import the model facts the dimensions reference (hole pitch, overall size, wall) from the model module rather than retyping them, so moving a feature moves its dimension.Place views with
sheet.three_views(part, iso=True), which returns FOUR views: top, front and right in third angle with room for two rows of dimensions, plus an isometric in the free corner.sheet.three_views(part)returns three. Usesheet.view(part, name, at=(x, y))(sheet millimetres from the bottom-left corner; A3 is 420 × 297, A4 is 297 × 210) only for a custom layout.Dimension what a maker needs, in MODEL coordinates: overall size per view (
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 dimension is measured; give a value only where the model does not define it. Leaveoffsetunset too and the dimension takes the next free row outside the view; pass one only to place a dimension deliberately, and remember it is measured from the dimension's own points, not the view's edge. Keep notes few and short; one wider than the sheet's note column is refused, andnotes=takes a LIST (notes="BREAK EDGES"is a sequence of eleven characters, so it is refused too).Run
cad run <name>_drawing.py. It prints the PDF it wrote, and anything it noticed while drawing — read those first:- "measures blank paper": the dimension's model points do not land on the view's geometry. Almost always the part was built from a corner and the script assumed it was centred. Check the part's bounding box.
- "annotation overlaps": two callouts print on top of each other, usually
one view's outermost dimension against the label of the view above it.
Pass a bigger
three_views(gap=...)or place one withoffset=. The text is measured as the renderer draws it, glyph by glyph, so this fires on ink and not on markup: a chain of toleranced dimensions is silent when the values clear each other.
Steps 3 and 5 stand on their own: a sheet of views with no dimensions on it yet is a drawing, and writes its PDF.
When running unattended, set
MPLCONFIGDIRto a writable directory so matplotlib's font cache does not warn.Read the PDF and fix what collides. Check that no dimension text sits on a view, that hidden
よくある質問
DXFファイルも作りますか?
いいえ。出力は1枚のPDFの図面シートです。
寸法はモデルから取られますか?
はい。図と測定値はパーツの形状から得られ、手で入力した数字ではありません。
レーザー切断にも使えますか?
いいえ。切断の配置は別の作業なので、それにはDXFのスキルを使ってください。
詳細
作者による元の説明
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". Not for DXF cut layouts or flat patterns.
repo: earthtojake/text-to-cad
人気
- GitHubのスター
- 25k
- ランキング
- #10071
- ライセンス
- MIT
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
bambu-labs
25kエージェントが、Bambu ConnectまたはBambu Studioを通じて、スライス済みまたは未スライスの3Dモデルを、Bambu Labのプリンターに送れるよう支援します。
cad
25kエージェントが、Python の build123dスクリプトとして3Dのパーツやアセンブリをデザインし、STEPやSTLのファイルとして書き出し、寸法を確認できるよう支援します。
dfam-check
25kエージェントが、3Dメッシュファイルが十分に印刷できるかを確かめ、オーバーハング、壁の厚さ、サポートの必要性を報告できるよう支援します。
dfm
25kエージェントが、板金、CNC加工、射出成形のためにパーツをレビューし、それが作れるか、何を変えるべきかを確認できるよう支援します。
似ているスキル
feishu-doc
394kテキスト、画像、表を含むFeishuのクラウドドキュメントを、ドキュメントツールを使って読み、作成し、編集するようエージェントを支援します。
feishu-drive
394kボットと共有されたFeishuのクラウドフォルダ内のファイルを閲覧、整理、コメントできるようエージェントを支援します。
feishu-perm
394kFeishuのファイルにアクセスできる人を確認し、変更するようエージェントを支援します。依頼を満たす最小の権限を選びます。