CADFather: The Agent That Turns a Mesh Back Into Editable CAD

An autonomous agent that resurrects stale 3D shapes (meshes) back into editable design files. Instead of leaning on a single tool, it conducts several tools and candidates in concert, and it works with no additional training.
← 목록으로
온
온틀 리서치
2026년 10월 16일 31 min read views 2

Picture an old 3D sculpture. The data capturing its outer form survives, but the blueprint for "how it was carved" is gone. CADFather is an autonomous agent that brings that lost blueprint back.

The way it works is unusual. CADFather never picks up the chisel itself. Like a single director, it takes turns summoning specialist tools of different temperaments and conducts the work. It watches the intermediate results and decides which tool to call next and when to stop. That said, judging whether a result is usable and preserving the best one isn't the director's job — a separate scoring component handles it. It coordinates many tools and many candidates, but it keeps validity-checking and scoring walled off on their own.

What problem does it solve

A mesh (data that blankets an object's surface with tiny triangles, recording only its shape) tells you "what this object looks like" but not "how it was made."

A JPEG photo makes the comparison easy. All that's left is the finished image; the Photoshop layers that produced it are gone. With no layers, you can't edit the eyes, nose, or background separately. Even a tiny change means redrawing from scratch. A mesh is the same. Scan data with its design history erased, an aging legacy model — the outer shape is fine, but when you want to change one hole diameter or one wall thickness, there's no "layer" to reach for.

Restoring it into an editable CAD program (a design program where changing a numeric value changes the shape to match) means bringing those lost layers back. You expose the hole diameter or wall thickness as a single number, so changing just that value changes the shape along with it. For a restoration to be useful, it has to satisfy three things: it actually builds (runs), it's structurally consistent as a solid (a fully closed, watertight volume), and it can be edited later.

The catch is that no single tool can do this. Part shapes vary, and so do the restoration steps, so there's no one tool that works equally well in every situation. That's why you need a conductor to tell, moment by moment, whether the right move right now is "add one more operation," "just refine the dimensions," or "roll back to an earlier step." That's where CADFather starts.

How it works

The director role is played by a vision-language assistant (an AI that understands images and text together). It's shown the target shape and the restoration so far as images, and it decides — which candidate to grow, which tool to call, how many proposals to request, or whether it's time to stop.

The specialists the director commands come in three kinds. Let's take them one at a time.

1) Learning-based proposals. A pretrained operation generator (CADENA-RL) puts out several candidate "next operations" at once to append to the current program. This generator writes blueprints in a dedicated language (DSL) whose vocabulary and grammar are narrowed to fit CAD modeling — not a general-purpose language, but "a narrow language just for CAD work." Here, "several" doesn't mean stacking many operations into one candidate; it means offering a few different alternatives. It proposes plausible operations well, but it can drop an entire feature or get a dimension wrong. How many to take is up to the director, but only within the remaining budget.

2) Algorithm-based proposals (the CADFit family). With no learned model, it fits geometry directly to the target mesh's shape to produce an operation. If the starting point is empty, it looks only at the target and proposes a first operation — for a solid of revolution it spins a cross-section around an axis (revolve), otherwise it looks for an extrusion (extrude). If a candidate already exists, it compares against the target, fills missing parts with an extrude, and cuts away excess (cut). Because it's drawn straight from the shape it's sturdy, but it can't explain the whole thing on its own. This tool shines brightest when the generator's first operation keeps coming out as an "unclosed surface," leaving no floor to build further on. Extrude a cross-section once and at least you get a solid to stand on.

3) Parameter optimization. It leaves the operation structure alone and changes only the numbers. It nudges values like sketch coordinates, radii, and extrusion depths to find the point where the signed-distance error (a distance that accounts for inside versus outside) between the restoration's surface and the target mesh is smallest. Which direction to push a value to shrink the error is gauged by jiggling the value slightly and comparing the change (finite differences). It fits coarsely first, then finely near the surface. It polishes dimensions precisely when the framework is right, but it can't fix a framework that's wrong. When the conclusion is "best not to change anything," the original numbers may survive untouched.

The device that binds these three together is the candidate pool. Think of it as a storehouse that logs each intermediate output (candidate) of the restoration process one by one. When a candidate is developed, the existing record isn't overwritten — a child candidate is created anew. So the director isn't chained to the latest candidate; it can roll back to an earlier valid candidate or play a completely different opening move from an empty state. Rather than digging a single path, the structure keeps several branches alive at once. That said, the director doesn't see the whole pool — only the top few candidates, the best so far, and the starting point. The information it sees is kept narrow and constant.

Here's a scene. While restoring a single chain link, the best candidate has only one plate and one post, but the target has two of each. The director grows this candidate with a learning-based proposal and an algorithm-based proposal at the same time, and the learning-based proposal produces a new candidate with the second post attached. This is where it shows that a single decision is made while looking at the whole part, and that several candidates can be worked on at once in a single step.

There's one more thing worth noticing in this structure: what the director puts out is only a "proposal." A separate execution component actually runs the program to check that it's valid and scores it, and then the director looks at the images and decides whether to admit it into the pool. More importantly, this execution component keeps a "protected best" (the highest-scoring candidate produced so far) safeguarded independently of the director's moment-to-moment choices. Even if the director wanders off down a wrong branch, the final output isn't whatever candidate the director was last touching — it's this protected best.

Where prior work would read a shape and pull out an answer in one shot, or dig deep down a single path, CADFather sets itself apart by exploring several possibilities at once and choosing the tool that fits the target shape on its own.

How is usefulness measured

