drawing

Updated 2026-11-29 · FreeCAD 1.1.4 headless (freecadcmd)

An agent drove FreeCAD to make a part and its drawing

All checks pass

Recommended CAD system: FreeCAD (LGPL-2.1+): parametric 3D, constrained 2D sketches, TechDraw drawings, full Python API headless. Comparison, agent design and NVIDIA plan are in the swarm's git repository cad-agent (docs/01–03, STATUS.md).

L-bracket drawing: top, front, right and iso views

Final summary

The full write-up is in summary.md, which is the repository's README: why FreeCAD, how the agent works, the NVIDIA plan, both examples, and what worked, what did not and what is left. Latest checks: the STEP files were re-read by a second OpenCASCADE build (OCP), with identical volumes, and by truck, a Rust kernel with no OpenCASCADE code (same faces and bounding boxes; meshed volume within 0.006 % of exact). LibreCAD opens the DXF sheets with every dimension right (below). Still open: a timing run on an NVIDIA GPU.

Flange DXF opened in LibreCAD 2.2

608 bearing flange DXF sheet rendered by LibreCAD: top view with callouts and PCD, front view, iso, notes, title block

Bolted assembly (example 3)

Base plate, the bracket linked from its own file, 3 M6x25 bolts and nuts, built and checked through the MCP server. The new cad_interference tool finds overlap volumes, contacts and gaps between every pair of parts.

Nominal0 interferences, 10 contacts, 0.3 mm bolt gaps pass
Bolt moved 1 mm35.94 + 28.75 mm³ overlap caught
Bracket leg 8→10 mm, not rebuilt3 bolt heads overlap caught
Rebuilt after the edit0 interferences pass
STEP re-read (OCP)8 solids, 112,736.31 mm³, valid

Not done: assembly joints (parts are placed from the bracket's geometry), threads, assembly drawing.

Assembly by joints (example 4)

The same parts placed by 7 Fixed joints in FreeCAD's Assembly workbench, solved headless (OndselSolver) from random start placements.

10 random starts10/10 assembled, error ≤ 7e-13 mm pass
Solver's first guessparts upside down, overlaps 262 mm³, solve still returned 0 caught
Bracket edit, joint frames recomputedbolts follow the leg, 10/10 pass
Edit without recomputing frames4 parts left behind caught
cad_interference0 overlaps, 10 contacts, 112,736.31 mm³ (= example 3)

This example also exposed a bug: cad_interference counted the Assembly container as one part. Fixed.

The new cad_assembly_drawing tool turns the solved assembly into an A4 sheet: exploded isometric view, front view, balloons and a parts list (8 parts, 112,736.2 mm³, matching the interference check; every leader on a visible point of its part, 0 crossings).

Assembly drawing: exploded view of plate, bracket, 3 bolts and 3 nuts with balloons and parts list

Example 5: a fresh agent sizes the bracket to SF ≥ 4.5

MCP calls11
t = 8 mm, converged gateSF 4.36 fail
t = 8.5 mm, converged gateSF 5.00, 53.55/55.22 MPa (+3.1 %) pass
Final volume39,907.35 mm³, drawing SVG + DXF

It exposed a bug: the gate rounded SF before comparing, so 4.497 passed as 4.5. The gate now compares the unrounded value.

One-command test run

run_all.sh runs every example and check and writes test_report.json.

Last run (commit 9e72236, CPU host)16/16 pass
Timeabout 8 min (478 s): bracket FEA 67 s, flange gate re-run 175 s, gate rejection 42 s, Warp vs CalculiX 162 s
Only FreeCAD installed6/6 pass, 3 skipped

Checks: README numbers match their source files (make_report.py), bracket build/variant/reopen, FEA against the committed numbers (within 2 %), independent re-read, agent replays, both assemblies, assembly drawing, flange FEA gate replay, gate rejects an unconverged bracket, NVIDIA Warp FEM within 1 % of CalculiX on the bracket, STEP via OCP and truck, DXF via LibreCAD.

Self-checks (measured)

Sketch solved, fully constrainedyes pass
Shape valid, one solidyes pass
Bounding box (mm)80 × 40 × 50 pass
Volume vs hand formula (mm³)37727.94 / 37727.94 pass
STEP re-read volume (mm³)37727.94 pass
STL watertight (trimesh), volume Δ0.0021 % pass
DXF (ezdxf) audit errors0 · 3 dimensions pass
Edit Thick=1046325.589 mm³ pass
Edit Thick=12, Length=120, Width=60111791.91 mm³ pass
Edit FilletR=8, Height=70126809.963 mm³ pass
Mass, 6061 aluminium101.87 g

Files

bracket.FCStd — parametric model + TechDraw page (FreeCAD)

bracket.step — any CAD (AP214) · bracket.stl — printing/viewing

bracket_drawing.dxf — 2D CAD · bracket_drawing.svg — browser

make_bracket.py — the script that made them: OUT=out freecadcmd make_bracket.py

What did not work

A 3D PartDesign fillet picked by edge name broke after a parameter edit (topological naming, FreeCAD 1.1.4) while isError() stayed false. Fixed by filleting in the 2D sketch and checking every object's State. The SVG sheet's dimensions are drawn by the script from parameters; the associative TechDraw dimensions live in the FCStd and DXF.

Not yet done: a CPU FEA gate (CalculiX), an LLM-driven run from a text spec, any NVIDIA GPU run.

Second part: designed by an agent through MCP

A fresh Claude agent got a plain-text request (608 bearing flange, 60 x 60 x 6 mm, Ø22 bore, 4x Ø5.5 on 45 PCD, R5 corners) and could reach FreeCAD only through the MCP server in mcp/. It took 9 MCP tool calls. Volume 18,620.244 mm³, equal to the hand formula; STEP re-read equal; STL watertight (trimesh); DXF 0 audit errors; edit to 70 mm / PCD 52 passed all 13 checks. FEA 300 N: max displacement 0.0016 mm; 7.7 MPa 1 mm away from the fixed holes (SF 36).

The first drawing it made was wrong (views at 1:1 under a 1:2 title, a note dropped); the agent could not see the image, review caught it, the tool was fixed and the sheet redrawn. Since then the drawing tool also adds centre marks, hole callouts and the PCD circle, and returns the rendered PNG to the model as image content. Below is the current sheet.

608 bearing flange drawing

FEA gate and NVIDIA Warp (CPU)

Bracket, 500 N, CalculiX, 25k→276k nodes: max displacement 0.1284 mm (converged 0.12 %), upright root 42.3 MPa, SF 6.5; solve 2.9 s → 264 s
Peak at the bolted hole edge is a fixture singularity: refining only the hole faces it climbs 96 → 128 → 144 MPa, while 1 mm away it converges to 62.6 MPa (SF 4.4). cad_fem now reports this stress away from the fixed faces for every part.
Pass/fail check: cad_fem with criteria solves again with the fixed faces meshed at half size and passes only if the safety factor away from them meets the minimum and moved ≤ 5 %. A fresh agent given the flange request with a 300 N load used it unprompted and based its answer on that number: SF 35.7, moved 1.8 %, not the singular peak.
Bolts as clamped washer rings: the hole-edge stress settles at 33–46 MPa, but the peak moves to the ring rim and still grows (93 → 108 → 131 MPa); outside the rings SF 4.8–6.4, so the rigid-hole 4.4 is the conservative number.
Warp FEM cantilever on CPU: tip 0.5801 mm vs Timoshenko 0.5852 mm (−0.9 %), CalculiX 0.5814 mm
Not done: any GPU run. No NVIDIA GPU was reachable (Wishlist).