Metadata-Version: 2.5
Name: cadrev
Version: 0.3.0
Summary: Reverse-engineer CAD from a paper, with every dimension traceable to a quoted source.
Project-URL: Repository, https://github.com/Vini-41/cad-reverse-engineer
License-Expression: MIT
License-File: LICENSE
Requires-Python: <3.15,>=3.12
Requires-Dist: anytree==2.13.0
Requires-Dist: asttokens==3.0.2
Requires-Dist: bd-materials==0.2.4
Requires-Dist: build123d==0.13.0
Requires-Dist: cadquery-ocp-novtk==8.0.1.1.0
Requires-Dist: cadquery-ocp-proxy==8.0.1.1.0
Requires-Dist: certifi==2026.7.22
Requires-Dist: charset-normalizer==3.5.2
Requires-Dist: cloudpickle==3.1.2
Requires-Dist: colorama==0.4.6; sys_platform == 'win32'
Requires-Dist: contourpy==1.4.0
Requires-Dist: cycler==0.12.1
Requires-Dist: dataclasses-json==0.6.7
Requires-Dist: deprecated==3.0.0
Requires-Dist: executing==2.3.0
Requires-Dist: ezdxf==1.4.5
Requires-Dist: fonttools==4.67.0
Requires-Dist: idna==3.20
Requires-Dist: ipython-pygments-lexers==1.1.1
Requires-Dist: ipython==9.17.1
Requires-Dist: jedi==0.20.1
Requires-Dist: joblib==1.6.0
Requires-Dist: kiwisolver==1.5.1
Requires-Dist: lib3mf==2.5.0; platform_machine != 'aarch64' or sys_platform != 'linux'
Requires-Dist: marshmallow==3.26.2
Requires-Dist: matplotlib-inline==0.2.2
Requires-Dist: matplotlib==3.11.2
Requires-Dist: mpmath==1.3.0
Requires-Dist: mujoco-core==4.0.1
Requires-Dist: mypy-extensions==1.1.0
Requires-Dist: narwhals==2.27.1
Requires-Dist: numpy==2.5.4
Requires-Dist: ocp-gordon==0.3.1
Requires-Dist: ocpsvg==0.7.0
Requires-Dist: packaging==26.3
Requires-Dist: parso==0.8.7
Requires-Dist: pexpect==4.9.0; sys_platform != 'emscripten' and sys_platform != 'win32'
Requires-Dist: pillow==13.0.0
Requires-Dist: platformdirs==4.13.4
Requires-Dist: prompt-toolkit==3.0.53
Requires-Dist: psutil==7.2.2; sys_platform != 'cygwin' and sys_platform != 'emscripten'
Requires-Dist: ptyprocess==0.7.0; sys_platform != 'emscripten' and sys_platform != 'win32'
Requires-Dist: pure-eval==0.2.4
Requires-Dist: py-lib3mf==2.5.0; platform_machine == 'aarch64' and sys_platform == 'linux'
Requires-Dist: pygltflib==1.16.5
Requires-Dist: pygments==2.21.0
Requires-Dist: pyparsing==3.3.3
Requires-Dist: pypdfium2==5.15.2
Requires-Dist: python-dateutil==2.9.0.post0
Requires-Dist: pyyaml==6.0.3
Requires-Dist: requests==2.34.2
Requires-Dist: scikit-learn==1.9.1
Requires-Dist: scipy==1.18.1
Requires-Dist: six==1.17.0
Requires-Dist: stack-data==0.6.3
Requires-Dist: svgelements==1.9.6
Requires-Dist: svgpathtools==1.8.0
Requires-Dist: svgwrite==1.4.3
Requires-Dist: sympy==1.14.0
Requires-Dist: threadpoolctl==3.7.0
Requires-Dist: threejs-materials==1.2.5
Requires-Dist: traitlets==5.16.1
Requires-Dist: trianglesolver==1.2
Requires-Dist: typing-extensions==4.16.0
Requires-Dist: typing-inspect==0.9.0
Requires-Dist: urllib3==2.8.0
Requires-Dist: wcwidth==0.9.2
Requires-Dist: webcolors==24.8.0
Requires-Dist: wrapt==2.5.1
Description-Content-Type: text/markdown

# cad-reverse-engineer

Three skills that turn a paper, patent or datasheet into parametric CAD, with every dimension traced to where it came from. Give your coding agent the documents a device was published in, and it builds:

- **CAD you can open and change**: a STEP file per part and one for the assembly, from a parametric build123d model whose every dimension is a named value in `params.yaml`.
- **A mechanism that moves**: joints, gear ratios and lead screws exported to MuJoCo, with stated motion checked on the model.
- **A drawing of each part**: three views and an isometric one, dimensioned with the checked values, with screw threads named from the ISO metric or Unified table.
- **A report of where each dimension came from**: quoted from a document, read off a file the authors released, or proposed because nothing states it, beside the question that would settle it.
- **A plan to make it**: how each part is made, what to buy and the assembly sequence, which `cadrev check` holds to the model.

## The skills

- **`noob`** comes first, for every object. It tells you what the documents state and leave open and what cadrev does not cover, has you confirm what it read off the figures, and asks metric or US, the material, whether to follow the design or the function, and known first or the complete model.
- **`build-model`** starts from that project and builds the parts the documents settle first. For the complete model it then proposes what they leave open from standard sizes: a thread from the table, a screw in a length you can buy. Under **known first** it stops at the settled parts, with what waits listed as questions.
- **`ask-machinist`** reviews the model as the person who has to make it, part by part, and writes the plan.

*"Reverse-engineer the gripper in this paper"* starts with `noob`, and *"with nothing guessed"* chooses known first. Say "build now" and `noob` answers its questions from the documents. `noob` and `build-model` each end by naming the line to run next: clear the context and run it, and the project's files carry everything across.

## Install

Claude Code:

```
/plugin marketplace add Vini-41/cad-reverse-engineer
/plugin install cad-reverse-engineer@cad-reverse-engineer
```

Codex:

```
codex plugin marketplace add Vini-41/cad-reverse-engineer
codex plugin add cad-reverse-engineer@cad-reverse-engineer
```

Codex's default sandbox blocks network access, which the CLI needs to download its dependencies. Allow it in `~/.codex/config.toml`:

```toml
[sandbox_workspace_write]
network_access = true
```

Any agent that reads skills: `npx skills add Vini-41/cad-reverse-engineer --skill '*'`. Install all three, since `noob` and `ask-machinist` read the file formats that `build-model` holds.

Built for Fable 5.2, and [benchmarked](https://github.com/Vini-41/cad-reverse-engineer/blob/main/docs/benchmark.md) across Anthropic's and OpenAI's frontier models on the flow before 0.3.0.

## The CLI

The skills run the `cadrev` CLI on your machine. It needs [uv](https://docs.astral.sh/uv/), which can install the Python 3.12 to 3.14 it runs on. To run it yourself, with no clone:

```bash
uvx --python '>=3.12,<3.15' cadrev==0.3.0 check my-project
```

Its first run downloads the package, build123d, OCC and MuJoCo from PyPI (about a minute), each at an exact version. Under Codex, allow network access as above.

Four worked examples you can run, and the rest of the documentation: https://github.com/Vini-41/cad-reverse-engineer. MIT license.
