Home / Demos / Parametric CAD with SolidCraft

CAD SolidCraft 0.10.1 · OpenCascade 8.0.1

Parametric CAD with SolidCraft

The agent writes a SolidCraft command script for a motor-mount adapter plate: rounded corners, a centre bore, a raised boss, four bolt holes on the motor's pitch circle and a mass limit in aluminium. The script must stay parametric. The judge does not trust SolidCraft's numbers. It re-measures the delivered STEP and STL with OpenCascade and compares them with numbers it computes by hand from the spec. It then proves every wall with exact boolean checks, and re-grades the whole part after changing thickness by 2 mm.

SolidCraft building the part step by step, a live thickness sweep, the judge's verdict and the real independent-agent loop. Made from real judge output, no illustrative data.

Measured

6.9e-10
OCCT volume vs analytic (16644.9 mm³)
pass line 0.2 %
1.2e-6
SolidCraft vs OpenCascade volume
pass line 0.1 %
5124.18 mm³
volume added by thickness +2 mm (analytic 5124.18)
pass line 0.2 %
44.94 g
mass in 6061 aluminium
≤ 52 g
19/19
known-bad artifacts rejected
self-test, ≥ 90 % required

reproduced Independently reproduced by a different model family, which also modelled the part itself. 11 of its 12 designs pass; one fails on its own unit error. Numbers from the demo's README and receipt.

Ask your agent

With the sandbox plugin or any agent that can use a sandbox, paste:

Set up a sandbox and solve the demo in `cookbook/solidcraft-cad/` of https://github.com/agent-next/sandbox (clone it first). Run `bash cookbook/solidcraft-cad/judge/setup.sh`, read `cookbook/solidcraft-cad/SPEC.md` and `spec.json`, then model the part yourself with SolidCraft: write a command script `design.json` with a `thickness` parameter that drives the plate. First `export PATH="$HOME/.local/solidcraft-0.10.1-linux-x86_64/bin:$PATH"`, then use `solidcraft-cli commands`, `solidcraft-cli eval design.json` and `solidcraft-cli snapshot design.json --out part.png`. Iterate with `bash cookbook/solidcraft-cad/judge/grade.sh design.json --json v.json` until it exits 0, then paste the verdict and the snapshot. Do not edit `judge/` or `spec.json`. Kill the sandbox when you are done.

Or run it yourself

Creates a sandbox, installs the pinned tools, runs the judge's self-test, grades the known-good example, prints the verdict and kills the sandbox.

pip install "git+https://github.com/agent-next/sandbox#subdirectory=cli"
export SBX_API_KEY=<your key>  # from the console
git clone --depth 1 https://github.com/agent-next/sandbox && cd sandbox
python3 cookbook/solidcraft-cad/run.py
No key? Run the judge on any Debian 12 box
# from cookbook/solidcraft-cad/
bash judge/setup.sh
bash judge/selftest.sh
bash judge/grade.sh examples/good/design.json --json verdict.json

Results

The delivered part next to all 12 numeric checks as measured value over pass limit, every one below the pass line
The delivered part next to all 12 numeric checks as measured value over pass limit, every one below the pass line. Full size
The independent agent's 12 designs graded by the old and the fixed judge, and 19 of 19 broken designs rejected
The independent agent's 12 designs graded by the old and the fixed judge, and 19 of 19 broken designs rejected. Full size

Why a sandbox

The agent gets a 26 MB CAD binary, a 100 MB OpenCascade stack and a scratch filesystem to iterate in. Everything is pinned and hash-checked, and it is all thrown away afterwards. The graded artifact is one small JSON file.

Measured wall time

StepWall time
judge/setup.sh (cold)~2 min
judge/selftest.sh (16 unit tests, 3 good designs, 19 mutants, determinism)~13.5 min
judge/grade.sh, one design~1 min

Limits, plainly

  • x86_64 Linux with CPython 3.12 or 3.13.
  • SolidCraft v0.10.1 is younger than the two-week pin rule (the project started 2026-10-07); it is pinned by sha256.
  • The judge checks one part family (plates with Z-axis holes), not general CAD equivalence.

Source

Demo folder · SPEC · RECEIPT · REPRODUCE — pinned at ba328e6

Run one yourself

Sign in with GitHub for a free key with 10 sandbox-hours. Every demo above finishes in minutes and kills its sandbox when it is done.