The testing framework
CAD never had.

Automated validation, interference detection, and structural analysis for STEP assemblies. Like pytest for mechanical design.

Open source · MIT · Python 3.10+ · No commercial CAD software required

CADCLAW
53interferences caught
70 → 13 MBSTEP size reduction
150+validated design changes
8automated gates

CAD assemblies break silently.

Parts clip into each other. BOMs drift from geometry. A motor mount ends up 600 mm from the motor. Engineers catch these by eye — if they catch them at all. There is no pytest for CAD.

CADCLAW validates STEP assemblies through a chain of automated gates. The harness passes only if every gate passes.

Inventory

Missing or extra parts. Labels by bounding-box signature, counts against expected.

Interference

Solid-solid overlaps via BRep boolean intersection — not just bbox.

Adjacency

Parts that should be near each other but aren't. Catches the motor 600 mm from its mount.

Dimensional

Wrong thickness, swapped box() args, impossible dimensions.

Kinematics

Beam deflection, motor torque budgets, belt tension, racking.

Tolerance

Worst-case, RSS, Monte Carlo stacking with Cpk and variance decomposition.

Disassembly

Sequenced part removal, radial exploded views, animation frame export.

Render

STEP → PNG → animated GIF via offscreen VTK. Closes the loop to shareable visuals.

MCP Server included. Every module is also exposed as an MCP tool — drive the harness from Claude, ChatGPT, Gemini, Cursor, or any MCP-compatible client. No code generation required.

How it works

Every solid in a STEP file has a bounding box. The sorted dimensions (dx, dy, dz) rounded to 0.1 mm form a signature — a fingerprint that identifies part types without needing part names or metadata.

(40.0, 80.0, 1000.0)"beam"     # 4080 C-beam extrusion
(56.4, 56.4, 76.6)"motor"    # NEMA23 stepper
(4.0, 80.0, 96.0)"mount"    # motor mount plate

This works because mechanical parts have characteristic dimensions. A NEMA23 is always 56.4 mm square. A 4080 extrusion is always 40×80 mm. CADCLAW exploits this invariant to label, count, and validate without parsing STEP metadata.

Sample output

The render gate closes the loop from STEP validation to shareable visuals. One function call produces a radial explode, 360° orbit, and animated GIF — the same tool you run in CI.

99-part STEP assembly exploding radially and rotating 360 degrees

99-part M3-CRETE assembly · render_radial_explode_gif("assembly.step", "out.gif") · zero manual animation

Quick start

# install
pip install cadquery
pip install CADCLAW
from cadharness.harness import Harness
from cadharness.adjacency import AdjacencyRule

h = Harness("my_assembly.step")

h.add_inventory(
    labels={(40.0, 80.0, 1000.0): 'beam', (56.4, 56.4, 76.6): 'motor'},
    expected={'beam': 4, 'motor': 2, 'belt': 3}
)

h.add_interference(skip_labels={'belt', 'wheel'})

h.add_adjacency(rules=[
    AdjacencyRule('motor', 'bracket', max_distance=50)
])

report = h.run()
print(report)
# CAD HARNESS REPORT — PASSED
#   Parts: 42
#   Time:  3200ms
#
#   [PASS] inventory (120ms)
#   [PASS] interference (2800ms)
#   [PASS] adjacency (15ms)

CI/CD in any system

# .github/workflows/cad-check.yml
- name: Validate assembly
  run: |
    pip install cadquery CADCLAW
    python check.py assembly.step

Exit code 0 = passed. Exit code 1 = failed.

Who it's for

Open-source hardware projects

Catch assembly errors before builders hit them.

CadQuery / FreeCAD users

The testing layer the open CAD ecosystem is missing.

Small manufacturing teams

Automated QA between design and procurement.

AI-assisted CAD workflows

Validate that AI-generated changes don't break the assembly.

Origin

CADCLAW was developed alongside the M3-CRETE open-source concrete 3D printer — built out of a practical need to properly position and validate components during assembly of a large, part-dense machine. Across that project the harness:

Snapshot from CADCLAW's first production deployment on M3-CRETE, Q1 2026. Developed by Sunnyday Technologies with AI-assisted engineering (Claude, Anthropic).

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.19647391

A CITATION.cff file is included for automated citation tooling.

DOI 10.5281/zenodo.19647391