cadrecon
An RL environment and evaluation harness for a task frontier models are measurably bad at: reconstructing a 3D CAD solid from a 2D technical drawing plus sparse specs.
An agent under test receives orthographic drawing views (a rasterized PNG,
plus optionally the vector DXF) and a small spec table, and writes free-form
build123d Python in a hardened Docker sandbox to construct the part. It
submits a STEP file, which is scored geometrically against a ground-truth
STEP file. The interesting signal is in the execute-then-score loop over
direct geometry code — not in regressing a mesh.
Design in one screen
- Direct geometry over program synthesis. The action space is free-form
build123dPython, executed turn-by-turn in a sandboxed container (run_python(code)/submit()); ground truth is the solid, not any particular code, since many programs yield the same shape. (An earlier custom CAD DSL/interpreter was removed in favor of this sandboxed-code action space.) - Dense, geometry-grounded reward. Exact-match rewards don't train. The scorer gives partial credit via continuous geometric similarity (Chamfer distance, tolerant volumetric IoU, F-score) plus a validity term.
- Real distribution, not synthetic inverses. Data comes from purpose-built CAD-ML research datasets — DeepCAD, ABC, and Fusion 360 Reconstruction — the standard benchmarks for this direction. Raw third-party CAD files stay out of the repo; a loader script fetches them locally.
Install
uv sync --all-packages # core (loaders, task builder, scorer, CLI) + the
# environments/cadrecon_env workspace member (the
# verifiers RL/eval environment); a bare `uv sync`
# only installs the root package and the env import
# fails
uv sync --extra data # + real DeepCAD source fetch (gdown)
CLI
cadrecon is the single entry point. Every subcommand runs offline.
uv run cadrecon --help
| Command | What it does |
|---|---|
build |
Load raw loader-format sample files (DeepCAD JSON / ABC STEP) and build a task set (drawings, specs, target STEP + mesh) + manifest |
render |
Project a STEP solid to a multiview DXF, and rasterize it to a PNG |
score |
Score a candidate STEP against a target and print the full breakdown |
validate |
Re-check a built manifest.jsonl against the committed JSON Schema |
data fetch |
Bounded, resumable, polite download of a registered dataset source |
data build |
Build a task-set corpus at scale, from DeepCAD JSON models (--input) or any directory of raw STEP files (--from-step-dir, BYO CAD vault) |
data generate |
Generate a corpus of procedurally-generated, distribution-matched training tasks |
data coverage |
Parse-coverage report over a directory of DeepCAD JSON models |
data stats |
Compute corpus-wide statistics used as the data generate reference distribution |
Layout
src/cadrecon/
loaders/ DeepCAD / ABC -> common CadModel
task/ builder: CadModel -> drawings + specs + ground-truth STEP/mesh
kernel/ geometry kernel (build123d) behind a stable interface
sandbox/ hardened Docker sandbox that runs agent-submitted build123d code
scoring/ Chamfer / tolerant-IoU / F-score / validity + reward assembly
scorer.py candidate-vs-target scoring entry point
data/ dataset build, generation, BYO import, coverage, stats, splits
cli.py operator entry point
environments/
cadrecon_env/ the `verifiers` environment package (cadrecon_env.py) that
wraps the sandbox + scorer into a multi-turn RL/eval env,
runnable via `vf-eval cadrecon-env`
docker/
sandbox/ Dockerfile for the cadrecon-sandbox image the env runs code in
configs/ vf-eval endpoint config (endpoints.toml)
scripts/ sandbox image build, live smoke test (vf-eval), results summary
schema/ cadrecon_manifest.schema.json
docs/ spec, design report, reward red-team, phase plans
tests/ offline test suite (no live network anywhere)
Tests
uv run pytest
The suite is fully offline (R-TST-1): loaders, fetch, and network paths run
against mocked transports and kernel-authored fixture solids
(tests/cadrecon_conftest.py), so no dataset download is required.
Docs
docs/specs/cadrecon-spec.md— the spec.docs/cadrecon-design-report.md— design rationale and the project's origin.docs/data-card.md— dataset sources, licensing posture, and split policy (real data for eval, real + generated for train).docs/reward-redteam.md— adversarial analysis of the reward surface.docs/superpowers/plans/— phased implementation plans.
Status
The reusable artifact is the verifiers environment (environments/cadrecon_env)
plus the dataset pipeline and geometric scorer it wraps. environments/cadrecon_env/README.md
covers the environment's observation/action/reward contract and arguments;
scripts/live_smoke.sh runs the end-to-end acceptance path (vf-eval cadrecon-env against a real model). Not a training-loop deliverable itself —
training happens by pointing an RL trainer at the verifiers/Hub environment.
Metadata
Release files for cadrecon 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cadrecon-0.1.3.tar.gz | 130.0 kB | Without provenance | Details for cadrecon-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cadrecon-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for cadrecon-0.1.3-py3-none-any.whl |
Total release size: 286.3 kB
Release files / cadrecon-0.1.3.tar.gz
| Download URL | cadrecon-0.1.3.tar.gz |
|---|---|
| Size | 130.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
48f236bcbd32d28279fedacef55cae310510545d34dd9edd22611f5580f2c94a
|
|
BLAKE2b-256 checksum How to use checksums |
f257567381199ff4a2d34dd24505ff9a189f24c51b780021fded21f529db459f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.18
|
Release files / cadrecon-0.1.3-py3-none-any.whl
| Download URL | cadrecon-0.1.3-py3-none-any.whl |
|---|---|
| Size | 156.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d17af2d4c2e25c04441b6f9b63058cf53ab52a9ddde7068d9ba22e2d2fe208cc
|
|
BLAKE2b-256 checksum How to use checksums |
38f3ff88fcf0f4ba221c0b1e3422831161e16ea5452b6dbc36368134e009426d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.18
|
Security for cadrecon 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.