Before looking at performance results, one thing has to be flagged. The material this article draws on goes only as far as the method description; performance and cost figures — how many points it scored on a particular dataset — are outside that scope. So we won't assert here any number like "it won on such-and-such dataset." Instead, just how the evaluation was designed reveals a fair amount about this system's character.

Evaluation is carried out on six datasets (the full test sets of DeepCAD, Fusion360, and MCB, plus CADENA-Bench, CADBench, and BenchCAD). The axes measured are restoration quality, execution validity, and quality relative to compute cost.

Quality is viewed from two angles. One is IoU, which measures how much the volumes of two shapes overlap. The other is GMS, which measures how similarly each point on the surface is oriented — that is, how well the directions the surfaces face (their normals) agree. Both are mapped to 0–1, where higher is better. A candidate's final score is the average of the usable metrics — the average of IoU and GMS, or GMS alone for a target where IoU can't be used (IoU is computed only when the target is a single watertight solid).

The validity bar is fairly strict. If the program doesn't build, or the result isn't a watertight solid "as a whole," it's invalid. Exceeding the time limit is also invalid. This is tighter than CADENA, the comparison baseline: CADENA gives credit if even one piece of a fragmented result is closed, whereas CADFather requires the whole thing to be a single closed solid. The point is not to let a single fragment pass — a step closer to a "model you can actually use."

You have to get the size right too. Before scoring, the target and candidate are placed in the same coordinate system, but rather than scaling each candidate up or down to its own size, all of them use the same fixed transform. So a candidate that's the wrong size gets marked down, with no "let it off the hook thanks to normalization."

One trait has to be flagged here to be fair. The final output, the "protected best," is chosen by the score above (the IoU/GMS average). This is a way of generating several candidates and picking the single highest-scoring one (commonly called best-of-N). It's not cheating — the selection uses no information outside the ground truth (the target mesh). But the character of "we tried several times and picked the best of them," rather than "we pulled out the best in one shot," has to be read together with the cost those "several times" incurred. How many attempts you allow drives the quality. That's exactly why the evaluation analyzes quality relative to cost separately.

The most important interpretation point

And yet all these scores only measure how closely the shape resembles the target; they don't measure whether the restoration is good to edit. Whether the exposed numbers actually adjust meaningfully, and whether the combination of operations looks reasonable to a human eye, are different questions from the shape score. The thing that made this task worthwhile in the first place was "editability" — but the scoring doesn't look at that axis directly. So between "the score is high" and "it was restored in a usable way," there's still a gap the evaluation hasn't filled.

How far can it be applied

It assumes some parts can't be restored perfectly. There are two reasons the work ends. One is when every feature has been reproduced and only minute numeric differences remain ('shape'). The other is when some features are still wrong but the recent steps can no longer improve things and there's nothing else to try ('stalled'). Treating stalled as a normal termination rather than a failure is an honest design, but flipped around it also means acknowledging parts that structurally can't be touched.

The operations it can handle are limited. Parameter optimization, which polishes numbers, only supports extrude, hole, and revolve. Programs containing any other operation can't be polished. On top of that, the whole thing is bound to the dedicated language (DSL) of CADENA seen earlier, so any structure that can't be expressed in that language has a hard time becoming a candidate in the first place.

It leaves its floor performance to outside models. Doing no additional training is a strength, but at the same time it means the system's overall performance is bound to the limits of the pretrained models it borrows (the operation generator and the vision-language assistant). No matter how clever the conducting is, you don't get more than the specialists you can command are capable of.

What CADFather taught us

One principle runs through this design: separate the side that decides what to do from the side that validates and scores the results and preserves the best. When to stop is the director's call, but actually running the program, scoring it, and safeguarding the "protected best" is left to a separate component. So the final output isn't the candidate the director stopped on — it's the best the scoring singled out.

This principle isn't confined to 3D modeling. ONTLE, a tech media outlet, arrived at a similar lesson while building its own AI agents. After experiencing a "fake done" — where ONTLE's AI PM replied to a customer "it's finished" when in fact something had been left out — ONTLE shifted direction so that it's not the PM's word but the server that executes and the server that judges. It took the authority to judge away from the actor. Of course, CADFather's "score" is a geometric measure of how closely a shape resembles the target — a different kind of thing from ONTLE's "work complete" judgment. And in CADFather the decision to stop is still the director's, so it hasn't taken the "done" judgment itself away from the actor the way ONTLE did — there's a reported case where a feature was in fact missing but the director misjudged the difference as a trivial numeric error and stopped. Still, what carries over isn't a specific metric but the structure: not trusting the actor's declaration as the final answer, and keeping validity-checking, scoring, and best-preservation as separate things.

Distilling what a builder of autonomous agents can take further from this:

  • If you "tried several times and picked the best," disclose the cost too. Stating only quality while leaving out how many times you tried distorts the picture.
  • Don't narrow candidates to a single path; keep several branches alive. Leaving open the option to roll back or to play a different opening move entirely is how you escape when you get stuck — like the case trapped in an "unclosed surface."
  • Have the agent report being stuck as a normal termination, not a failure. That way the agent doesn't force a made-up "done."

FAQ

There's a score, so why does the director look at the images too?

The score compresses how closely the restoration resembles the target into a single number. Because of that, a structural omission like "a whole plate is missing" is hard to catch from the number alone. It's hard for a number to stand in for the way a person notices "hey, there's a post missing over there." So the director looks not only at the score but also at rendered images of the target and the candidate together.

Does it work on complex objects made of several parts, not just one?

This method describes restoration in units of a "target part." A single decision step is made while looking at the whole part, and termination likewise ends the whole part rather than a single branch. How it handles an entire multi-part assembly is outside the scope this article draws on, so we won't assert it.

Is the code public?

Yes. The repository is public — https://github.com/kulibinai/CADFather.

References