Blog · Lessons · 1 Oct 2026 · Last updated 3 Oct 2026 · 4 min read · By Stefano B.
How to check CAD files produced by an AI agent before they reach the shop
An AI agent reports success confidently, and its checks can agree with its mistakes. The signs that a measuring script is lying, why "0 errors" and "ALL OK" prove nothing, the verification rules we apply to every drawing, DXF and nest, and how each failure becomes a rule.
Short answer: a log, an exit code and a counter of things done are not proof. Read the values inside the produced file, with a method different from the one that wrote them, and look at an image that contains the defect you are judging. Distrust uniform results, constant defects and perfect zeros. The person who knows the job says "done", not the agent.
The rule
Never say a file is right without having looked at an image that contains the defect you are judging.
It was born when a check printed RESULT: ALL OK on a drawing a person rejected by opening it, in three seconds.
Signs that the measuring tool is lying
| Sign | What it means | Real case |
|---|---|---|
| The same defect, same value, on every file | A wrong filter, not a defect | "-23 mm outside the sheet" on all 20 drawings |
| Different variants give identical numbers | The tool does not see the variable | Bench runs that could not differ |
| A perfect zero | As suspect as 100% | "0 overflows" on 147 cells with the note outside |
| The worse the defect, the better the score | The tool merges what it should separate | Two coincident texts measured as one |
| Results older than the source | Stale files | Files from 40 minutes earlier measured as new |
What is not proof
- "Done", "OK", "0 errors" in a log.
- A count of files produced, or normal file sizes. 136 of 172 DXF files had an old code and looked normal.
- ezdxf's audit. A CAD program still reported missing blocks.
- An overlap counter going to zero. The drawing was worse.
What is proof
- A value read inside the file, compared with what should be there.
- Measured by a different method from the one that wrote it: raw text, another library, the geometry.
- An image of the zone being judged, from a renderer that can show that defect. See render a DXF to PNG.
- The rest of the file unchanged: counts of lines, texts, blocks, inserts before and after.
Break the checker on purpose
Before trusting a check, break the file on purpose and see if the check notices. If it does not, it would not have noticed the real defect either.
Use a verifier that did not write the solution
Whoever wrote the solution tends to pick the measure that proves them right. We hand checks to a separate agent that starts with an empty context: it receives the file and the requirement, not the explanation of what was done.
Turning a failure into a rule
A lesson written as a story gets read and ignored the next time. What works for us:
- "If X happens, do Y", with the command that does Y written inside the rule. A rule without a command is a reminder.
- Closed roads: a list of approaches already tried and proven not to work, with the result. It stops the same dead end being tried twice.
- Numbers go in code. A tolerance, a gap or a text height belongs as a constant in the script that uses it, not in prose.
- Checks go in the producer. A guard that covers only one way of writing a file is skipped by the others. Put it where every write passes.
Example: the dimension style bug in merged DXF drawings came back once after it was fixed, because the lesson was written as a story. It is now a rule that starts with a question: "where were these dimensions made?"
Who says "done"
On drawings, booklets and nests, "done" is said by the person who will use them. The agent says what it measured and shows the image.
Do and don't
Do
- Read inside the file. Compare with expected values.
- Check with a different method than the writer.
- Look at the image.
- Refuse to measure files older than their source.
Don't
- Don't accept logs as proof.
- Don't trust uniform or perfect results.
- Don't let the code that produced a file be its only judge.
Questions people ask
Does this make the AI slower? A little. It is what makes it usable: an agent that checks this way finds its own errors before a shop does.
Which mistakes did these rules come from? From our own jobs. Two examples: the dimension style collision in merged DXF files and the Inventor API errors that fail silently.