Skills

Dxf

Generates, regenerates and validates 2D DXF drawings from Python build123d models...

Install

npx skills add earthtojake/text-to-cad --skill dxf -g -a claude-code -y
Category
Engineering
Updated
3d ago
License
MIT
Context cost
Mediumabout 3,000 tokens
Runs scripts
No, instructions only

What it does

Generates, regenerates and validates 2D DXF drawings from Python build123d models, exported by cadgen. Use for DXF files, `.py` drawing scripts, 2D profiles, outlines, templates, gaskets, panels, flat patterns, laser/plasma/waterjet cut layouts, and 2D drawing exports of CAD geometry. Opens and visually reviews existing DXF files in the CAD Viewer.

DXF generation and validation

Provenance: maintained in earthtojake/text-to-cad. Use the installed local skill files as the runtime source of truth; the repository link is only for provenance and release review.

Setup

Run cadgen through the cadgen command its installation writes, so this skill's commands share one installation, and its engine server, with the CAD app's:

  • cadgen below means cadgen +0.8.4 (~/.local/bin/cadgen +0.8.4 where ~/.local/bin is not on your PATH)
  • python below means cadgen +0.8.4 run

For first-time setup or an update, a missing cadgen command, a release it says is not installed, an engine that is not running, or an installation or kernel load error, read Setup and troubleshooting.

Drawings are build123d geometry, so a drawing builds in the engine's warm worker like any model: the first run of a script loads the CAD kernel (a few seconds), and later runs reuse it.

Purpose

Create or modify 2D DXF drawings from natural-language requirements or from CAD geometry, export validated DXF files, and return checked outputs. A drawing's source of truth is a Python file named <name>.py defining a parameterless @model function that returns planar geometry.

A drawing is a model. It builds as any $cad model does: python <name>.py rebuilds it in the engine, prints its document's id: and page, and writes nothing. The DXF is exported from that document, by build123d's own exporter, once the drawing checks pass: cadgen export <id> drawing.dxf. A drawing that calls a part model (bracket() in its body) builds that part in the same run. The CAD Viewer and cadgen snapshot read the .dxf itself, so the file you hand a cutting service, the file the viewer draws and the file a snapshot renders are one and the same.

The contract

Read the whole SKILL.md on GitHub

More in Engineering