Build STEP assemblies.
Check them automatically.
CADCLAW is an open-source Python toolkit for mechanical assemblies. You declare how your authored STEP parts seat together on connector frames and datum chains. CADCLAW compiles the assembly, then runs automated gates on what it built: interference, adjacency, floating parts, dimensions, tolerance stacking and BOM-vs-CAD. Run it at your desk, in CI, or let an AI assistant drive it through the included MCP server.
MIT licensed · pip install cadclaw · Python 3.10+ with CadQuery · no commercial CAD software required for CADCLAW's own checks
September 2026 update
Same scores. Stronger evidence.
CADCLAW 0.11.0 adds two checks: semantic PMI presence and an opt-in AP242 round trip. MARB now pins each benchmark method to a version and records hashes that tie a result to the exact source, runtime and gates that produced it.
The MARB GAP, POS and ORIENT formulas are unchanged, but stricter validation can change whether a run is accepted. This update adds no new benchmark results.
Quick start
Install the package, verify the environment, point it at a rule file, and run. The harness returns a process exit code, so a failing gate fails a CI job the same way a failing test does.
pip install cadclaw cadclaw doctor # verify the environment cadclaw harness --rules cadclaw.yaml # run configured checks cadclaw bom-audit --rules cadclaw.yaml # or a single gate
Exit codes: 0 pass · 1 fail · 2 warn-only · 3 internal error.
A minimal cadclaw.yaml
schema_version: "0.9" meta: project: my-project step: build/assembly.step # your authoritative STEP export bom: bom/public_bom.json # your public BOM JSON # Bbox signature to label. Observational, not generative: this says # "a part with this bbox signature is a NEMA23". It does not make one. # A signature is the sorted (dx, dy, dz) tuple rounded to 0.1 mm. labels: cbeam_4080_1m: [40.0, 80.0, 1000.0] nema23: [56.4, 56.4, 76.6] vwheel: [10.2, 23.9, 23.9] expected_inventory: cbeam_4080_1m: 17 nema23: 6 bom_audit: ignore_labels: [other, belt] pmi_present: expected_classes: [dimensions, geometric_tolerances, datums]
Most sections are opt-in; an unconfigured selected gate is reported as not checked or not applicable rather than silently passing. For backward compatibility, claim_audit.scan_paths defaults to README.md, so override that list explicitly when the public claims live elsewhere. Scaffold the labels block from an existing STEP file with examples/init_rules.py. Full how-it-works write-up: CI for mechanical design →
What it checks open source
A chain of gates runs against the exported STEP, the BOM JSON, and your README text. Each finding carries severity, evidence, and a confidence budget rather than a bare pass or fail, because a real part is not binary present-or-absent: it can be slightly the wrong size, slightly clipping, slightly misplaced.
Inventory
Missing or extra parts, by bounding-box signature, against expected counts.
Interference
Solid-solid overlaps by BRep boolean intersection, not just bounding boxes.
Adjacency
Parts that should be near each other but aren't, like a motor 600 mm from its mount.
Dimensional
Wrong thickness, swapped box() args, impossible dimensions.
Semantic PMI
Whether declared AP242 semantic dimensions, geometric tolerances and datums are present. Graphical PMI, materials and notes are out of scope. In release 0.11.0, not yet on PyPI.
AP242 round trip
Opt-in. Imports the STEP with OCCT, exports AP242 and reimports it, then compares shape counts, geometry measures, declared interface gaps and semantic-PMI class counts. Matches up to 256 shapes one to one; larger comparisons stop with an error rather than sample. It does not prove native-model fidelity or conformance. In release 0.11.0, not yet on PyPI.
Floating
Non-exempt parts isolated from the structural frame beyond a max gap.
Structural
Beam deflection, motor torque budget, belt tension. Static load math, not motion-clearance or full-travel sweeps.
Tolerance
Worst-case, RSS, Monte Carlo stacking with Cpk and variance decomposition.
BOM audit
BOM JSON ↔ CAD: qty, mfg_type, required/forbidden terms, count drift. Private fields never echoed.
cadclaw doctor checks the environment, cadclaw publish-audit checks publication boundaries, and cadclaw claim-audit flags selected overclaim patterns. The local MCP server declares 24 tools for assembly, checks, analysis, audits and rendering, including the versioned run_harness runner. It is not a security sandbox: it reads the paths it is given, six assembly tools write outputs, and it runs with your account's permissions. Use a least-privilege working copy and review what the tools read and write.
Assemble, then verify
CADCLAW does two things, and the first one is the reason the second one is useful.
It assembles. An assembly spec declares the parts, where they come from, and how they seat against each other. An instance says place this connector frame against that parent frame, offset along an axis. The resolver walks the datum chain in topological order and solves each transform, reporting cycles, missing references, and missing frames as findings. Absolute transforms still work, so migration is incremental. Parts land by constraint, not by hand-typed coordinates, which is what makes the result reproducible enough to check.
It verifies. The gates above run against the compiled STEP and report what they found. Alongside them it emits a design inventory, a model-derived BOM, review-view renders, and step-by-step build sequences.
It works with AI assistants. Through the MCP server, an assistant can build an assembly, see the review renders it gets back, and correct what the gates report. It follows the same rule you do: place authored parts, never generate them.
What CADCLAW does NOT prove
CADCLAW checks geometry, BOM JSON, and README text against rules you write. It does not prove:
- That the native CAD model has no hidden or suppressed parts. It reads the STEP export, which can silently drop invisible parts.
- That AP242 PMI is graphically correct, fully constructed, standards-conformant, or faithful to the native model. The semantic PMI gate reports declared class presence only.
- That an AP242 round trip proves native-CAD correctness, translator independence, PMI value or association fidelity, or interoperability compliance. The gate compares only its recorded STEP artifacts and declared evidence.
- That the physical build matches the CAD.
- That a vendor part is in stock or the price you assumed.
- That a printed part is strong enough for production. The structural gate does bare-beam math, not fatigue or creep.
- That an AI-generated change is correct. Passing the gates means "passed the gates we have", no more.
Each report ships a confidence budget per gate: checked, not_checked, assumptions. Read it.
Origin
CADCLAW grew up alongside the M3-CRETE open-source concrete 3D printer. Development runs on its M3-2 assembly, about 100 authored parts, shaped the inventory, interference, adjacency, dimensional and publication-boundary checks. The repository's versioned tests, not this summary, are the evidence for what the software does. A passing run does not validate a physical machine.
M3-CRETE is CADCLAW's first project and a published case study, not the limit of its scope. The same workflow fits any hardware kept in a CAD repository: robot chassis, fixtures, optical mounts, 3D printers. Developed by Sunnyday Technologies.
AI assembly, scored in millimeters
MARB, the Mechanical Assembly Readiness Benchmark, measures how well an AI workflow assembles a real machine. In its founding task the AI gets about 100 authored STEP parts of the M3-CRETE printer and four goal renders, with no build steps, and places every part itself. MARB scores the result against an answer key: GAP for interface gaps, POS for part positions and ORIENT for rotations.
CADCLAW works behind the scenes. Its resolver built the answer key, and MARB's graders run CADCLAW's gates, so the code behind every score is open source. The AI under test can work in Autodesk Fusion, CadQuery or its own agent, and does not need CADCLAW. MARB is a separate project with its own versioned method and published scores.
Citation
If you use CADCLAW in published research or derivative work, please cite:
Sonnentag, N. (2026). CADCLAW: Automated validation framework for STEP-based CAD assemblies. Sunnyday Technologies. https://github.com/sunnyday-technologies/CADCLAW DOI: 10.5281/zenodo.19647390
10.5281/zenodo.19647390 is the Zenodo concept DOI (all versions). It always resolves to the latest deposited release. Cite a specific release only when you need to pin one, and label it as a version DOI when you do.
A CITATION.cff file is included for automated citation tooling.
Sunnyday Full Loop
Connected 3DCP Stack
This is a portfolio map, not a claim of automated integration, certification, a shared production dataset, or end-to-end validation. Each linked project states its own evidence and readiness boundaries.