CADFit: Precise Mesh-to-CAD Program Generation with Hybrid Optimization

New
License: CC BY-NC 4.0 (non-commercial; academic and research use only, commercial use requires author permission) · Updated 2026-11-16
Evidence: Primary sourceVerified: 2026-11-165 sourcesView evidenceHide evidence
Scope and limits

Verification covers the CADFit paper identity and author affiliations, the official code repository and licence terms, the project page, the related CADStudio repository, and the origin of the Invalid Ratio = 0 statement in the README. The ICML 2026 venue is confirmed by the official repository description and repository metadata; the poster number 61824 quoted in the article was not independently confirmed in the official README or repository metadata. Benchmark figures and speed-up factors are author-reported and were not reproduced here. This change only corrects the arXiv identifiers and titles in the references and adds structured sources; the factual cut-off of the article remains 12 November 2026.

#SourceTypePublished / Accessed
1CADFit: Precise Mesh-to-CAD Program Generation with Hybrid OptimizationarXiv 2605.01171Paper2026-05-02 / 2026-11-16
2CADFit official code repository and READMEGitHubRepository2026-04-29 / 2026-11-16
3CADFit repository LICENSE (CC BY-NC 4.0)GitHubRepositoryNot stated / 2026-11-16
4CADFit project pageMIT DeCoDE LabOfficialNot stated / 2026-11-16
5CADStudio companion repositoryGitHubRepository2026-06-17 / 2026-11-16

The verification date covers only what was checked in that pass; it does not mean every figure on this page was independently verified.

My rating

1. Overview

CADFit is the official code release for the ICML 2026 paper "CADFit: Precise Mesh-to-CAD Program Generation with Hybrid Optimization" by Nehme (MIT DeCoDE Lab), Whalen (Siemens Digital Industries Software), and Ahmed (MIT). It recovers editable, parametric CAD construction sequences from watertight meshes by incremental fitting and validation. Unlike one-shot forward predictors that guess an entire CAD program in a single pass, CADFit formulates reconstruction as an explicit IoU-driven optimization over executable CadQuery programs. It supports a rich operator set - extrude, revolve, fillet, chamfer, Boolean union and cut - and composes them through iterative residual refinement: positive and negative residuals are built and merged until the residual volume falls below tolerance. Every candidate is kernel-validated through CadQuery, and on benchmark slices the invalid ratio is reported as zero. For a CAE engineer this closes the loop from a simulation artifact (STL, point cloud) back to an editable, parametric CAD program, which is exactly the hand-off needed before re-meshing and re-simulating. After reading you should be able to judge whether, when your input is a mesh or scan and your deliverable must be an editable feature tree rather than another mesh, an optimization-based route like CADFit is worth the compute.

2. How It Works

CADFit reconstructs geometry as a CAD program the way a patient engineer would: one operation at a time. It begins by slicing the 3D shape to extract flat cross-sections, the kind of 2D profile an engineer would sketch as the start of each operation; this yields hundreds of candidate sketches, most of them useless. A lightweight learned prior scores each candidate by how likely it is to appear in the final design, keeping only the promising ones, which the authors report makes the process roughly three times faster, though this scoring model is not required for correctness. Each surviving candidate is then tested against the target shape using a real CAD kernel (CadQuery): the system keeps only what improves the volumetric fit and repeats on whatever geometry is still missing. The optimization objective is the same IoU it reports, which keeps the objective honest. Operations are assembled from extrude, revolve, fillet, chamfer, union, and cut, and residual geometry is fitted in successive rounds. Because validation runs through a genuine kernel, every emitted program is guaranteed to be a valid, runnable CadQuery script, never a plausible-but-crashing guess; it also means the output is not merely a prettier mesh but a feature tree a human can keep editing.

3. Scope and Assumptions

CADFit assumes your input is a watertight mesh (such as an STL export), a point cloud, or an image-to-3D reconstruction, and that the target part can be expressed as a sequence of the supported CadQuery operations (extrude, revolve, fillet, chamfer, Boolean). It is modality-agnostic: changing the mesh source requires no retraining, because it optimizes a geometry-to-program mapping rather than memorizing specific samples. Its strength is recovering editable parametric programs, not merely a cleaner mesh, so it is most valuable when the deliverable is a feature tree a human will keep editing; for someone who only wants a clean mesh it is a detour. It is not a universal reconstructor: shapes built from lofts or sweeps, or from free-form surfaces that resist a sketch-extrude-revolve decomposition, are explicitly called out by the authors as where the math struggles, and need manual completion or a surface route. Training-data dependence is minimal - the optimization runs directly on the geometry rather than on a large proprietary dataset - which is a deliberate design choice for engineering settings where data, precision, and confidentiality matter. Practical limits remain: research benchmarks are not full industrial castings with drafts and ribs, so results on real manufactured parts need validation. Treat CADFit as a reverse-engineering assistant that returns a starting CAD program, not a finished certified model.

