Chapter 3 of 3 · Measured CAD

The measured model

The third attempt kept the recovered cameras and scale from chapter 2, but this time the design was done by Claude, Anthropic's AI model, working as a coding agent on the same computer. Claude wrote the alternator as a CAD program, the way an engineer builds a part in a CAD package: turned housings, a grooved pulley, round mounting pillars, 48 cooling fins, and vent windows traced from the photos and cut through the castings. Every change was scored against all three photos and kept only if the score improved.

187 × 131 × 182 mmoverall size
3.56 mm = 18 pxscale, from the belt-groove pitch
96.2 %outline match, average
2.43 mmaverage depth error
Drag to orbit · right-drag to pan · scroll or pinch to zoom

Each photo next to the model

Each photo beside the model rendered from the same camera position
Left: the photo. Right: the model from the exact position that photo was taken from. The photos were shot from about 18° above, with real perspective.

How it was built

  1. Recover the camerasVGGT, Meta's 3-D vision model, worked out where each photo was taken from and produced a rough point cloud, as in chapter 2.
  2. Find the scale without measuringThe 6-rib pulley's grooves are 3.56 mm apart. Claude measured that spacing in the side photo (18 pixels), which sets the size of everything else.
  3. Design it as real CADClaude wrote a Python program in which every part is a proper solid with named dimensions. The solids are built and combined by manifold3d, an open-source solid-modelling library, the same way a CAD package builds a part.
  4. Score every change against the photosA scoring program, also written by Claude, draws the model from all three recovered cameras and compares it with each photo on outline, edges and surface depth. A change stays only if the whole model scores better.

Who and what did the work

ToolWhat it isWhat it did here
Claude (Anthropic), in Claude CodeAn AI model working as a coding agent on this computer: it reads images, writes and runs programsStudied the photos, decided what to measure, wrote and revised the CAD program and the scoring program, and ran every measurement
VGGT-1B (Meta)A 3-D vision model, run locallyRecovered the three camera positions and a point cloud of the visible surfaces
manifold3dOpen-source solid-modelling libraryBuilt the solids and cut the openings
OpenCV, NumPy, SciPyOpen-source image-processing and maths librariesFound the edges in the photos for scoring, and fine-tuned dimensions to fit the photos
three.jsBrowser 3-D libraryDraws the rotatable model on this page
The project's ownerThe human behind the projectTook the photos, reviewed each version, and spotted three flaws the scores had missed

Getting from first draft to this

Claude's first versions (v1 to v4) used cameras it solved itself from landmark points (bolt heads, the shaft centre, the tops of the mounting holes) that it located in each photo by pixel position. They had the right parts in roughly the right places, but they were judged mostly on outline, and outline hides a lot. At v5 the model moved onto the VGGT cameras. Then the project's owner compared the model with the photos and pointed out three things Claude had missed: the mounting pillars were square instead of round, the B+ battery terminal on the back was the wrong shape, and the front face was a flat plate where the side photo shows it stepped. Claude measured and fixed each one, and one fix corrected an earlier "fix" of its own: shortening the terminal scored worse, because its length had been right and its shape wrong.

VersionWhat changedOutline matchEdges matchedDepth error
v5Claude's CAD moved onto the VGGT cameras94.5 %52 %4.90 mm
v6Scorer in charge: depth and edges, not just outline94.4 %53 %3.17 mm
v8Round pillars, full-length fins, refitted B+ terminal95.1 %55 %2.79 mm
v10Stepped front face, vent windows, fitted pulley96.1 %61 %2.43 mm

Averages over the three photos. The outline barely moved after v5; the depth error halved and the share of real edges reproduced kept climbing. Changes that scored worse, such as full-width front plates or deeper fins, were thrown out.

How close it is, photo by photo

PhotoOutline matchEdges matchedEdge precisionDepth error
Front96.8 %73.7 %79.7 %2.15 mm
Side95.6 %56.4 %59.5 %2.67 mm
Back96.1 %53.7 %63.4 %2.46 mm

The gaps that remain are mostly fine casting detail: small ribs, bosses and what's inside the vents.

From angles no photo shows

The model from front three-quarter, rear three-quarter, top and the unphotographed side
Front three-quarter, rear three-quarter, top, and the side no photo covered. Surfaces the photos never saw are reasonable fill-ins, not measurements.
What this taught

Design like an engineer, check like an inspector.

Neither guessing nor generic shapes got there. Real construction plus a measured check of every change against every photo did. The next step is to teach the automatic pipeline from chapter 2 to design this way for any part.

What to keep in mind

Measured where it was seen

Everything visible in at least one photo is measured from it. The top, the bottom and the unphotographed side are reasonable fill-ins.

Materials are generic

Cast aluminium, black-coated steel, brass, copper and plastic are standard material settings, not colours taken from the photos.

Designed step by step, this time

Claude made each design decision in turn and checked it with the measuring tools; this was not a one-click pipeline. Making the design step run on its own for any part is the open problem.

Scorecard

All three models, scored by the same program against the same three photos. Each figure is the average of the front, side and back photo.

ModelOutline matchEdges matchedEdge precisionDepth errorTriangles
1 · Melted94.2 %58 %60 %3.45 mm140,000
2 · Simple shapes93.9 %16 %52 %2.49 mm5,180
3 · Measured96.2 %61 %68 %2.43 mm61,888