cs.CVAug 25, 2026

IterCAD: Iterative Program Repair for CAD Code Generation from Orthographic Views

Authors: Yuchuan Wu, Ke Niu, Haiyang Yu, Zhuofan Chen, Xiangyang Xue, Bin Li

Organizations: Fudan University Shanghai, China

Abstract

Generating executable parametric CAD code from dimension-annotated orthographic drawings is a challenging task requiring geometric understanding, procedural reasoning, and precise numerical prediction. Existing vision-language approaches typically formulate this problem as one-shot generation, preventing the model from inspecting intermediate CAD results and correcting early mistakes, often leading to non-executable code or geometrically inconsistent outputs. In this paper, we propose IterCAD, an iterative framework that reformulates orthographic-view-to-CAD generation as a progressive program repair process. Instead of predicting the final CAD code in a single pass, IterCAD repeatedly analyzes the current CAD result, reasons about its discrepancy with the target views, and explicitly decides whether to REVISE the code or STOP the refinement process. To make iterative repair learnable, we further construct IterCAD-RS, a structured revise-or-stop supervision set containing both repairable intermediate CAD states and already-correct states, and develop a three-stage training strategy for initial generation, revision learning, and multi-turn RL optimization. By closing the loop between visual understanding, geometric verification, and code refinement, IterCAD progressively corrects structural and parametric errors. Experiments on CADExpert show that IterCAD consistently improves code executability and geometric fidelity over strong one-shot baselines.

Figures & tables

Explore similar work

CardsList
  1. IterCAD: An Iterative Multimodal Agent for Visually-Grounded CAD Generation and Editing

    Jun 11, 2026Tao Hu, Jiaxin Ai, Licheng Wen +12Parametric CAD ModelingText-to-CAD Generation

  2. CADReasoner: Iterative Program Editing for CAD Reverse Engineering

    Feb 18, 2026Soslan Kabisov, Vsevolod Kirichuk, Andrey Volkov +5Parametric CAD Modeling3D Reconstruction

  3. CIT-CAD: Constraint Intent Tree-based CAD Code Generation and Verification

    Sep 7, 2026Yali Du, Hui Sun, San-Zhuo Xi +1Parametric CAD ModelingText-to-CAD Generation