4. Getting Started

The fastest entry is the repository's reconstruction pipeline and example scripts: clone ghadinehme/CADFit, install the CadQuery and deep-learning dependencies, and run the documented pipeline on a sample watertight mesh to see a recovered CadQuery program and its STEP or BREP output. A first experiment should start from a simple prismatic part you can also model by hand, then compare the recovered program's feature tree against your own, because the meaningful test is editability, not just visual match; looking similar does not mean the feature tree is pleasant to modify. Record the mesh source, the tolerances, the IoU threshold, and the operation set used, and open the result in a CAD tool to confirm you can change a dimension and re-roll the downstream features, which is the key step in judging whether the output is engineering-usable. The most common beginner mistake is feeding a non-watertight or self-intersecting mesh and then blaming the optimizer for poor fits; pre-processing the mesh (repair, orient, close holes) is a prerequisite the authors do not hide, and skipping it almost always fails. Because the lightweight scoring model is optional, you can first run the kernel-only optimization path to learn the loop before adding the learned prior. The companion CADStudio interface lets you import the generated code and continue editing through a familiar feature tree.

5. Comparison with Alternatives

Against one-shot mesh-to-CAD generators that predict an entire program in a forward pass, CADFit trades speed for validity and editability: it may be slower, but every output is kernel-validated and the feature tree is buildable, whereas forward generators often emit programs with low validity. Against DeepCAD, which learns to generate CAD command sequences from data, the contrast is instructive: DeepCAD needs a command-sequence input and produces novel designs, whereas CADFit starts from a concrete mesh and recovers the specific program that produced it, so the two solve opposite halves of the reverse-engineering problem and complement each other. Against commercial tools such as Backflip AI, Autodesk Fusion's AutoTimeline, and SOLIDWORKS mesh-to-parametric efforts, CADFit is open-source and optimization-based, with no requirement to send designs to a cloud or train on proprietary corpora, which is friendlier to confidentiality; the trade-off is that it lacks the plug-ins and enterprise support those products ship, and integrating it into a production line still takes in-house work. Against geometry-reconstruction baselines (point-cloud or occupancy generators), CADFit's output is a parametric program rather than a static mesh, which is what makes it usable inside an existing engineering workflow. The selection crux is validity and editability versus raw generation speed.

6. Benchmarks and Evidence

CADFit's public evidence is the paper and its benchmark results across multiple CAD datasets. The authors report that it outperforms prior state-of-the-art mesh-to-CAD methods in volumetric Intersection-over-Union and Chamfer Distance, while substantially reducing the Invalid Ratio of reconstructed CAD programs, especially on complex designs, and that on benchmark slices the invalid ratio reaches zero. They further show an end-to-end image-to-CAD pipeline by pairing the method with an image-to-3D model, achieving state-of-the-art on both image and mesh inputs. These are project-authored results on the paper's own train-test splits, not independent blind validations, and the authors themselves note that research benchmarks are not real industrial castings with drafts and ribs, so the numbers should be re-measured on your parts rather than extrapolated from "benchmark best" to production. The most defensible evidence is the kernel-validation property: because every candidate is checked by a real CAD kernel, the "invalid ratio" claim is structural rather than statistical, which is a meaningful difference from methods that occasionally crash and is the reason it can be trusted in engineering. Any precision figure in a proposal should come from your local rerun with fixed tolerances and the same IoU threshold, not from a README example. Downstream validation references on this site show how CAD geometry enters simulation.

7. Role in Physics-AI Workflows

In a physics-AI workflow CADFit sits at the reverse-engineering seam between simulation artifacts and editable design. Its most direct value is closing the loop from a CAE result back to CAD: after a simulation produces or consumes an STL - a scanned legacy part, a supplier mesh, or an AI-generated shape - CADFit returns a parametric CadQuery program a human can edit, dimension, and re-mesh for the next simulation round. This is exactly the hand-off a CAE engineer needs before re-meshing and re-simulating, and it feeds design automation into physics-AI pipelines, so that "scan-to-design" is no longer stuck at a demo. Combined with image-to-3D, it also turns a single photograph into an editable CAD starting point, broadening where design exploration can begin and proving especially useful for legacy parts that lack native CAD. The authors emphasize that the optimization runs on the geometry itself, with no proprietary training data and no cloud round-trip, which matters for engineering companies where design confidentiality and precision are non-negotiable and where sending drawings out of the intranet is a compliance risk. A realistic placement is as the reconstruct-then-edit front end to solvers such as OpenFOAM or physics-AI frameworks, not as a replacement for classical CAD or for certified geometry.

