Research & Innovation

Turning a Point Cloud Into Actual CAD, Not Just a Mesh

PrimitiveCAD reconstructs editable CAD operations from scanned points, using primitive-aware tokenisation and reinforcement learning rewarded on feature-line alignment.

There are two things you might want from scanning a physical object, and the usual pipeline only gives you one.

A mesh is what you get. It is faithful, it renders, and it is inert — a few hundred thousand triangles approximating a surface, with no notion that this face is a flat plane, that hole is a cylinder, or that fillet has a radius. You can look at it. You cannot change it.

A CAD model is what you want. Sketches, extrusions, revolutions, fillets, booleans — a program that produces the geometry. Change the radius and everything downstream updates.

PrimitiveCAD: An LLM-Based Point-to-CAD Reconstruction with Primitive-Aware Tokenization and Operation Alignment, by Gao, Bi, Xu, Xu and Xu, recovers the second from a point cloud.

The three pieces

Primitive-aware tokenisation, which learns more robust geometric representations from CAD point clouds through a specialised tokenisation model — focusing specifically on CAD-related primitives rather than treating the point cloud generically.

Operation alignment losses alongside supervised fine-tuning.

Reinforcement learning with feature-line alignment rewards, to minimise inconsistencies while preserving fine-grained detail.

Reported improvements in three areas: geometric precision, preservation of critical geometric features, and code validity.

Why “code validity” is on that list

That third one tells you what kind of problem this is.

The output is a program. Programs can be syntactically invalid — an extrusion referencing a sketch that does not exist, a fillet on an edge that was already removed, a boolean against a body that has not been created. A language model generating CAD operations can produce something that reads plausibly and does not execute.

So this is a program synthesis problem wearing a geometry costume, and it has program synthesis’s characteristic failure mode: fluent, confident, non-compiling output. Listing code validity as a measured improvement means they are tracking it, which is the right thing to track.

Why feature-line alignment is the clever reward

Reinforcement learning needs a reward, and the obvious one is wrong.

The intuitive reward for reconstruction is surface distance — Chamfer distance or similar between the generated geometry and the input points. It is easy to compute and it is a bad objective here, because it is dominated by the large flat areas. A model can score well on average surface error while getting every edge, corner and hole slightly wrong, since those contain a tiny fraction of the surface area.

And edges are where the information is. A manufactured object’s identity is in its feature lines — the sharp creases where faces meet, the circular edges of holes, the tangent lines of fillets. Those are exactly what a CAD program encodes, and exactly what surface-average metrics ignore.

Rewarding feature-line alignment points the optimisation at the part that matters. It is the same correction we have seen twice this fortnight in other domains: the lampshade optimiser’s rendering-aware constraints spending capacity where it is visible rather than where the parameters are, and GALA’s rendering-aware PCA doing the same for avatars. Optimise in the space the result is judged in, not the space the data happens to live in.

What it is for

Reverse engineering a physical part is the industrial case: scan a component with no drawings and get an editable model you can modify or re-manufacture. This is a large and genuinely difficult commercial problem and it is currently done by hand by skilled people.

For the work this publication covers:

Scan-to-fabricate. Scan an object, get CAD, change a dimension, print or mill it. The current route — scan, mesh, sculpt, hope — loses all the precision that made it worth scanning.

Making a scanned thing parametric. A found object becomes a family of objects. That is a genuinely different creative proposition from a one-off replica.

And fitting to something that exists. Enclosures, mounts, brackets and adapters for objects you cannot get drawings for — which is most of the hardware anyone builds installations around.

The caveat for this class of work is consistent and worth repeating: these systems are trained on mechanical CAD — the world of prismatic shapes, planes, cylinders and fillets. They will do well on a bracket and badly on anything organic, because an organic form has no underlying primitive decomposition to recover. Scan a sculpture and you want retopology, not CAD reconstruction.