CADKnitter: Compositional CAD Generation from Text and Geometry Guidance

Tri Le, Khang Nguyen, Baoru Huang, Tung D. Ta, Anh NguyenarXiv 2025 · DOI

Introduction: From Standalone Objects to Functional Assemblies

In the realm of 3D generative modeling, the focus has predominantly been "object-centric." Current AI models excel at producing standalone items—a single chair, a decorative vase, or a generic mechanical bracket. However, real-world engineering and manufacturing are inherently compositional. A bolt is useless without a nut of the correct thread and diameter; a mounting bracket requires a pin that fits its specific tolerances.

Designing for assembly requires sub-millimeter precision and an awareness of how parts interact. Traditional text-to-CAD methods often fail here, producing parts that look correct in isolation but suffer from scaling errors or physical intersections when placed in an assembly. To bridge this gap, researchers have introduced CADKnitter, a generative framework designed to "knit" new CAD parts onto existing models with functional precision.

Examples of CADKnitter generating complementary parts based on text prompts and existing geometry.

The KnitCAD Dataset: A Foundation for Assembly-Aware AI

A significant hurdle in training assembly-aware models has been the lack of specialized data. To address this, the authors curated KnitCAD, a massive dataset comprising over 310,000 CAD model pairs.

Derived from the Fusion 360 Gallery Assembly and Automate datasets, KnitCAD provides the necessary context for compositional tasks. Each entry includes:

  • A Condition Part: The existing geometry the new part must fit.
  • A Target Part: The part to be generated.
  • Textual Descriptions: Functional prompts generated by Multimodal Large Language Models (MLLMs) like GPT-4.
  • Contact Metadata: Precise identification of the faces intended to touch or interlock.

This dataset shifts the training objective from simple shape generation to understanding the geometric relationships between mating components.

Methodology: Geometry-Guided Diffusion in B-rep Space

CADKnitter utilizes Boundary Representation (B-rep), the industry standard for professional CAD software like SolidWorks. Unlike meshes, which are collections of triangles, B-reps use mathematical surfaces and curves, allowing for the high precision required in engineering.

The core innovation of CADKnitter is its Geometry-Guided Sampling strategy. Standard diffusion models are stochastic, which can lead to "blurred" boundaries that ruin a mechanical fit. CADKnitter introduces a "look-ahead" search during the reverse diffusion process to enforce physical constraints.

The CADKnitter architecture featuring the Geometry-Guided Search mechanism.

The sampling process involves three key stages:

  1. Guiding-Sample Predictor: At specific intervals, the model predicts an idealized version of the contact faces. It uses optimization-based Hungarian matching to ensure the new part's faces align perfectly with the existing geometry's contact points.
  2. Neighborhood Sampling: Instead of a single path, the model generates multiple candidate versions of the part.
  3. Selection via Composite Score: The framework evaluates candidates based on Geometry Fitness (minimizing overlap and gaps) and Semantic Regularization (ensuring the part still matches the text prompt).

By steering the generation toward physically plausible configurations, CADKnitter ensures that the resulting B-rep is not just a visual match, but a functional component.

Key Insights and Performance

The researchers observed a fundamental trade-off during testing: applying heavy geometric guidance significantly improves the physical "fit" but can occasionally stress the B-rep topology, slightly lowering the ratio of perfectly watertight models. However, the functional benefits are clear.

In comparisons against baselines like MatchMaker and PivotMesh, CADKnitter demonstrated superior performance:

  • Intersection Volume (IV): The model achieved a 27% reduction in physical "clipping" compared to unguided versions.
  • Proximity (PR): The distance between intended contact faces was significantly reduced, resulting in a much tighter fit.
  • Human Preference: In user studies, CADKnitter was consistently rated higher for both semantic accuracy and assembly quality.

The results suggest that while text prompts provide the "what" (the functional intent), the existing geometry must dictate the "how" (the specific dimensions and constraints).

Limitations and Future Directions

While CADKnitter represents a major leap forward, several challenges remain. The current optimization assumes a one-to-one face matching logic, which struggles with complex assemblies where one part might touch multiple others. Additionally, highly intricate features like screw threads or complex interlocking latches still push the limits of current B-rep diffusion backbones.

Future work aims to expand the framework to "many-to-many" face matching and the generation of multi-part assemblies. By moving beyond single-part generation, the goal is to create AI systems capable of designing entire mechanical systems from scratch.

Summary updated

BibTeX
@misc{le2025cadknitter,
  author = {Tri Le and Khang Nguyen and Baoru Huang and Tung D. Ta and Anh Nguyen},
  title = {{CADKnitter: Compositional CAD Generation from Text and Geometry Guidance}},
  year = {2025},
  eprint = {2512.11199},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2512.11199},
}
Figure