8. Limitations and Failure Modes

CADFit has several clear limits. First, input quality: a non-watertight, self-intersecting, or poorly oriented mesh yields poor fits, and mesh repair is a prerequisite the pipeline does not absolve you of; skipping it almost always fails. Second, operator coverage: the authors explicitly state that loft-based or sweep-based complex shapes are where the math struggles, because the method is built around sketch-extrude-revolve plus Boolean and does not cover arbitrary surface modeling, so free-form shapes need manual completion or a different route. Third, benchmark-vs-reality gap: research datasets are cleaner and simpler than production castings with drafts, ribs, and fillets, so out-of-distribution parts need extra validation and may need manual completion of missing features. Fourth, runtime: kernel validation inside an iterative loop is compute-heavy compared with a single forward pass, so very large or highly detailed meshes cost real time, and batch processing needs a cost estimate. Fifth, license and IP: the code is CC BY-NC 4.0 (non-commercial), a provisional patent has been filed, and the method was funded by Altair (now part of Siemens), so any commercial use requires author permission - treating it as freely usable in a product would be a serious compliance error and must go through an authorization step before adoption. The most overlooked failure is assuming "recovered a program" equals "recovered the right design intent," when in fact the program may be geometrically close yet parametrically awkward to manufacture.

9. Version and Source Notes

Record 1: CADFit was developed in MIT's Design Computation and Digital Engineering (DeCoDE) Lab by Ghadi Nehme, with co-authors Eamon Whalen of Siemens Digital Industries Software and Faez Ahmed of MIT; the paper "CADFit: Precise Mesh-to-CAD Program Generation with Hybrid Optimization" was posted to arXiv on 2 May 2026 (arXiv 2605.01171) and presented at ICML 2026 in Seoul (poster 61824). Record 2: the method formulates reconstruction as IoU-driven optimization over executable CadQuery programs, supports extrude, revolve, fillet, chamfer, union, and cut, and reports zero invalid ratio on benchmark slices and state-of-the-art IoU and Chamfer Distance versus prior mesh-to-CAD methods; these are project-authored benchmark figures, not independent blind tests. Record 3: the code is released under CC BY-NC 4.0 (non-commercial; commercial licensing requires contacting the authors), with a provisional patent application filed by Nehme and Siemens and initial funding from Altair, now part of Siemens; the companion CADStudio is an open-source editing interface. Record 4 (reconciliation discipline): when citing CADFit results, record the mesh source, the IoU threshold and tolerances, the operation set, and the CadQuery version, because reconstruction quality depends on these choices; numbers without that context cannot be reproduced and should not be used directly in external proposals. These records were verified on 12 November 2026 against the repository, the paper, and the ICML 2026 listing.

10. References

  1. Nehme G., Whalen E., Ahmed F., "CADFit: Precise Mesh-to-CAD Program Generation with Hybrid Optimization," ICML 2026, arXiv:2605.01171.
  2. Wu R. et al., "DeepCAD: A Deep Generative Network for Computer-Aided Design Models," ICCV 2021, arXiv:2105.09492.
  3. Koch S. et al., "ABC: A Big CAD Model Dataset For Geometric Deep Learning," CVPR 2019, arXiv:1812.06216.
  4. Seff A. et al., "SketchGraphs: A Large-Scale Dataset for Modeling Relational Geometry in Computer-Aided Design," ICML 2020 Workshop on Object-Oriented Learning, arXiv:2007.08506.
  5. Willis K. D. D. et al., "Engineering Sketch Generation for Computer-Aided Design," CVPRW 2021 Sketch-Oriented Deep Learning Workshop, arXiv:2104.09621.
  6. Xu X. et al., "BrepGen: A B-rep Generative Diffusion Model with Structured Latent Geometry," SIGGRAPH 2024, arXiv:2401.15563.
  7. Qi C. R. et al., "PointNet: Deep Learning on Point Sets for 3D Classification and Segmentation," CVPR 2017, arXiv:1612.00593.
  8. Nash C. et al., "PolyGen: An Autoregressive Generative Model of 3D Meshes," ICML 2020, arXiv:2002.10880.
Tags: