CADReview

Automatically Reviewing CAD Programs with
Error Detection and Correction

ACL Main Conference 2025 🌟
1South China University of Technology
2The Hong Kong Polytechnic University
*Equal Contribution

TLDR: CADReview benchmarks MLLMs' ability to correct CAD programs with refernece images.

Introduction Case

Overview of different ways (i.e., designer, GPT-4o and our ReCAD) to CAD review.

Abstract

Computer-aided design (CAD) is crucial in prototyping 3D objects through geometric instructions (i.e., CAD programs). In practical design workflows, designers often engage in time-consuming reviews and refinements of these prototypes by comparing them with reference images. To bridge this gap, we introduce the CAD review task to automatically detect and correct potential errors, ensuring consistency between the constructed 3D objects and reference images. However, recent advanced multimodal large language models (MLLMs) struggle to recognize multiple geometric components and perform spatial geometric operations within the CAD program, leading to inaccurate reviews. In this paper, we propose the CAD program repairer (ReCAD) framework to effectively detect program errors and provide helpful feedback on error correction. Additionally, we create a dataset, CADReview, consisting of over 20K program-image pairs, with diverse errors for the CAD review task. Extensive experiments demonstrate that our ReCAD significantly outperforms existing MLLMs, which shows great potential in design applications.

CADReview Dataset

The CADReview dataset is introduced to support the CAD review task—automatically detecting and correcting errors in CAD programs based on reference images. This task is fundamentally challenging for current multimodal large language models (MLLMs) due to the intricate alignment required between code and 3D geometry. The major challenges include:

  • Component-level reasoning: 3D objects consist of multiple geometric components, each mapped to specific code blocks that must be interpreted accurately.
  • Internal structure analysis: Some errors occur in visually hidden internal components, demanding programmatic analysis rather than visual inspection alone.
  • Precise code transformation: Correcting errors requires geometric reasoning and spatial transformations reflected directly in the code (e.g., translation, rotation).

To facilitate progress in this domain, we construct the CADReview dataset with the following characteristics:

  • Large-scale and diverse: Comprising 20K program-image pairs, the dataset includes both human-made and machine-generated CAD programs with realistic and diverse 3D object structures.
  • Error-rich examples: Each program may contain one or more of eight distinct error types (e.g., logic, primitive, position, constant), covering real-world failure modes in CAD design workflows.
  • High geometric complexity: Human-made programs feature advanced constructs such as macros, control flows, and boolean operations.
  • Multiview reference images: Every sample is paired with three rendered design drawings from varied viewpoints to enhance visual alignment and support complex error detection.

Overall, CADReview serves as a comprehensive benchmark for evaluating AI systems on real-world CAD program review tasks, emphasizing both accuracy and spatial reasoning.



CADReview Annotation Pipeline

Annotation Process:
  • Collecting Program-Image Pairs
  • Creating Error on CAD Programs
  • Annotating Feedback on CAD Program
CADReview Annotation

ReCAD Framework

To tackle the CAD review task—automatically detecting and correcting errors in CAD programs based on reference images—we propose ReCAD, a multimodal large language model (MLLM)-based framework. ReCAD consists of two key components: a feedback generator and a code editor, both built upon a shared MLLM backbone.

The feedback generator first aligns geometric components in the 3D object with their corresponding code blocks, then produces textual feedback identifying erroneous blocks and describing the error types. This is enabled by a Geometric Component Recognition (GCR) mechanism, which enhances the model's ability to reason about both visual and symbolic geometry.

The code editor takes the generated feedback as guidance and performs program-level geometric transformations (e.g., translation, rotation) to correct the erroneous CAD code. To support this, we introduce a Spatial Geometric Operation (SGO) mechanism that helps the model learn fine-grained spatial manipulation within CAD programs.

Each module in ReCAD integrates a vision encoder, a large language model, and a vision-language projector. We apply a two-stage supervised fine-tuning process, followed by reinforcement learning with task-specific reward functions based on error diagnostics and visual similarity between the predicted and reference 3D renderings.


Detailed ReCAD Architecture


Our experiments show that ReCAD significantly outperforms both commercial and open-source MLLMs on the CADReview dataset, especially in accurately aligning CAD code with visual components and generating high-quality corrections.

Experiment Results

BibTeX


        @article{chen2025cadreview,
        title={CADReview: Automatically Reviewing CAD Programs with Error Detection and Correction},
        author={Jiali Chen, Xusen Hei, HongFei Liu, Yuancheng Wei, Zikun Deng, Jiayuan Xie, Yi Cai, Li Qing},
        year={2025},
        }