Skip to content
Boris Truyens

From drawing to machine

A pipeline that reads a 2D workshop drawing, builds a real 3D model from it, and then checks on its own whether the machine will cut it right.

Left, a training drawing from my course; right, the model the pipeline built from it (name in the title block removed).
Left, a training drawing from my course; right, the model the pipeline built from it (name in the title block removed).

At school you get a drawing on A4. A contour, a few pockets, a hole pattern, dimensions in millimetres. Then the real work starts: turning the drawing in your head into a 3D shape, the shape into operations, the operations into Klartext. Every step is a translation, and every translation can lose something.

I wanted to know how much of that translation a machine can take over, without me having to believe what it says.

Three roles, three kinds of trust

The idea that carries everything: let the AI read, but never build.

  1. Read. A language model with vision (DeepSeek) looks at the PDF and writes a PartSpec: a structured list of features. Raw block 120 × 120 × 15. Contour with R20 and R15. Chamfer 0.3 × 45°. Every feature gets a confidence score. When the model is unsure, the interface asks a human.
  2. Build. From that list, plain, predictable code (build123d on the OpenCascade kernel) builds a real B-Rep solid and writes a STEP file. No guessing: the same spec always gives the same model. A geometry gate checks the result to ±0.01 mm and may heal itself at most three times.
  3. Check. And then the most important part: an independent check that believes nothing.

The part that taught me the most

Later a CAM step was added. A Fusion 360 add-in creates the toolpaths and posts them for Heidenhain. Everything looked fine. Green ticks, an NC file, operations with the right names.

So I wrote a check that actually runs the NC program on a height map of the workpiece and compares the result with the STEP model. It found faults that no tick showed:

  • A closed contour on the floor of a pocket was machined on the wrong side: around the outside of the pocket, or straight through an island.
  • The post-processor silently skipped invalid toolpaths. The program was shorter than the plan, with no error.
  • With cutter compensation set to “wear”, the post wrote the centre path with RL. The TNC then adds the radius again. One word of configuration, one cutter radius too deep.
  • Drilling “from hole top” started below the countersink, which would have made it 0.2 mm too deep.

Each of these produced a result that looked believable. That is the real lesson: a plausible result is not the same as a correct result. Everyone in a workshop knows this. You measure the part, not the drawing’s promise.

What it does now

Drawings as PDF, layered DXF, existing STEP files, or a pencil sketch on an A4 template with four ArUco markers that you photograph with your phone. Out come a STEP file with coloured faces for CAM (threads, tight fits, fine finishes), a drawing to EN ISO, a setup sheet and a QR code to a shop-floor view on your phone.

Under the hood run almost four hundred automated tests. The interface is in Dutch, because it is meant for people at the machine.

Where it is going

The goal is deliberately modest: first the school exercises have to come out as flawless, machine-ready programs. Contour milling, pocket milling, polar coordinates, datum shifts, drilling cycles. Only when that is watertight may the AI start on more complex parts.

That is not a lack of ambition. It is how trust is built in a workshop: first the trial piece, then the series.

Where this leads

This project shares threads with others. Follow one.