arXiv:2608.24760cs.CLAug 2026

Manuscript Offprint

arXiv:2608.24760

ExpConCAD: Experience-Guided Text-to-CAD Generation from Shape Descriptions with Implicit Spatial Constraints

Jingyao Liu, Jinkang Tang, Chen Huang, Wenqiang Lei, See-Kiong Ng

Abstract

Text-to-CAD aims to generate executable CAD programs from natural-language descriptions. However, real-world descriptions are often underspecified and omit critical spatial constraints required for valid CAD construction, a challenge that has been largely overlooked by existing methods. In this paper, we argue that missing spatial constraints should be inferred with respect to the underlying construction structure and informed by reusable design experience. Based on this insight, we propose EXPCONCAD, an experience-enhanced framework for implicit spatial constraint completion. EXPCONCAD first recovers the intended construction structure and constraint scopes, then retrieves relevant constraint-completion experience for similar scopes to complete the missing spatial constraints, and finally generates executable CadQuery programs. Extensive experiments demonstrate the effectiveness of EXPCONCAD and provide insights into the role of construction structure understanding and experience memory in spatial constraint completion. Our code is available at: https://github.com/Hotjiashell/ExpConCAD.

1 Introduction

Automatically translating natural-language design descriptions into executable CAD construction programs, such as CadQuery scripts(contributors, 2026), allows users to create 3D models directly from textual instructions without manually operating professional CAD software (Khan et al., 2024; Li et al., 2024). Recent advances in large language models (LLMs) (OpenAI, 2025; Yang et al., 2025; Qwen Team, 2026) have substantially improved this Text-to-CAD paradigm(Badagabettu et al., 2024; Wang et al., 2026). As shown in Figure 1(a), given a detailed specification of a target object, the LLM generates the Python code, which is then executed to construct the corresponding 3D geometry.

However, existing Text-to-CAD methods typically require users to explicitly specify detailed geometric parameters, modeling operations, and spatial relations of the target object (Khan et al., 2024; Li et al., 2024; Liao et al., 2025; Kolodiazhnyi et al., 2025; Guan et al., 2026; Govindarajan et al., 2025). While such fine-grained inputs help define precise spatial constraints among object components, specify such over-detailed instructions impose substantial burden on users. In realistic scenarios, users usually describe the desired shape at a much higher semantic level. For example, as shown in Figure 1(b), a user may request “a flat plate with two circular through holes”. Such descriptions convey the intended appearance of the object, while leaving much of the underlying spatial constraints implicit. As a result, existing methods often generate structurally incorrect CAD models, such as overlapping holes. Recent study attempts to address this under-specification through end-to-end optimization by directly aligning under-specified inputs with target CAD shapes (Wang et al., 2025a). However, it only learns input–output correlations while overlooking the underlying implicit spatial constraints. Consequently, when encountering unseen designs with different spatial arrangements or component interactions, it still struggles to generalize and fails to infer the missing constraints for accurate CAD generation. Therefore, effectively reasoning about implicit spatial constraints in under-specified instructions remains a critical challenge for generating accurate 3D CAD structures.

To address this challenge, we start from a basic property of CAD construction: building a valid CAD model first requires identifying geometric elements and modeling operations, and then specifying the spatial relations among them (Kyratzi and Azariadis, 2021; Camba et al., 2016). Thus, for underspecified shape descriptions with implicit constraints, the missing spatial relations should be com-

(a) Construction-explicit input

Detailed construction steps

Step 1: Create a rectangular plate

Size: 80 mm × 60 mm × 10 mm

Step 2: Add two circular cut areas

Small hole: center at (20, 20), diameter 16 mm

Large hole: center at (55, 35), diameter 20 mm

Step 3: Cut through the plate

Cut both circles completely through the thickness

Construction details are given

Figure

(b) Shape description with implicit spatial constraints

causing invalid or unfaithful CAD models

Realistic user request

a flat plate with two circular through holes

Spatial constraints are left implicit

Figure

CAD Construction Structure

Understanding

Understand what should be built and

where constraints are needed.

Parts: base plate, circular holes

Operations: create plate ...

Constraint scopes:

plate-cutter: placement, cut depth ...

Experience Memory

reusable constraint

patterns

Host - cutter

inside boundary /

through-cut

ExpConCAD

Spatial Constraint Completion

Complete scoped constraints (experience-enhanced)

Retrieved relevant experiences

relevant constraint patterns

Host - cutter : stay inside plate boundary;

cut through full plate thickness

Cutter-cutter: avoid overlap / keep

sufficient spacing

hole placement → inside

plate boundary

hole spacing → non-

overlap

cut depth → through-cut

Part - part

contact / clearance

Figure 1: Overview of EXPCONCAD for resolving implicit spatial constraints (Fig.a and Fig.b). EXPCONCAD first recovers the construction structure to identify constraint scopes, and then completes missing spatial constraints with guidance from transferable experience.

pleted with respect to the underlying construction structure and its constraint scopes, rather than inferred from surface descriptions alone. We further observe that similar constraint-completion problems repeatedly appear across historical CAD construction processes (Kyratzi and Azariadis, 2021; Camba et al., 2016). For example, a cylindrical part with side holes and a plate with through holes have different target geometries, but both involve comparable constraint scopes, such as cutter-base placement and cutter-cutter separation. This suggests that prior CAD cases can provide transferable experience, such as cutter containment, cutter separation, and through-cut depth, for completing missing constraints over similar scopes. Inspired by these observations, we propose EXPCONCAD (Experience-enhanced Constraint completion for CAD), a framework for generating faithful CAD programs from underspecified descriptions by explicitly completing implicit spatial constraints. EXPCONCAD couples construction-aware spatial constraint reasoning with an experience memory. The reasoning pipeline first performs Construction Structure Understanding to recover the intended construction process and identify constraint scopes, then performs Spatial Constraint Completion before generating executable CadQuery code. The experience memory distills reusable constraint-completion patterns from prior CAD cases and retrieves relevant experience to guide completion over similar scopes.

We evaluate EXPCONCAD on CADFUSION-HARD, a challenging benchmark for Text-to-CAD with underspecified spatial constraints. EXPCONCAD improves VLM-Score over the strongest baseline by 22.5% on Qwen3.5-27B and 27.9% on GPT-5. Further analyses show that Construction Structure Understanding provides reliable scopes for Spatial Constraint Completion, while experience memory is most effective when it stores reusable scoped constraint-completion patterns. Our contributions are three-fold:

• We highlight the implicit spatial constraint as a critical challenge in Text-to-CAD, where natural descriptions often omit spatial relations required for valid CAD construction.

• We propose EXPCONCAD, which combines construction-aware spatial constraint reasoning and reusable experience memory from prior CAD cases for improved CadQuery generation.

• We conduct extensive experiments to validate our effectiveness and characteristics.