# /cad: Model real parts in Python and check they can be made

Source: https://trendhub.net/skills/earthtojake-text-to-cad/cad
Skill folder: https://github.com/earthtojake/text-to-cad/tree/main/skills/cad
Pack: text-to-cad (https://trendhub.net/skills/earthtojake-text-to-cad)
Works with: macOS and Linux (all detected agent apps), Windows PowerShell (all detected agent apps)

The core skill of text-to-cad. The agent writes each part or assembly as a decorated build123d function, rebuilds it through a local server that keeps a live viewer page in sync, and verifies every change with asserts, check scripts, interference tests and snapshots. When you name a process, the part is designed for it from the first line and checked after each run.

## When to use it

- You want a bracket, enclosure or mechanism as an editable parametric model rather than a one-off mesh.
- A part has to be machined, bent from sheet, molded or printed and you want limits applied while modelling.
- You need STEP, STL, 3MF, GLB or DXF files exported from one source of truth.

## How it works

1. **Write the model**: Defines each configuration as a parameterless model function that calls a helper holding the dimensions, and keeps the calls under the script's main guard.
2. **Run and read the delta**: Builds with cad run, then reads the printed parts, bounds, joints and sequences and fixes any mismatch with the intent first.
3. **Verify the change**: Checks given numbers with asserts on measured geometry, assemblies with the interference command at each pose, and appearance with targeted snapshots.
4. **Design for the process**: Reads the process reference before modelling, records material and shop flags in the model, and reruns the manufacturing check after every edit.
5. **Hand off**: Reports the models and files produced, checks run and results, unchecked requirements and any assumption, and shares the viewer link once.

## What it steers the agent away from

- Reading dimensions off a rendered picture instead of measuring the geometry.
- Quietly dropping or shrinking a requested fillet or feature to get a build to pass.
- Treating a check that could not decide as a pass.

## What it can touch

Runs the cad command and Python model scripts, writes exports and temporary snapshots, and installs text-to-cad if it is missing.

## Pairs well with

- `/engineering-drawing`
- `/fea`
- `/print3d`

## Questions

### What units and axes does it use?

Millimetres, with positive Z pointing up.

### Does every run write files?

No. Running a script only rebuilds the model in the server; files are written when you ask for an export or keep an exports script.
