IterCAD: Iterative Program Repair for CAD Code Generation from Orthographic Views
- URL: http://arxiv.org/abs/2608.24020v1
- Date: Tue, 25 Aug 2026 03:22:10 GMT
- Title: IterCAD: Iterative Program Repair for CAD Code Generation from Orthographic Views
- Abstract summary: IterCAD is an iterative framework that reformulates orthographic-view-to-CAD generation as a progressive program repair process.<n>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.<n>IterCAD consistently improves code executability and geometric fidelity over strong one-shot baselines.
- Score: 35.452775950511935
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- 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.
Related papers
- CIT-CAD: Constraint Intent Tree-based CAD Code Generation and Verification [14.39975999842683]
We propose a framework that makes design intent explicit and lets a system check generated code against that intent.<n>The framework extracts actual constraints from the generated program, compares them with the expected constraints, and uses mismatches to localize and repair design violations.
arXiv Detail & Related papers (2026-09-07T12:42:42Z) - RA-CAD: Learning Post-Execution Critique for State-Aware Text-to-CAD Generation [25.137571635322896]
RA-CAD is a state-aware agent that interacts with the CAD environment through a Generate--Execute--Critique--Rewrite loop.<n>The agent generates an explicit post-execution critique as an intermediate policy action.<n> RA-CAD achieves state-of-the-art execution validity and geometric quality compared with existing methods.
arXiv Detail & Related papers (2026-08-06T07:52:45Z) - HierCAD: Hierarchical Text-to-CAD Design via Structure Alignment and Parameter Grounding [45.92807927638433]
HierCAD is a hierarchical text-to-CAD framework that improves both structural reasoning and parameter prediction.<n>Our code is available at https://github.com/Collab-Gen/HierCAD.
arXiv Detail & Related papers (2026-07-13T10:00:53Z) - SOV-CAD: Stepwise Orthographic Views Guided CAD Modeling Sequence Reconstruction [10.5983720313455]
SOV-CAD is a framework that formulates CAD reconstruction as a sequential decision-making task.<n>It employs offline reinforcement learning with a Decision Transformer architecture.<n>It surpasses state-of-the-art methods in CAD sequence reconstruction while exhibiting strong data efficiency.
arXiv Detail & Related papers (2026-07-05T05:12:58Z) - DreamCAD: Scaling Multi-modal CAD Generation using Differentiable Parametric Surfaces [67.45867367326105]
We propose DreamCAD, a multi-modal generative framework that directly produces editable BReps from point-level supervision.<n>DreamCAD represents each BRep as a set of parametric patches and uses a differentiable tessellation method to generate meshes.<n>DreamCAD achieves state-of-the-art performance on ABC and averse benchmarks across text, image, and point modalities.
arXiv Detail & Related papers (2026-03-05T19:04:07Z) - ReCAD: Reinforcement Learning Enhanced Parametric CAD Model Generation with Vision-Language Models [16.220781575918256]
ReCAD is a reinforcement learning (RL) framework that bootstraps pretrained large models (PLMs) to generate precise parametric computer-aided design (CAD) models from multimodal inputs.<n>We employ a hierarchical primitive learning process to teach structured and compositional skills under a unified reward function.<n>ReCAD sets a new state-of-the-art in both text-to-CAD and image-to-CAD tasks, significantly improving geometric accuracy across in-distribution and out-of-distribution settings.
arXiv Detail & Related papers (2025-12-06T07:12:56Z) - CReFT-CAD: Boosting Orthographic Projection Reasoning for CAD via Reinforcement Fine-Tuning [31.342222156939403]
We introduce CReFT-CAD, a two-stage fine-tuning paradigm that first employs a curriculum-driven reinforcement learning stage with difficulty-aware rewards to build reasoning ability steadily.<n>We release TriView2CAD, the first large-scale, open-source benchmark for orthographic projection reasoning.
arXiv Detail & Related papers (2025-05-31T13:52:56Z) - CADReview: Automatically Reviewing CAD Programs with Error Detection and Correction [11.33947758511237]
We introduce the CAD review task to automatically detect and correct potential errors.<n>In this paper, we propose the CAD program repairer (ReCAD) framework to effectively detect program errors.<n>We create a dataset, CADReview, consisting of over 20K program-image pairs, with diverse errors for the CAD review task.
arXiv Detail & Related papers (2025-05-28T12:41:00Z) - CADCrafter: Generating Computer-Aided Design Models from Unconstrained Images [69.7768227804928]
CADCrafter is an image-to-parametric CAD model generation framework that trains solely on synthetic textureless CAD data.<n>We introduce a geometry encoder to accurately capture diverse geometric features.<n>Our approach can robustly handle real unconstrained CAD images, and even generalize to unseen general objects.
arXiv Detail & Related papers (2025-04-07T06:01:35Z) - PS-CAD: Local Geometry Guidance via Prompting and Selection for CAD Reconstruction [86.726941702182]
We introduce geometric guidance into the reconstruction network PS-CAD.
We provide the geometry of surfaces where the current reconstruction differs from the complete model as a point cloud.
Second, we use geometric analysis to extract a set of planar prompts, that correspond to candidate surfaces.
arXiv Detail & Related papers (2024-05-24T03:43:55Z) - SECAD-Net: Self-Supervised CAD Reconstruction by Learning Sketch-Extrude
Operations [21.000539206470897]
SECAD-Net is an end-to-end neural network aimed at reconstructing compact and easy-to-edit CAD models.
We show superiority over state-of-the-art alternatives including the closely related method for supervised CAD reconstruction.
arXiv Detail & Related papers (2023-03-19T09:26:03Z) - AutoCAD: Automatically Generating Counterfactuals for Mitigating
Shortcut Learning [70.70393006697383]
We present AutoCAD, a fully automatic and task-agnostic CAD generation framework.
In this paper, we present AutoCAD, a fully automatic and task-agnostic CAD generation framework.
arXiv Detail & Related papers (2022-11-29T13:39:53Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.