Manuscript Offprint
arXiv:2611.01165Composable CAD: Sketch-to-CAD Program Synthesis in Parts
Yuanbo Li, Vivian Liu*, Sean J. Liu*, and Justin Matejka
Autodesk Research San Francisco, CA, US *Equal contribution

Figure 1: Given one freehand sketch (a), our system segments the object into parts and generates several samples for each part (b). The user composes a shape by selecting any sample per part (Example 1 in red, Example 2 in blue), and different selections compose into different shapes (c). The output is a CadQuery program for each part.
Abstract
Designers often build CAD models part by part, and may iterate on individual components throughout the design process. Recent vision-language models (VLMs) can synthesize CAD programs from sketches, but generating parts independently does not ensure that they are composable: components may lose the intended proportions and alignments or fail to join correctly where they meet. We present Composable CAD, a framework that uses off-the-shelf VLMs to synthesize a design space of independently sampled, interchangeable component programs, where any selection composes into a coherent CAD model. We recover design constraints from the sketch and use them to construct a coarse proxy that establishes how the components are sized, aligned, and attached. We then generate each component independently from its proxy and apply a deterministic rewrite to ensure that neighboring components meet at their prescribed interfaces. We evaluate Composable CAD across a range of objects and sketch styles and conduct two user studies. Compared to VLM-only baselines, our method produces more detailed, composable designs.
1. Introduction
In industrial design workflows, designers typically begin with a sketch [EMA24, BH20]. The sketch records the initial concept: which parts make up the design, how those parts are laid out in space, and what details set the design apart. Sketching serves as the front end of ideation, letting designers visualize and test ideas rapidly [ES07, Bux07]. Once designers settle on a concept, they re-
build it in a CAD tool at higher fidelity and explore more precise variations of it [SXZ17,LYZ24].
Recent vision-language models (VLMs) attempt to automate CAD generation from sketches [Ant26, Gem25]. A designer can provide a foundation model an input text prompt "generate CAD for a chair" and sketch and receive a CAD program as output [Ant26, Gem25]. A growing body of work in this space instantiated agentic coding loops where the model executes its CAD programs,
2 of 27
Y. Li et al. / Composable CAD

Figure 2: Independently sampled parts do not connect on their own. When each part is generated in a separate VLM call, with no communication between the calls, the parts leave gaps and misalignments where they should meet (left; insets show the junctions between armrest and seat and between armrest and backrest failing to close). Our algorithm closes these interfaces, so adjacent parts meet congruently with no gap or overlap (right).
inspects renders for visual feedback, and revises the CAD geometry over several rounds [ATZ25, MKC25, OMSR25, FNY*26, BLBF26, AAMJ26].
However, independently generated parts which may be valid in isolation, are not necessarily composable: the parts may not fit together, fail to join without gaps or overlaps, and have hallucinated away from the original proportions, alignments, and design intents defined in the original sketch (Figure 2). Guaranteeing composability in CAD generation raises a few challenges. First, the agent must preserve the designer-set constraints – the part decomposition, proportions, and alignments laid out in the sketch. Second, the agent must preserve the structural constraints and relationships between parts, so they can join without gaps or volumetric overlap. This is difficult for VLMs because the surfaces where parts meet are often implicit in CAD programs and emerge only when the operations execute. An extrusion, for example, creates surfaces with no explicit handle in the code. Additionally, structured exploration can give users choices for how to refine the generated CAD assembly.
We present Composable CAD, a framework that turns a concept sketch into a design space of independently sampled, composable part programs (Figure 1). Designers explore alternatives for each part and compose a design from their selections. Sketch-derived relations guide part proportions, alignments, and attachments, while a deterministic rewriting algorithm enforces structural compatibility across the sampled variants.
Our system follows a two-stage, coarse-to-fine pipeline. In the planning stage, we recover attachment, alignment, and proportion relations from the sketch and use them to construct a coarse proxy that fixes the layout of the parts. In the detail generation stage, we elaborate each part independently from its proxy. Finally, we use a deterministic rewrite algorithm to reconcile independently generated parts at their connecting surfaces, making them interchangeable across samples.
We demonstrate Composable CAD across a variety of objects and sketch styles, producing composable, part-based design spaces. Compared with VLM baselines that generate objects as a whole or create parts separately, our method produces detailed parts while
maintaining composability across variants. We conducted two user studies: one comparing the perceptual quality of our outputs to a single-pass VLM baseline, and another comparing our part-based exploration workflow to a VLM-only baseline. Our results show that participants preferred our generated shapes and favored our part-based workflow of selecting and combining individual parts.
In summary, our contributions are:
- A formulation of sketch-to-CAD synthesis as a design space of independently sampled, interchangeable part programs, and its application to exploratory design.
- A coarse-to-fine generation pipeline that recovers geometric relations from the sketch, plans the object as a shared proxy, and generates each part independently.
- A deterministic rewrite algorithm that localizes connecting surfaces and edits independently generated part programs to meet congruently.
Sketch-based modeling. Generating 3D geometry from 2D sketches has a long history. Early methods reconstruct 3D shapes from line drawings using geometric regularities such as parallelism, orthogonality, planarity, and symmetry [LS96, LCLT08, YLT13, CSMS13, PCV16]. Later methods handle curved geometry, oversketching, and construction lines [XCS14, SKSK09, BBS08, SS14, GHL20, HGSB22, YDSG21]. We similarly exploit geometric cues in sketch strokes, but use them to constrain VLM-generated CAD rather than reconstruct geometry directly.
We contribute to the family of works that infer parametric shapes or CAD operations from sketches [HKYM17, NGDGA16, LPBM20, LPBM22, PMKB23, SLX25, LMK26]. Closest to ours, Free2CAD [LPBM22] and CADrawer [LMK26] parse strokes into sequences of CAD operations. While these methods reconstruct a single shape from a drawing, we generate multiple programs per part that can be independently sampled and recombined.
CAD Program Generation. Prior work generates CAD programs from diverse inputs, including voxel grids [SGL18, TLS19, LWJ22], point clouds [WXW18, DIP18, WXZ21, LOWS24, GLP22, SLK20, RDM25], and boundary representations [XPC21], among others [CF25, WZW24]. More recent work uses language and vision-language models for CAD program synthesis. Early approaches train or fine-tune models on CAD sequences [XWZ24, RDM25, KSS24, LML25, KDA24, WYSB25, DAHA25, YSH24, ZSW25], but are limited by the scale and operation coverage of available CAD datasets. Recent methods instead place off-the-shelf models in agentic loops, where they generate CAD code, inspect execution results and rendered views, and revise their output over multiple rounds [ATZ25, MKC25, OMSR25, FNY26, BLBF26, AAMJ26]. We build on this training-free paradigm, but generate independently sampled programs for
3 of 27

Figure 3: System pipeline. Planning segments the sketch (a), extracts design constraints from stroke geometry (b), and refines a proxy program (c), which defines the structural constraints (e). Detail generation uses each part's proxy program and corresponding sketch region (d) to produce detailed variants in parallel (f). A deterministic rewrite enforces the structural constraints (g), making any selection of part variants compatible.
each part rather than a single CAD program. We reconcile their connecting geometry with a deterministic rewrite, making parts interchangeable across samples.
Part-based generation and composition. Representing shapes as structured arrangements of parts is common in shape programs and procedural modeling, where programs encode both the parts and their relationships [MWH06, JBX20, JCG21, JGMR23, LMAR24]. Parametric design systems similarly expose part-based design spaces for interactive exploration [SXZ17, KGC17, MGB18, WZN*19]. We build on this idea, using CAD programs to represent and vary independently generated parts.
Recent systems also generate or compose shapes part by part. Compos3D [FLFM26] synthesizes a coherent mesh from a user-arranged composition of parts. Recent vehicle-design systems combine parts across multiple views or sketch and generate parts individually [LYL25, YLMB26]. ArtiCAD [SGZ26] generates articulated CAD assemblies from text or images, but does not address interchangeability across independently sampled variants. We target this problem directly, using sketch-derived relations to guide part generation and a deterministic rewrite to make variants interchangeable.
3. Overview
Given a concept sketch, Composable CAD generates several CAD program variants for each component (Figure 3). We give a high-level overview of the pipeline here; Appendices B–F provide full details.
We first plan the object as a coarse proxy, using geometric relations recovered from the sketch to establish how its components are sized, aligned, and attached. The proxy then provides the context for generating each component independently and defines the interfaces where neighboring components should meet. Finally, a deterministic rewrite seats each generated component against these interfaces. The rewritten components can be freely recombined: they do not overlap, meet exactly at shared interfaces, and form
a single connected solid. A material budget limits how much the rewrite may alter the sampled geometry (Section 4).
To ground this workflow in practice, we conducted a formative study with industrial designers prior to development (Appendix A). Designers described an early phase of loose sketching followed by a 3D realization phase, where they work part by part and may divide components across collaborators. They also described producing useful design variants as time-consuming, particularly when variants require adding or reworking detail. Our system targets this later phase, supporting part-based exploration while keeping independently generated components mutually compatible [Bux07].
We formulate composability through two types of constraints: design constraints, set by the designer's sketch, and structural constraints, which guarantee valid composition. Design constraints capture the sketch's intent: which components attach, how they align, and their relative proportions. Because these relations are recovered from an imprecise 2D drawing, we treat them as guidance rather than enforce them exactly. Structural constraints specify the exact geometry required for components to compose without gaps or volumetric overlap. We use the design constraints to construct the shared proxy, then derive the structural constraints from it.
Our pipeline has two stages (Figure 3). The planning stage uses design constraints from the sketch to construct a shared proxy and derive its structural constraints. The detail generation stage then elaborates each component independently from the proxy, followed by a deterministic rewrite that enforces the structural constraints. Figure 4 shows these programs and constraints.
3.1. Planning
The planning stage reasons over the whole object once, establishing how its components belong together before any of them is elaborated. We first segment the sketch into semantic components (Appendix B) and recover four types of design constraints: attachment, alignment, proportion, and mirroring. We extract these relations geometrically (Appendix C) rather than asking the VLM to infer
4 of 27
Y. Li et al. / Composable CAD

Figure 4: Programs and constraints at each stage: (a) input; (b) proxy program; (c) design constraint feedback; (d) detailed program; (e) structural constraints (proxies and connecting surfaces); (f) rewrite, appending a wrapper while preserving the original code (gray). Parts are shown together for illustration; detail generation runs independently per part using its proxy program and corresponding sketch region.
them, since VLMs remain unreliable at quantitative spatial reasoning [LMFA24, CXK*24]. We detect stroke junctions, which identify attachments; junction-incident strokes then vote for the object's
coordinate axes, and projecting component regions onto these axes gives alignment and proportion. Mirroring comes from the segmentation.
The design constraints guide the VLM in constructing a coarse proxy of the object, with one simple volume per component (Appendices D-E). We compile each relation into a function that checks whether it holds on the generated proxy. Figure 4 shows this process for the chair: the backrest, for example, has constraints on its proportion, attachment to the seat pan, and alignment with neighboring components. We execute these checks and return any violations to the VLM for one round of refinement (Figure 4c). We treat these relations as guidance rather than requirements: both their recovery and the underlying freehand sketch are approximate, so the VLM may overrule a relation that conflicts with the shape it is building. Mirroring is exact because we generate one member of a mirrored pair and reflect it for the other.
Once the proxy is fixed, we use it to determine exactly where neighboring components should meet. We represent each component by its axis-aligned proxy box and trim overlapping boxes so their interiors are disjoint. Where two attached boxes meet, their shared planar boundary defines a connecting surface (Figure 4e). The resulting proxy boxes and connecting surfaces form the structural constraints: each component must remain within its proxy and meet its neighbors at the prescribed surfaces.
3.2. Independent Detail Generation
Once planning is complete, we elaborate each component independently and in parallel; see Appendix F for full details. In the detail generation stage, we provide the VLM with only the component's proxy program and corresponding sketch region. Rather than generating a new program from scratch, the VLM edits the proxy program, which represents the component as a simple volume, and elaborates it into detailed geometry. The proxy carries the global information needed to place the component, while the sketch region provides the visual information needed to elaborate it. We draw several variants for each component from independent VLM calls.
We can generate components independently and in parallel because each component does not need to see the whole object, only enough context to know where it belongs. Giving the VLM the whole object instead introduces irrelevant context that can degrade generation [SCM23, LKW25]; in our evaluation, focused per-component generation produces more detailed programs (Section 6.4).
While the proxy guides placement, it does not guarantee that the detailed geometry still reaches its connecting surfaces. We therefore apply a deterministic rewrite (Section 4) to seat each sampled component against these surfaces before adding it to the design space.
4. Deterministic Rewrite
We now describe our deterministic rewrite algorithm for seating independently generated components against the structural constraints defined during planning.
5 of 27
(a) Concave Surface

(b) Convex Surface
Figure 5: The three rewrite steps on a concave part (a) and a convex one (b). The gray dashed region is the part's proxy and the red translucent regions are its connecting surfaces, both fixed by the planning stage. In (a), the green region shows only the material introduced to establish the prescribed interface, and in (b) the red region marks material cut from a face that protrudes past it. The material budget limits the total geometry the rewrite may change.
4.1. Seating a Component
Our deterministic rewrite enforces the structural constraints while preserving the generated geometry wherever possible. It seats each component inside its proxy and against its connecting surfaces using three increasingly geometry-changing operations (Figure 5). We say a component is seated when it remains within its proxy and covers each connecting surface without extending beyond its interface plane. We first translate the component to the center of its proxy, then scale it to reach its connecting surfaces while remaining within the proxy. Finally, we form a flat face at each interface: if the generated surface falls short of the connecting surface, we union material to fill the gap; if it protrudes beyond it, we cut the excess. Figure 5 shows both cases. These operations modify only the residual geometry needed to establish the interface; we bound the total modification with the material budget described in Section 6.3.
We perform this step geometrically rather than ask the VLM to repair its program because connecting surfaces are often implicit in CAD code. An extrusion, for example, creates faces with no explicit handle in the program; their positions are known only after execution. Placing such a face at a prescribed interface therefore requires reasoning about geometry that the program does not explicitly represent. Predicting program outputs remains unreliable even for short functions [GRL24], and quantitative spatial reasoning is itself difficult for VLMs [LMFA24, CXK24]. We instead operate on the executed geometry and append deterministic Cad-Query operations to the sampled program.
4.2. Rewrite Algorithm
Let be the sampled program for component , its executed solid, its proxy, and its connecting surfaces.
Algorithm 1: Deterministic rewrite of a part
Input: solid , proxy , connecting surfaces on planes
Output: rewritten solid
// Step 1: translate to the proxy center 1 ;
// Step 2: scale per axis about center() 2 foreach axis do
3 if a connecting surface lies on a face normal to a then 4 smallest factor reaching every such surface: contact with where is concave, coverage of where it is convex;
5 else 6 ;
7 about center();
// Step 3: form a flat face at each connecting surface
8 foreach do
9 reclassify at ;
10 if convex then 11 cut away the material of lying beyond over a neighborhood of ;
12 else 13 union with the solid of cross section extruded inward from until it meets the part;
14 return ;
Algorithm 1 rewrites by appending translation, scaling, union, and cutting operations. We append rather than modify the sampled construction to preserve as much of the VLM-generated geometry as possible.
The operations are applied from least to most geometry-changing. First, we translate the component to the center of its proxy, preserving its geometry exactly. Second, we scale each axis until the component reaches its connecting surfaces while remaining within its proxy; scaling changes dimensions but preserves its features and their arrangement. Third, we classify the generated surface at each interface as concave or convex. A concave surface falls short of the interface, so we union an extrusion of the connecting surface inward until it reaches the component. A convex surface protrudes beyond it, so we cut away the excess. Appendix G explains why this choice preserves more of the sampled geometry.
4.3. Composability Guarantee
Because every variant is rewritten against the same proxy and connecting surfaces, the rewrite can operate on each component independently while ensuring that the resulting variants remain interchangeable.
Proposition 1. Let the component proxies have pairwise disjoint interiors, with each attached pair sharing one planar connecting surface. Under the sample conditions of Appendix H, if Algorithm 1
6 of 27
Y. Li et al. / Composable CAD
(a) Sketch Input
(b) Design Space
(c) Example Outputs

Figure 6: Design space for a sports car sketch. Insets highlight the components that differ between the shown outputs.
(a) Sketch Input
(b) Design Space
(c) Example Outputs

Figure 7: Design space for a banker's lamp, segmented into three components. Insets highlight the components that differ between the shown outputs.
(a) 2D Redraw & Identifying new component

(b) Seating the component

(c) Variants in place

Figure 8: Editing a component in 2D. The designer redraws the backrest, and the VLM samples a new component from the sketch (a). Placed directly it misses its neighbors (b, left inset); assigning it the connecting surfaces the old backrest left (red) and running the deterministic rewrite seats it flush (b, right inset). Sampling yields several backrests, each seating into the same fixed chair (c). Only the backrest changes; the seat, base, and armrests are identical throughout.

Figure 9: Fabricating a design space. We printed every sample of every component of the stand mixer, one column per sample index (b), so that a column read top to bottom gives one complete set of parts (a). Every part was generated independently, and so was every joint, yet parts can be taken from any column and assembled: the four mixers in (c) are built from different combinations of the printed parts, each meeting flush at its connecting surfaces.
7 of 27
completes within the material budget for every component, then any selection of one rewritten sample per component has pairwise disjoint interiors, every attached pair meets exactly along its shared connecting surface, and their union is one connected solid.
The sample conditions require nonempty, connected material within each proxy and that the generated geometry can be seated at each interface by the corresponding cut or union; Appendix H states them formally. Intuitively, keeping every component inside its proxy prevents volumetric overlap, while neighboring components cover the same connecting surface without extending beyond it. Since the attachment graph is connected, these shared interfaces make the assembled object connected.
The guarantee does not bound how much the rewrite must change a sampled component. A highly distorted interface may require a large cut or union, which would defeat the purpose of preserving the sampled geometry. We therefore cap the volume changed by scaling, cutting, and union at 10% of the shape's total volume, and report failure when a component cannot be seated within this budget. Section 6.3 evaluates this tradeoff.
5. Applications
Composable CAD supports three applications: exploring the part-based design space, editing individual components, and fabricating interchangeable parts.
5.1. Design-Space Exploration
Our system exposes a part-based design space for exploring variations of the input sketch. The designer browses alternatives for each component and composes a design by selecting one of each; because the components are interchangeable, any selection can be freely recombined. We generate five variants per component independently and in parallel from the same proxy, varying the sampling temperature from 0.1 to 0.5 to produce a range of designs (Appendix F).
We show results on sketches from OpenSketch [GSH19], DiferSketching [XSL22], SlowSketch [BDM20], and AmateurSketch [QGS21], spanning a range of drawing styles and levels of detail. For each, we show the input sketch, generated design space, and several recombined outputs (Figures 6, 7, 13, 14, 15, 16, 17, 18). Insets highlight components that differ across outputs and remain compatible when recombined.
5.2. Editing
Our structural constraints make component-level editing natural: removing a component leaves its proxy and connecting surfaces fixed, so any replacement inherits exactly the constraints of the original. The deterministic rewrite (Section 4) seats the replacement against these interfaces, while every other component remains unchanged.
We demonstrate three ways to provide a replacement: redrawing the component as a sketch (Figure 8), borrowing a finished component from another design (Figure 19), or describing its replacement in text (Figure 20). In each case, only the selected component
changes. The replacement remains compatible with the full design space, so it can be recombined with variants of every other component and exploration can continue from the edited design.
5.3. Fabrication
Composable CAD also supports physical assembly: the flat, congruent connecting surfaces produced by our system provide natural interfaces for joining components. We demonstrate this by 3D printing an entire design space—every sample of every component—and assembling designs from components across different samples (Figure 9). Because the components meet at the same connecting surfaces, the recombination available in the digital design space carries over to the physical parts.
The joints are independent as well. For each connecting surface, we place a peg on one component and a socket on the other, with no coordination between their generation. Since both are derived from the same connecting surface, they are congruent by construction (Appendix I). See the supplemental video for additional examples.
6. Evaluation
We evaluate Composable CAD on the properties our method is designed to provide: preserving the sketch's design constraints, maintaining structural validity under part recombination, and producing detailed CAD programs, together with the cost of generation. We compare against VLM-only baselines across a corpus of objects and sketch styles, and complement them with qualitative results and two user studies.
6.1. Baselines
We compare against two VLM-only baselines and one ablation of our method. The first tests direct sketch-to-CAD generation with an agentic VLM; the second gives the VLM the same coarse-to-fine generation strategy as our method, but without our geometric constraints or deterministic rewrite. Finally, we compare our pipeline with and without the deterministic rewrite to isolate its effect on composability. Prompts for the VLM baselines are given in Appendix J.
S1: VLM one pass. We use this baseline to represent a practical single-pass setting. Given the sketch, the VLM segments the object and generates one CadQuery program with one function per component. We use high thinking with a five-minute budget.
S2: VLM two passes. This baseline tests whether coarse-to-fine generation alone is sufficient. The VLM first generates a whole-object proxy, then elaborates each component with the full proxy program as context. It performs its own segmentation and uses no geometric constraints or deterministic rewrite. We use high thinking with no time limit, allowing the VLM to complete the more time-consuming two-stage generation.
S3: Ours without rewrite. We run our full pipeline but disable the deterministic rewrite (Section 4). Sketch-derived relations still guide proxy generation, and components are independently elaborated from their proxies, but they are not reconciled at their connecting surfaces.
8 of 27
Y. Li et al. / Composable CAD
| Ours | ||||
|---|---|---|---|---|
| Proportion ↑ | 80.8% | 74.6% | 91.2% | 89.4% |
| Alignment ↑ | 84.7% | 62.5% | 88.8% | 86.9% |
| Mirroring ↑ | 93.0% | 82.3% | 100% | 100% |
Table 1: Fraction of design-constraint relations satisfied, for the setups of Section 6.2, checked with the relation functions described in the text. Bold marks the best per row. , our pipeline without the rewrite, scores highest on proportion and alignment; Ours is slightly below it because the rewrite moves geometry after the relations have been checked. Both reach 100% on mirroring by construction, since mirrored parts are generated once and reflected.
Ours. Our complete pipeline, using the same VLM with medium thinking.
6.2. Evaluation Protocol
We evaluate on 33 objects randomly selected from the sketch datasets used in Section 5.1, spanning different object types, drawing styles, and levels of detail. Each method generates five program variants per object. We evaluate these programs both as generated and after recombination. As generated evaluates each program directly, with all components coming from the same variant, giving shapes per method. Recombined forms 25 additional shapes per object by randomly selecting one component from across the five variants, giving shapes per method. This tests whether components generated in different samples remain interchangeable. Shapes are normalized to a cm bounding box before geometric measurement. Non-executable outputs are rare, since each setup executes its generated programs and uses the VLM to repair compilation errors.
6.3. Quantitative Results
We quantify how well each method preserves the sketch constraints, maintains composability, and generates detailed CAD programs.
Design Constraints. To measure satisfaction of design constraints, we evaluate how well the generated shapes preserve the alignment, proportion, and mirroring relations recovered from the sketch. We reuse the executable relation functions of Appendix D: proportion compares a component's x:y:z extents with the ratio recovered from the sketch, alignment checks the specified component anchors along each axis, and mirroring checks that mirrored components match in extent. We omit attachment because physical contact is enforced by the structural constraints and evaluated separately below.
We report the fraction of extracted relations that pass in Table 1. Because and determine their own segmentation, we extract relations using each setup's own part list. Results show that our planning stage substantially preserves these relations. scores highest on proportion and alignment, while our complete method is slightly lower because the rewrite modifies geometry after the relations have been checked. Neither is expected to reach 100%:
design constraints are soft guidance, and the VLM may overrule a recovered relation when constructing the proxy. Both and ours satisfy mirroring by construction because mirrored components are generated once and reflected.
Structural Validity. We next evaluate whether independently generated components compose correctly, particularly after recombination. We measure three conditions. No overlap requires that no two components intersect. Attached requires every pair marked as attached by the sketch to have surfaces within 0.1 cm. Valid interface requires each attached pair to meet over a flat contact region whose side exceeds max(0.3 cm, t), where t is the component's cross-sectional thickness at the interface. Figure 11 illustrates these failure modes. For our method, the interface is the computed connecting surface; because the VLM baselines have no explicit interface, we take it as the region of one component's boundary within 0.1 cm of the other.
Table 2 reports these conditions both as generated and after recombination. Our method maintains similar structural validity in both settings: 93.3% of generated shapes and 91.5% of recombined shapes satisfy all three conditions. In contrast, the single-pass baseline drops from 73.9% to 9.9% after recombination, since components generated together may not remain compatible when mixed across samples. and likewise remain substantially below our method, showing the role of the deterministic rewrite in making independently sampled components interchangeable.
Material Budget. The material budget limits how much the rewrite may alter a component after detail generation. We measure rewrite cost as the volume changed by scaling, cutting, and union, and cap it at 10% of the shape's total volume; translation does not contribute because it preserves geometry exactly. If any component cannot be seated within this budget, the composed shape is scored as failing all three structural conditions.
Table 3 varies the budget from 1% to 20%. A tight budget preserves more of the sampled geometry but leaves the rewrite too little room to establish some interfaces, while a larger budget improves structural validity at the cost of modifying more geometry. We use 10% throughout the paper, at which 91.5% of recombined shapes satisfy all three structural conditions.
Program Detail. Component-wise generation produces substantially richer CAD programs. Table 4 reports number of CAD operations and lines of code across the four setups. The one-pass baseline averages 53.2 CAD operations, compared with 85.6 for the two-pass VLM baseline and 127.5 for our complete method. S3 and ours have the same line count because the rewrite appends operations to the returned component rather than adding source lines, increasing the operation count without changing program length. Figure 10 shows the corresponding qualitative differences in generated geometry.
VLM-Based Repair Our deterministic rewrite raises a natural alternative: can the VLM itself repair independently generated components? We test this on the same 825 recombined S3 shapes used above. Gemini 3.1 Pro receives the complete CadQuery program and may repeatedly execute and revise it for up to three minutes to remove gaps and overlaps, produce flat interfaces, and preserve component detail. Appendix K includes the full prompt.
9 of 27
| S₁ | S₂ | S₃ | Ours | |||||
|---|---|---|---|---|---|---|---|---|
| generated | recombined | generated | recombined | generated | recombined | generated | recombined | |
| # Shapes | 165 | 825 | 165 | 825 | 165 | 825 | 165 | 825 |
| No Overlap ↑ | 92.1% | 23.9% | 81.2% | 79.2% | 80.0% | 78.9% | 95.8% | 94.1% |
| Attached ↑ | 87.3% | 27.6% | 80.0% | 81.5% | 81.8% | 82.7% | 95.8% | 94.9% |
| Valid Interface ↑ | 73.9% | 9.9% | 55.8% | 54.5% | 53.9% | 55.2% | 93.3% | 91.5% |
| All Succeed ↑ | 73.9% | 9.9% | 55.8% | 54.5% | 53.9% | 55.2% | 93.3% | 91.5% |
Table 2: Structural validity scored on variants as generated and on recombined selections. Each score is the fraction of shapes satisfying it; All Succeed is the fraction satisfying all three. Our rewrite operates under a 10% material budget. Bold marks the best per row.
| 1% | 5% | 10% | 20% | |
|---|---|---|---|---|
| No Overlap ↑ | 81.2% | 93.7% | 94.1% | 99.2% |
| Attached ↑ | 82.1% | 91.0% | 94.9% | 96.2% |
| Valid Interface ↑ | 55.0% | 86.8% | 91.5% | 94.4% |
| All Succeed ↑ | 55.0% | 86.8% | 91.5% | 94.4% |
Table 3: Structural validity as the material budget varies, scored on recombined selections (825 shapes). The budget caps the volume the rewrite may add or remove as a fraction of the shape's total volume. We use 10% throughout the paper.
| S₁ | S₂ | S₃ | Ours | |
|---|---|---|---|---|
| CAD operations | 53.2 | 85.6 | 113.7 | 127.5 |
| Lines of code | 77.9 | 104.5 | 274.8 | 274.8 |
Table 4: Program complexity for the setups of Section 6.2, over 33 objects with five runs each, averaged over all runs. Bold marks the best per row. S₃ and Ours share a line count because the rewrite appends its operations to the returned part rather than adding lines of its own, so it raises the operation count while leaving the program length unchanged.
Table 5 shows that VLM repair improves overlap and attachment, but not valid interfaces: the fraction satisfying all structural conditions changes from 55.2% before repair to 54.1% afterward. Our deterministic rewrite reaches 91.5% with negligible additional runtime. This advantage likely comes from operating explicitly in 3D: the VLM must reason about interfaces indirectly through CAD code, whereas our rewrite measures and modifies the executed geometry directly, making it better suited to enforcing the precise interfaces required for composability.
Generation Cost Finally, Table 6 reports generation time and token usage. The one-pass baseline is fastest and uses the fewest tokens, but produces substantially less detailed programs. Generating components independently in parallel makes S₃ and ours faster than sequential two-pass generation. Our pipeline uses more tokens than the VLM-only baselines because it also reasons over design-constraint feedback. The deterministic rewrite itself adds negligible runtime and consumes no VLM tokens.
| S₃ | VLM repair | Ours | |
|---|---|---|---|
| # Shapes | 825 | 825 | 825 |
| No Overlap ↑ | 78.9% | 91.2% | 94.1% |
| Attached ↑ | 82.7% | 89.5% | 94.9% |
| Valid Interface ↑ | 55.2% | 54.1% | 91.5% |
| All Succeed ↑ | 55.2% | 54.1% | 91.5% |
| Repair time | – | 3 min (cap) | Negligible |
Table 5: Structural validity compared with using a VLM for repair, evaluated on the same 825 recombined selections. Each structural metric is the fraction of shapes satisfying it; All Succeed requires all three. Bold marks the best structural result per row. Our rewrite uses the standard 10% material budget. The VLM time entry denotes its three-minute wall-time cap per shape.
| S₁ | S₂ | S₃ | Ours | |
|---|---|---|---|---|
| Time (min) | 5 (capped) | 9–44 | 5–11 | 5–11 |
| Tokens (mean) | 228k | 371k | 526k | 526k |
| Tokens (range) | 131–337k | 216–546k | 349–688k | 349–688k |
Table 6: Generation cost per object, over 33 objects with five runs each, using Gemini 3.1 Pro [Goo26b]. Token usage is reported as mean and range. Generation time is reported as a range, except for S₁, for which we report the five-minute cap; S₂ runs uncapped. Costs vary with the number and complexity of parts. S₃ and Ours have the same token usage and reported time ranges, since the rewrite adds negligible runtime and consumes no tokens.
6.4. Qualitative Results
We show qualitative results of our method compared with baselines and with prior systems. Figure 10 illustrates the benefit of component-wise generation. A single VLM pass captures the coarse shape but often omits component detail, such as wheel structure, grilles, bumpers, and body features. Giving components their own generation produces substantially richer geometry, and our per-component generation adds further detail.
This added detail comes with a challenge: independently generated components may not fit together. Figure 11 shows the three failure modes we observe: components may overlap, fail to touch, or touch over an invalid interface. Our deterministic rewrite re-
10 of 27
Y. Li et al. / Composable CAD

Figure 10: Detail across generation strategies. Given the input sketch (a), a single pass produces parts that are little more than primitives: flat body slabs, plain cylindrical wheels, and no grille or bumper structure (b). Giving each part its own pass adds detail (c), and our pipeline adds more still (d), with spoked and treaded wheels, slatted grilles and bumpers, and panel creases on the body. Detail is one benefit of elaborating parts separately rather than generating the whole object at once.

Figure 11: Example failures without deterministic rewrite. The red region is the connecting surface between the motor head and the stand. Our rewrite seats the two so that they meet flush over the whole surface, and the isolated stand shows the flat face it produces (a). Without it, three failures occur: the parts interpenetrate (b), they do not touch at all (c), or they touch but not over a flat region, here a domed face that meets the head along a curve rather than a face (d).
solves these failures by seating components against their shared connecting surfaces, producing flat, congruent contact while retaining their detail.
Beyond these differences in detail and composability, our system also targets a broader setting than prior sketch-to-CAD systems (Figure 12). CADrawer [LMK*26] and Free2CAD [LPBM22] reconstruct a single part from a clean line drawing, whereas our inputs span a broader range of drawing styles and complexity and our outputs are multi-part design spaces rather than single reconstructions. CADrawer reports quality degrading markedly beyond roughly 15 CAD operations; our programs can be substantially longer, with around 100 operations for the car in Figure 12.

Figure 12: Scope compared to prior sketch-to-CAD systems. CADrawer [LMK*26] and Free2CAD [LPBM22] take clean line drawings of a single part and return one reconstruction. Our inputs span a wide range of drawing styles and complexity, and our outputs are multi-part objects with substantially longer programs, more than 100 CAD operations for the car.
| Ours chosen | p | |
|---|---|---|
| Detail | 77.8% | |
| Proportion | 66.7% | |
| Fidelity | 70.0% | |
| Overall | 75.6% |
Table 7: Human preference pairwise comparison between ours and the single-pass baseline. Each row is the percentage of choices in which our shape was chosen; the baseline takes the remainder, since participants could not abstain. The p-values are from an exact two-sided binomial test against chance. Detail asks which shape models more of the drawing's fine detail, proportion which has the parts at the right size and in the right place, fidelity which better depicts the sketched object in a buildable form, and overall which is the better result all things considered.
6.5. Perceptual Preference Study
We next evaluate the perceptual quality of our generated outputs relative to direct VLM generation. We compare our method with the single-pass VLM baseline in a preference study with 12 participants, each evaluating 15 randomly selected sketches. For each sketch, participants saw the two outputs side by side in randomized, unlabeled order and indicated their preference on detail, proportion, fidelity to the input sketch, and overall quality. Appendix L gives the full protocol.
Participants preferred our outputs on all four criteria (Table 7): 77.8% for detail, 66.7% for proportion, 70.0% for fidelity, and 75.6% overall. All preferences were significantly above chance under an exact two-sided binomial test.
6.6. Exploration Study
We also conducted a study with six participants to investigate how the design space is used. Appendix M gives the full study protocol and findings; we provide a summary here.
Each participant drew two sketches of their own choosing and
11 of 27
explored one with our system and one with a VLM-only baseline, in counterbalanced order (Figure 21). In both conditions, the design space was generated from the participant's sketch. In the baseline, the sketch produced 16 whole-shape generations; participants chose five favorites, edited each with a text instruction, and then explored a design space formed by recombining their segmented components. Because these shapes are generated and segmented independently, their components are not guaranteed to fit together when recombined. Our system instead generates a per-component design space directly from the sketch for selection and composition.
We then conducted a semi-structured interview to understand participants' workflow preferences, how component compatibility affected exploration, and how exploration developed their initial sketches. All participants preferred selecting components to selecting whole shapes: they often liked components from several designs rather than any single generated shape. They also found selection easier than describing desired components in text, since they did not always have the words for the component they wanted. Component compatibility also mattered: floating and overlapping components in the baseline drew immediate negative reactions, and participants said these failures could make it impossible to explore a combination further.
Participants reported that exploring our design spaces often developed their rough sketches and suggested new ideas, although whole-shape variants could sometimes suggest more divergent alternatives by changing the entire design at once. Finally, participants wanted more control over segmentation granularity. Some wanted finer components while others found excessive segmentation distracting, but all requested hierarchical segmentation that would let them open a component and explore it at finer granularity. Figure 22 shows designs participants produced with our system.
7. Discussion and Limitations
We discuss three aspects of our current formulation that shape its scope: component decomposition, geometry representation, and the relations between components.
Part decomposition. We currently segment each object into a single flat set of components. This fixes the granularity of exploration: a designer can vary a component, but cannot open it and explore its subcomponents independently. Participants in our exploratory study explicitly asked for this capability. Future work could support hierarchical decomposition, allowing designers to move between object-, component-, and subcomponent-level exploration.
Geometry representation. Our components are represented as CadQuery programs, which favor prismatic operations such as profiles, extrusions, fillets, and booleans. This representation works less well for objects whose identity lies in freeform surfaces, such as car bodies; for these shapes, our variants primarily change the massing rather than the surface design. Future work could extend our representation with NURBS or other freeform operations while retaining part-level interchangeability.
Constraints and interfaces. Our formulation supports four design relations—attachment, alignment, proportion, and mirroring—and structural constraints that keep components disjoint and make attached pairs meet over a single flat interface. This excludes curved or disconnected interfaces, as well as design requirements such as clearance, function, manufacturability, and more general symmetry. Future work could expand both the relation vocabulary and the interface representation to support a broader range of assemblies and design requirements.
8. Conclusion
We presented Composable CAD, a system for generating a part-based design space from a concept sketch. Generating components independently gives each component its own detail and variants, but those variants are only useful as a design space if they can be freely recombined. We make this possible by recovering the sketch's attachment, alignment, and proportion relations to guide component generation, and by deterministically rewriting the resulting programs so their components meet at shared interfaces. The resulting components are interchangeable across samples, allowing designers to explore, edit, and physically assemble different combinations without regenerating the rest of the design. We hope composable part generation opens new ways to use generative CAD for design exploration.
12 of 27
Y. Li et al. / Composable CAD
(a) Sketch Input

(b) Design Space
| Variant 1 | Variant 2 | Variant 3 | Variant 4 | Variant 5 |
|---|---|---|---|---|
| Body | ||||
| Cabin | ||||
| Base & wheels | ||||
| Light bar | ||||
| bumper |
(c) Example Outputs


Figure 13: Design space for a sketch of an off-road vehicle. From the input sketch (a) we segment the object into components and generate five samples for each, one row per component (b). The designer composes a shape by picking one sample per row, giving possible vehicles; four are shown (c), with insets on the components that differ between them. Every combination assembles into a single valid solid, so the samples can be mixed freely. The remaining result figures follow this format.
(a) Sketch Input
(b) Design Space
| Variant 1 | Variant 2 | Variant 3 | Variant 4 | Variant 5 | |
|---|---|---|---|---|---|
| Base | |||||
| Stand | |||||
| Motor Head | |||||
| Bowl |
(c) Example Outputs




Figure 14: Design space for a stand mixer. The sketch is from OpenSketch [GSH 19], a dataset of professional product design sketches, so it carries dense construction lines and a great deal of detail. Insets highlight the components that differ between the shown outputs.
13 of 27
(a) Sketch Input

(b) Design Space
(c) Example Outputs





Figure 15: Design space for a task chair, drawn with only a few loose strokes. Because the sketch specifies so little, the samples depart from it further and the design space is correspondingly broader. Insets highlight the components that differ between the shown outputs.
(a) Sketch Input
(b) Design Space

(c) Example Outputs




Figure 16: Design space for a desktop computer, segmented into six components. Insets highlight the components that differ between the shown outputs.
14 of 27
Y. Li et al. / Composable CAD
(a) Sketch Input

(b) Design Space
| Variant 1 | Variant 2 | Variant 3 | Variant 4 | Variant 5 | |
|---|---|---|---|---|---|
| Body | |||||
| Left Wheel | |||||
| Right Wheel | |||||
| Hose |
(c) Example Outputs

Figure 17: Design space for a wheeled cart. The sketch is from OpenSketch [GSH 19], drawn with light construction lines. Insets highlight the components that differ between the shown outputs.
(a) Sketch Input
(b) Design Space

| Variant 1 | Variant 2 | Variant 3 | Variant 4 | Variant 5 | |
|---|---|---|---|---|---|
| Base | |||||
| Hub | |||||
| Collar | |||||
| Fasteners |
(c) Example Outputs

Figure 18: Design space for a mechanical flange. The sketch is from OpenSketch [GSH 19], drawn with heavy over tracing that leaves the outlines ambiguous. Insets highlight the components that differ between the shown outputs.
(a) Change Component

(b) Seating the component

(c) Different borrowed components

Figure 19: Editing a component in 3D. Instead of drawing a part, the designer borrows a finished one from another design (a), here a base at a different size and proportion than the chair it will join. Placed directly it does not meet the chair (b, left inset); we assign it the connecting surfaces of the part it replaces and run the deterministic rewrite, which rescales and seats it flush (b, right inset). Other borrowed parts, a backrest, a seat pan, and a pair of armrests, seat into the chair the same way (c).
15 of 27

Figure 20: Editing a component from a text prompt. Instead of drawing or borrowing a part, the designer describes it, and the model generates a headstock from the prompt (a). Placed directly it misses the neck (b, left inset); assigning it the connecting surfaces of the part it replaces and running the deterministic rewrite seats it flush (b, right inset). Different prompts yield different headstocks, each seating into the same fixed guitar (c).
Condition 1: Baseline
(a) User make text edits on selected shapes

(b) The baseline system segment the shapes and provide the exploration shape
Condition 2: Ours

Figure 21: The two conditions in the exploration study. In the baseline, the participant issues a single text instruction on each shape they picked from the gallery (a), and the system then segments those shapes and presents them as a design space to combine from (b). Because each shape was generated and segmented on its own, the parts do not meet: the insets show an arm and a head floating clear of the body. Our condition presents a per-component design space directly (c), and any selection composes into one solid, so the parts meet flush wherever they join (d).
16 of 27
Y. Li et al. / Composable CAD

Figure 22: Shapes participants produced with our system during the study. Each participant drew a sketch on a tablet (left) and composed a shape from the resulting design space (right). The insets show where components meet: the strap and case of the watch, the barrel and mount of the telescope, the arms and frame of the glasses, the cup and its handle. Every joint is flush, with no gap or overlap, although each component was generated on its own and the participant was free to combine any sample with any other.
17 of 27
References
[AAMJ26] ATAEI M., ASKARI F., MALEKSHAN K. R., JAYARAMAN P. K.: Zero-to-CAD: Agentic synthesis of interpretable CAD programs at million-scale without real data. arXiv preprint arXiv:2604.24479 (2026). 2
[Ant26] ANTHROPIC: Claude Opus 4.8. https://www.anthropic.com/news/claudo-opus-4-8, 2026. 1
[ATZ*25] ALRASHEDY K., TAMBWEKAR P., ZAIDI Z. H., LANG-WASSER M., XU W., GOMBOLAY M.: Generating CAD code with vision-language models for 3D designs. In International Conference on Learning Representations (ICLR) (2025). 2
[BBS08] BAE S.-H., BALAKRISHNAN R., SINGH K.: ILoveSketch: As-natural-as-possible sketching system for creating 3D curve models. In Proceedings of the 21st Annual ACM Symposium on User Interface Software and Technology (UIST '08) (2008), ACM, pp. 151–160. doi:10.1145/1449715.1449740.2
[BDM*20] BHUNIA A. K., DAS A., MUHAMMAD U. R., YANG Y., HOSPEDALES T. M., XIANG T., GRYADITSKAYA Y., SONG Y.-Z.: Pixelor: A competitive sketching ai agent. so you think you can sketch? ACM Transactions on Graphics (Proc. SIGGRAPH Asia) 39, 6 (2020). doi:10.1145/3414685.3417840.7
[BH20] BAN S., HYUN K. H.: 3D computational sketch synthesis framework: Assisting design exploration through generating variations of user input sketch and interactive 3D model reconstruction. Computer-Aided Design 120 (2020), 102789. doi:10.1016/j.cad.2019.102789.1
[BLBF26] BARKLEY J., LOGHMANI R., BARATI FARIMANI A.: CAD-Smith: Multi-agent CAD generation with programmatic geometric validation. arXiv preprint arXiv:2603.26512 (2026). 2
[Bux07] BUXTON B.: Sketching User Experiences: Getting the Design Right and the Right Design. Morgan Kaufmann, San Francisco, 2007. 1, 3
[CF25] CHEREDDY S. R., FEMIANI J.: Sketchdnn: Joint continuous-discrete diffusion for CAD sketch generation. In Proceedings of the 42nd International Conference on Machine Learning (ICML) (2025), vol. 267 of Proceedings of Machine Learning Research, PMLR, pp. 10199–10215. doi:10.48550/arXiv.2507.11579.2
[CSMS13] CORDIER F., SEO H., MELKEMI M., SAPIDIS N. S.: Inferring mirror symmetric 3d shapes from sketches. Computer Aided Design 45, 2 (2013). 2
[CXK*24] CHEN B., XU Z., KIRMANI S., ICHTER B., DRIESS D., FLORENCE P., SADIGH D., GUIBAS L., XIA F.: Spatialvlm: Endowing vision-language models with spatial reasoning capabilities. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) (2024). 4, 5
[DAHA25] DORIS A. C., ALAM M. F., HEYRANI NOBARI A., AHMED F.: CAD-Coder: An open-source vision-language model for computer-aided design code generation. In Proceedings of the ASME International Design Engineering Technical Conferences (IDETC-CIE) (2025). 2
[DIP*18] DU T., INALA J. P., PU Y., SPIELBERG A., SCHULZ A., RUS D., SOLAR-LEZAMA A., MATUSIK W.: Inversecsg: Automatic conversion of 3d models to csg trees. ACM Transactions on Graphics (Proc. SIGGRAPH Asia) 37, 6 (2018). 2
[EMA24] EDWARDS K. M., MAN B., AHMED F.: Sketch2prototype: Rapid conceptual design exploration and prototyping with generative AI. Proceedings of the Design Society 4 (2024), 1989–1998. doi:10.1017/pds.2024.201.1
[ES07] EISSEN K., STEUR R.: Sketching: Drawing Techniques for Product Designers. BIS Publishers, Amsterdam, 2007. 1
[FLFM26] FARUQI F., LIU S. J., FITZMAURICE G., MATEJKA J.: Compos3d: Interactive part-based composition for creative control in generative 3d models. arXiv preprint arXiv:2607.12193 (2026). 3
[FNY*26] FAN F., NI J., YIN X., WANG S., LU X., ZOU Q., TONG R., TANG M., DU P.: CADDesigner: Conceptual CAD model generation with a general-purpose agent. Computer-Aided Design 198 (2026), 104087. doi:10.1016/j.cad.2026.104087.2
[Gem25] GEMINI TEAM, GOOGLE: Gemini 2.5: Pushing the frontier with advanced reasoning, multimodality, long context, and next generation agentic capabilities. arXiv preprint arXiv:2507.06261 (2025). 1
[GHL*20] GRYADITSKAYA Y., HÄHNLEIN F., LIU C., SHEFFER A., BOUSSEAU A.: Lifting freehand concept sketches into 3d. TOG 39, 6 (2020). doi:10.1145/3414685.3417851.2
[GLP*22] GUO H., LIU S., PAN H., LIU Y., TONG X., GUO B.: Complexgen: Cad reconstruction by b-rep chain complex generation. ACM Transactions on Graphics (SIGGRAPH) 41, 4 (2022). 2
[Goo26a] GOOGLE: Nano banana image generation. https://ai.google.dev/gemini-api/docs/image-generation, 2026. Gemini API documentation. Accessed September 13, 2026. 20
[Goo26b] GOOGLE DEEPMIND: Gemini 3.1 pro, 2026. 9, 20, 21
[GRL*24] GU A., ROZIÈRE B., LEATHER H., SOLAR-LEZAMA A., SYNNAEVE G., WANG S. I.: Cruxeval: A benchmark for code reasoning, understanding and execution. In Proceedings of the 41st International Conference on Machine Learning (ICML) (2024). 5
[GSH*19] GRYADITSKAYA Y., SYPESTEYN M., HOFTJIZER J. W., PONT S., DURAND F., BOUSSEAU A.: Opensketch: A richly-annotated dataset of product design sketches. ACM Transactions on Graphics (Proc. SIGGRAPH Asia) 38, 6 (2019). doi:10.1145/3355089.3356533.7, 12, 14
[HGSB22] HÄHNLEIN F., GRYADITSKAYA Y., SHEFFER A., BOUSSEAU A.: Symmetry-driven 3d reconstruction from concept sketches. ACM SIGGRAPH 2022 Conference Proceedings (2022). doi:10.1145/3528233.3530723.2
[HKYM17] HUANG H., KALOGERAKIS E., YUMER E., MECH R.: Shape synthesis from sketches via procedural models and convolutional networks. IEEE Transactions on Visualization and Computer Graphics (TVCG) 23, 8 (2017), 2003–2013. doi:10.1109/TVCG.2016.2597830.2
[JBX*20] JONES R. K., BARTON T., XU X., WANG K., JIANG E., GUERRERO P., MITRA N. J., RITCHIE D.: ShapeAssembly: Learning to generate programs for 3D shape structure synthesis. ACM Transactions on Graphics 39, 6 (2020), 234:1–234:20. 3
[JCG*21] JONES R. K., CHARATAN D., GUERRERO P., MITRA N. J., RITCHIE D.: ShapeMOD: Macro operation discovery for 3D shape programs. ACM Transactions on Graphics 40, 4 (2021), 153:1–153:16. 3
[JGMR23] JONES R. K., GUERRERO P., MITRA N. J., RITCHIE D.: ShapeCoder: Discovering abstractions for visual programs from unstructured primitives. ACM Transactions on Graphics 42, 4 (2023), 49:1–49:17. 3
[KDA*24] KHAN M. S., DUPONT E., ALI S. A., CHERENKOVA K., KACEM A., AOUADA D.: CAD-SIGNet: CAD language inference from point clouds using layer-wise sketch instance guided attention. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) (2024), pp. 4713–4722. 2
[KGC*17] KAZI R. H., GROSSMAN T., CHEONG H., HASHEMI A., FITZMAURICE G.: DreamSketch: Early stage 3D design explorations with sketching and generative design. In Proceedings of the 30th Annual ACM Symposium on User Interface Software and Technology (UIST '17) (2017), ACM, pp. 401–414. doi:10.1145/3126594.3126662.3
[KSS*24] KHAN M. S., SINHA S., SHEIKH T. U., STRICKER D., ALI S. A., AFZAL M. Z.: Text2CAD: Generating sequential CAD designs from beginner-to-expert level text prompts. In Advances in Neural Information Processing Systems (NeurIPS) (2024), vol. 37, pp. 7552–7579. 2
[LB25] LIU C., BESSMELTEV M.: State-of-the-art report in sketch processing. Computer Graphics Forum (2025). 2
18 of 27
Y. Li et al. / Composable CAD
[LCLT08] LIU J., CAO L., LI Z., TANG X.: Plane-based optimization for 3d object reconstruction from single line drawings. IEEE Transaction on Pattern Analysis Machine Intelligence 30, 2 (2008), 315–327. 2
[LKW*25] LIU V., KAZI R. H., WEI L.-Y., FISHER M., LANGLOIS T., WALKER S., CHILTON L.: LogoMotion: Visually-grounded code synthesis for creating and editing animation. In Proceedings of the 2025 CHI Conference on Human Factors in Computing Systems (2025), Association for Computing Machinery. doi:10.1145/3706598.3714155.4
[LMAR24] LI Y., MA T., ALJUMAYAAT Z., RITCHIE D.: PossibleImpossibles: Exploratory procedural design of impossible structures. Computer Graphics Forum 43, 2 (2024), e15052. 3
[LMFA24] LIAO Y.-H., MAHMOOD R., FIDLER S., ACUNA D.: Reasoning paths with reference objects elicit quantitative spatial reasoning in large vision-language models. In Proceedings of the Conference on Empirical Methods in Natural Language Processing (EMNLP) (2024). 4, 5
[LMK*26] LI Y., MANFREDI G., KRIEL H., HAO C., XU X., BOUSSEAU A., RITCHIE D.: CADrawer: Autoregressive CAD generation from 3D sketches. Computer Graphics Forum (2026), e70352. doi:10.1111/cgf.70352. 2, 10
[LML*25] LI J., MA W., LI X., LOU Y., ZHOU G., ZHOU X.: CAD-Llama: Leveraging large language models for computer-aided design parametric 3D model generation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) (2025), pp. 18563–18573. 2
[LOWS24] LIU Y., OBUKHOV A., WEGNER J. D., SCHINDLER K.: Point2cad: Reverse engineering cad models from 3d point clouds. CVPR (2024), 3763–3772. doi:10.48550/arXiv.2312.04962.2
[LPBM20] LI C., PAN H., BOUSSEAU A., MITRA N. J.: Sketch2cad: Sequential cad modeling by sketching in context. TOG 39, 6 (2020). doi:10.1145/3414685.3417807.2
[LPBM22] LI C., PAN H., BOUSSEAU A., MITRA N. J.: Free2cad: Parsing freehand drawings into cad commands. TOG 41, 4 (2022). doi: 10.1145/3528223.3530133.2, 10
[LS96] LIPSON H., SHPITALNI M.: Optimization-based reconstruction of a 3d object from a single freehand line drawing. Computer-Aided Design 28, 8 (1996). 2
[LWJ*22] LAMBOURNE J. G., WILLIS K., JAYARAMAN P. K., ZHANG L., SANGHI A., MALEKSHAN K. R.: Reconstructing editable prismatic cad from rounded voxel models. In SIGGRAPH Asia Conference Papers (2022). 2
[LYL*25] LEE S.-J., YOON J., LEE S.-H., LEE J. H., BAE S.-H.: 3d sketching + 2D generative ai for car exterior design. In Proceedings of the 38th Annual ACM Symposium on User Interface Software and Technology (UIST '25) (2025), ACM, pp. 1–14. doi:10.1145/3746059.3747609.3
[LYZ*24] LI H., YE Y., ZHANG Z., YU W., ZHU W.: A comparative analysis of CAD modeling approaches for design solution space exploration. Advances in Mechanical Engineering 16, 3 (2024). 1
[MGB*18] MATEJKA J., GLUECK M., BRADNER E., HASHEMI A., GROSSMAN T., FITZMAURICE G.: Dream lens: Exploration and visualization of large-scale generative design datasets. In Proceedings of the SIGCHI Conference on Human Factors in Computing Systems (CHI) (2018), pp. 1–12. 3
[MKC*25] MALLIS D., KARADENIZ A. S., CAVADA S., RUKHOVICH D., FOTEINOPOULOU N., CHERENKOVA K., KACEM A., AOUADA D.: CAD-Assistant: Tool-augmented VLLMs as generic CAD task solvers. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV) (2025). 2
[MWH*06] MÜLLER P., WONKA P., HAEGLER S., ULMER A., VAN GOOL L.: Procedural modeling of buildings. ACM Transactions on Graphics 25, 3 (2006), 614–623. 3
[NGDGA*16] NISHIDA G., GARCIA-DORADO I., G. ALIAGA D., BENES B., BOUSSEAU A.: Interactive sketching of urban procedural models. ACM Transactions on Graphics (Proc. SIGGRAPH) (2016). 2
[OMSR25] OCKER F., MENZEL S., SADIK A., RIOS T.: From idea to CAD: A language model-driven multi-agent system for collaborative design. arXiv preprint arXiv:2503.04417 (2025). 2
[PCV16] PLUMED R., COMPANY P., VARLEY P. A.: Detecting mirror symmetry in single-view wireframe sketches of polyhedral shapes. Computers & Graphics 59 (2016), 1–12. 2
[PMKB23] PUHACHOV I., MARTENS C., KRY P. G., BESSMELTEV M.: Reconstruction of machine-made shapes from bitmap sketches. ACM Transactions on Graphics (Proc. SIGGRAPH Asia) 42, 6 (2023). 2
[QGS*21] QI A., GRYADITSKAYA Y., SONG J., YANG Y., QI Y., HOSPEDALES T. M., XIANG T., SONG Y.-Z.: Toward fine-grained sketch-based 3D shape retrieval. IEEE Transactions on Image Processing 30 (2021), 8595–8606. 7
[QGXS22] QI A., GRYADITSKAYA Y., XIANG T., SONG Y.-Z.: One sketch for all: One-shot personalized sketch segmentation. IEEE Transactions on Image Processing 31 (2022), 2673–2682. doi:10.1109/TIP.2022.3160076.20
[RDM*25] RUKHOVICH D., DUPONT E., MALLIS D., CHERENKOVA K., KACEM A., AOUADA D.: CAD-Recode: Reverse engineering CAD code from point clouds. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV) (2025). 2
[RGJ*23] RITCHIE D., GUERRERO P., JONES R. K., MITRA N. J., SCHULZ A., WILLIS K. D. D., WU J.: Neurosymbolic models for computer graphics. Computer Graphics Forum 42, 2 (2023), 545–568. 2
[SCM*23] SHI F., CHEN X., MISRA K., SCALES N., DOHAN D., CHI E., SCHÄRLI N., ZHOU D.: Large language models can be easily distracted by irrelevant context. In Proceedings of the 40th International Conference on Machine Learning (ICML) (2023). 4
[SGL*18] SHARMA G., GOYAL R., LIU D., KALOGERAKIS E., MAJI S.: Csgnet: Neural shape parser for constructive solid geometry. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR) (2018). 2
[SGZ*26] SHUI Y., GUAN Y., ZHANG Z., HU J., ZHANG J., XU D., YU Q.: ArtiCAD: Articulated CAD assembly design via multi-agent code generation. arXiv preprint arXiv:2604.10992 (2026). 3
[SKSK09] SCHMIDT R., KHAN A., SINGH K., KURTENBACH G.: Analytic drawing of 3d scaffolds. In ACM transactions on graphics (Proc. SIGGRAPH Asia) (2009), vol. 28. 2
[SLK*20] SHARMA G., LIU D., KALOGERAKIS E., MAJI S., CHAUDHURI S., MÉCH R.: Parsenet: A parametric surface fitting network for 3d point clouds. In Proc. European Conference on Computer Vision (ECCV) (2020). 2
[SLX*25] SUN Y., LI J., XU Z., ZHANG J., LIU X., ZHANG D., LU G.: Sketch2seq: Reconstruct CAD models from feature-based sketch segmentation. IEEE Transactions on Visualization and Computer Graphics 31, 10 (2025), 8214–8230. doi:10.1109/TVCG.2025.3566544.2
[SS14] SADRI B., SINGH K.: Flow-complex-based shape reconstruction from 3D curves. ACM Transactions on Graphics 33, 2 (2014), 20:1–20:15. doi:10.1145/2560328.2
[SXZ*17] SCHULZ A., XU J., ZHU B., ZHENG C., GRINSPUN E., MATUSIK W.: Interactive design space exploration and optimization for CAD models. ACM Transactions on Graphics 36, 4 (2017), 157:1–157:14. 1, 3
[TLS*19] TIAN Y., LUO A., SUN X., ELLIS K., FREEMAN W. T., TENENBAUM J. B., WU J.: Learning to infer and execute 3d shape programs. In International Conference on Learning Representations (ICLR) (2019). doi:10.48550/arXiv.1901.02875.2
[TVY*25] TANG M., VINKER Y., YAN C., ZHANG L., AGRAWALA M.: Instance segmentation of scene sketches using natural image priors. In
19 of 27
ACM SIGGRAPH 2025 Conference Papers (2025), Association for Computing Machinery. doi:10.1145/3721238.3730606.20
[WXW18] WU Q., XU K., WANG J.: Constructing 3d csg models from 3d raw point clouds. Computer Graphics Forum 37, 5 (2018). 2
[WXZ21] WU R., XIAO C., ZHENG C.: Deepcad: A deep generative network for computer-aided design models. ICCV (2021). doi:10.48550/arXiv.2105.09492.2
[WYSB25] WANG R., YUAN Y., SUN S., BIAN J.: Text-to-CAD generation through infusing visual feedback in large language models. In Proceedings of the 42nd International Conference on Machine Learning (ICML) (2025), vol. 267 of Proceedings of Machine Learning Research, PMLR, pp. 65326–65345. 2
[WZN*19] WU C., ZHAO H., NANDI C., LIPTON J. I., TATLOCK Z., SCHULZ A.: Carpentry compiler. ACM Transactions on Graphics 38, 6 (2019), 195:1–195:14. 3
[WZW*24] WANG H., ZHAO M., WANG Y., QUAN W., YAN D.-M.: VQ-CAD: Computer-aided design model generation with vector quantized diffusion. Computer Aided Geometric Design 111 (2024), 102327. doi:10.1016/j.cagd.2024.102327.2
[XCS*14] XU B., CHANG W., SHEFFER A., BOUSSEAU A., MCCRAE J., SINGH K.: True2form: 3d curve networks from 2d sketches via selective regularization. ACM Transactions on Graphics (SIGGRAPH 2014 Papers) 33, 4 (2014). doi:10.1145/2601097.2601128.2
[XPC*21] XU X., PENG W., CHENG C.-Y., WILLIS K. D., RITCHIE D.: Inferring cad modeling sequences using zone graphs. CVPR (2021). doi:10.48550/arXiv.2104.03900.2
[XSL*22] XIAO C., SU W., LIAO J., LIAN Z., SONG Y.-Z., FU H.: Differsketching: How differently do people sketch 3d objects? ACM Transactions on Graphics (Proc. SIGGRAPH Asia) 41, 6 (2022). doi:10.1145/3550454.3555493.7
[XWZ*24] XU J., WANG C., ZHAO Z., LIU W., MA Y., GAO S.: CAD-MLLM: Unifying multimodality-conditioned CAD generation with MLLM. arXiv preprint arXiv:2411.04954 (2024). 2
[YDSG21] YU X., DIVERDI S., SHARMA A., GINGOLD Y.: ScaffoldSketch: Accurate industrial design drawing in vr. In Proceedings of ACM Symposium on User Interface Software and Technology (2021), UIST, ACM, pp. 372–384. doi:10.1145/3472749.3474756.2
[YLMB26] YOON J., LEE S.-J., MA D., BAE S.-H.: Component-wise sketching and generation for car interior design. In Proceedings of the 2026 CHI Conference on Human Factors in Computing Systems (CHI '26) (2026), ACM, pp. 1–14. doi:10.1145/3772318.3790912.3
[YLT13] YANG L., LIU J., TANG X.: Complex 3d general object reconstruction from line drawings. In IEEE Int. Conference on Computer Vision (2013). 2
[YSH24] YUAN Z., SHI J., HUANG Y.: OpenECAD: An efficient visual language model for editable 3D-CAD design. Computers & Graphics 124 (2024), 104048. 2
[YZF*21] YANG L., ZHUANG J., FU H., WEI X., ZHOU K., ZHENG Y.: SketchGNN: Semantic sketch segmentation with graph neural networks. ACM Transactions on Graphics 40, 3 (2021). doi:10.1145/3450284.20
[ZSW*25] ZHANG Z., SUN S., WANG W., CAI D., BIAN J.: FlexCAD: Unified and versatile controllable CAD generation with fine-tuned large language models. In International Conference on Learning Representations (ICLR) (2025). 2
20 of 27
Y. Li et al. / Composable CAD
| Role | Specialization | Location |
|---|---|---|
| Professional | Design studio | New York |
| Professional | Freelance design | Shanghai |
| Student | Industrial Design/ME | Colombia |
Table 8: Formative study participants. All were industrial designers; institution names are anonymized.
Appendix A: Formative Study
To ground our system design in real practice, we conducted semi-structured interviews with three industrial designers spanning a range of career stages and specializations (Table 8). We report two findings.
Design has two phases. Participants described their work as two phases: an early phase of brainstorming and loose sketching, where they explore many ideas quickly, and a later phase of building and adjustment, where they realize the shape in 3D and vary its parameters to produce different designs. Our system targets the second phase, where designers want to build the shape from the input sketch quickly while also exploring variants of it.
Exploration is the bottleneck. Participants told us that producing variants is time-consuming. Adjusting parameters alone is straightforward, but the variants worth exploring usually require changing the program itself, adding or reworking detail, which is far more effort. This is the work our system aims to take on for them.
Feature Requests We list the core capabilities participants asked for, which motivated our system design and are what our system is built to provide.
-
Quick building from a sketch. Given the input sketch, the designer can obtain the 3D shape quickly.
-
Imagine and fill in. Where the sketch is loose or silent, the system plausibly completes what it leaves unspecified.
-
Part-based exploration in 3D. Designers explore in 3D without committing to a single idea, so the system offers alternatives per part that recombine freely rather than one whole-shape variant.
-
Multi-part compatibility. Independently explored parts stay mutually compatible, so a designer, or a collaborator owning one part, can revise a part and still assemble a valid whole.
Appendix B: Sketch Segmentation
Sketch segmentation has been widely studied [YZF21, QGXS22, TVY25]. We segment the input sketch in two API calls: one to identify semantic parts and one to generate a color-coded segmentation mask. We first give the sketch to Gemini 3.1 Pro [Goo26b] and prompt it to list the object's semantic parts; for the chair, these are the base, column, seat pan, backrest, and the two armrests. The part-list prompt is:
You are given a single freehand concept sketch of one object. List the object's semantic parts: the parts a designer would model and vary separately. Output one part per line, as a short lowercase noun label, and nothing else.
Geometric Prior

Figure 23: Geometric prior extraction, illustrated on a chair sketch. (a) T-junctions detected among the strokes (magenta), marking where parts cross. (b) The recovered coordinate axes: world z from the page vertical (red), and the two horizontal axes voted from the junction-incident stroke directions (blue, green). (c) Alignment relations, where part faces and centers that coincide along an axis are linked, with the participating parts labeled. (d) Per-part proportions, read as the x;y;z extents of each part's box in the recovered frame.
Merge duplicate instances only if they are identical; otherwise label them separately (e.g. "left armrest", "right armrest").
We then provide the sketch, part list, and color legend to Gemini 3 Pro Image Preview (gemini-3-pro-image-preview) [Goo26a], requesting a color-coded mask with the same dimensions as the input. We use the image returned by the API as the segmentation mask and recover each part's region by extracting the pixels of its assigned color. The mask prompt is:
You are given the same sketch and a list of its parts: {part_list}. Return a single image with the exact same width and height as the input. Paint the region of each part in a solid, flat, distinct color, using this assignment: {color_legend}. Fill each part's full area, keep boundaries tight to the drawn strokes, and paint the background pure black (0,0,0). Do not draw outlines, labels, gradients, shading, or anti-aliased edges: use only the exact assigned colors and black.
Appendix C: Geometric Prior
We recover the design constraints from the vectorized strokes and the part masks in four deterministic passes. Junctions tell us where strokes cross and which parts touch; from the junctions we recover the object's coordinate axes; and against those axes we compute the alignment and proportion relations, since both are defined per axis. We first crop the sketch to its drawn content and resize it into a 256 × 256 box, with a margin of 20 pixels on each side, so every sketch is processed at the same resolution and all thresholds below are stated in pixels of that box.
Junctions. A junction is where one stroke meets another, and it is the primary 2D cue for which parts contact (Figure 23a). For an endpoint of stroke A meeting stroke B, we register a T-junction when the strokes differ in direction by at least 25° (so a collinear break is not counted), the endpoint projects to the interior of B at parameter t ∈ [0.15, 0.85] (a mid-stroke hit, not B's endpoint), and
21 of 27
the perpendicular distance from the endpoint to is at most 8px. Near-duplicate junctions are merged within small pixel clusters. We then attribute each junction to parts with a KD-tree over the masks, assigning it to its two nearest parts when both lie within 13px. Votes accumulate over unordered part pairs, and every voted pair emits an attachment relation, promoted to a resting relation when the vertical offset dominates ().
Axes. The relations we extract are all stated per world axis, so we next recover the object's coordinate frame (Figure 23b). The vertical axis is fixed by convention: designers draw the up-direction vertical on the page, so we take world to project onto the image's vertical direction. The two horizontal axes are recovered by voting with the junctions, since at each junction the two crossing strokes are corner edges rather than arbitrary marks and so are strong evidence for the axis directions. We collect the direction of every junction-incident stroke, drop those within of vertical, and cluster the rest by angle, each junction contributing a vote to its cluster. The two highest-voted clusters give the horizontal axis directions, which we orthogonalize against to form the frame. A part's extent along an axis is then read by projecting its mask onto that axis direction, which is what the following two passes use.
Alignment. With the axes fixed, we find which parts line up along each (Figure 23c). Alignment is stated between anchors: on a given axis, a part contributes three of them, its minimum, its center, and its maximum, so that a designer's flush edge, shared centerline, or edge-to-center placement are all expressed in the same way. We project every part's mask onto the axis, collect the anchors of all parts, and cluster their values by complete linkage: a new cluster starts whenever a value exceeds the current cluster's minimum by more than 7px, so each cluster spans at most 7px and no chaining occurs. A cluster holding anchors from at least two distinct parts is kept, and each pair of parts within it emits an alignment relation on that axis, recording which anchor each side contributed and the residual offset between them.
Proportion. For each part we compute an shape hint from its extent along the three axes (Figure 23d), read in the recovered frame rather than from the silhouette, since a single isometric view cannot separate the three axes. We divide the three extents by the longest, so the longest axis is 1.0, and snap each ratio to a 0.1 grid floored at 0.1.
Appendix D: Design Constraints as Functions
Each design constraint from the sketch is compiled into a small function over the generated program, so that checking a relation is just executing the programs. Figure 24 shows the three stroke-derived design constraints: proportion, attachment, and alignment; mirroring comes from the segmentation and is checked the same way. To evaluate a program, we execute it to obtain the parts, then call each relation's relation function on them. The result is a per-relation pass or fail with its residual, which is the report returned to the VLM (Section 3) as natural language feedback.
Design constraints as Functions
def proportion(a, x, y, z):
""^a's bbox side ratio ~ x:y:z (normalised to longest = 1).""
def _c(parts):
return _proportion(parts[a], (x, y, z))
return Relation("proportion", (a), _, c, f"(a) bbox ~ {x}:(y):(z)")
def attachment(a, b, axis=None, sign=0):
""^a and b touch; if axis/sign given, b sits on the +/-axis side of a.""
def _c(parts):
return _attached(parts[a], parts[b], axis, sign)
side = f" ({b} on ('+' if sign > 0 else '-') {axis} side)" if axis else ""
return Relation("attachment", (a, b), _, c, f"(a) <-> (b) touch(side)")
def alignment(a, feat_a, b, feat_b, axis):
""^a.feat_a and b.feat_b line up on 'axis' (feat_in (min,center,max)).""
def _c(parts):
return _aligned(parts[a], feat_a, parts[b], feat_b, axis)
return Relation("alignment", (a, b), _, c,
f"(a).{feat_a}.{axis} = {b}.{feat_b}.{axis}")
Figure 24: Design constraints compiled as functions. Each relation extracted from the sketch becomes a Relation carrying a predicate that is run against the executed program, returning whether the relation holds and by how much.
Appendix E: Proxy Generation
We generate the initial proxy with Gemini 3.1 Pro (gemini-3.1-pro) [Goo26b], giving it the input sketch and the prompt:
You are given a concept sketch of a single object and the list of its parts: {part_list}. Write a CadQuery program that reconstructs the object as a proxy. Represent each part as one simple primitive volume, and define exactly one function per part, each named after its part and returning that part's solid (for example, def back-rest() -> cq.Workplane). Place every part in a shared coordinate frame, sized and positioned so that the proxies together match the object in the sketch: its proportions, the way the parts are aligned, and which parts meet. Do not add detail or features; one primitive per part is enough. Render your program and compare the result against the sketch before finalizing. Return only the CadQuery program, with no explanation.
We run the model with medium thinking, and let it render its program to 2D from four isometric views and compare the renders against the input sketch, revising until the two agree. We cap this initial pass at a three minute budget and stop when it is reached. The result is the initial proxy, which we then check against the design constraints and return as feedback (Section 3).
Appendix F: Sampling
We generate several samples per part with Gemini 3.1 Pro (gemini-3.1-pro) [Goo26b], giving it only that part's proxy program, the CadQuery code that produces its proxy volume, and the prompt:
Below is a CadQuery program that produces a simple proxy volume for the {part} of a {object}. Edit it into
22 of 27
Y. Li et al. / Composable CAD
(a) Concave Surface

(b) Convex Surface

Figure 25: The two surface types and why the choice between cut and union depends on them. Each row shows a part that has already been translated and scaled to reach its connecting surfaces (red); only the last operation differs. (a) A concave surface falls short of the plane. Our union fills the gap (left), while the alternative, a cut, must slice the part down to where its surface already reaches, flattening the whole face and removing everything above it (right). (b) A convex surface protrudes past the plane. Our cut trims the thin excess (left), while the alternative, a union, wraps material around the bulge up to the plane, replacing the curved face with a flat one (right). In both cases the alternative reduces the surface to a bare plane and discards its features.
a detailed, realistic version of the same part. Keep the part's overall placement and extent close to the proxy, and add the geometry, features, and detail the proxy leaves out. Refine and extend the existing operations rather than rewriting the program from scratch. Return only the edited CadQuery program, with no explanation.
Because the input is CadQuery code rather than a description, the model works by editing the existing program, refining and extending the operations that produce the proxy, not writing a new one. We draw five samples per part from independent calls and control their diversity through the sampling temperature, using 0.1, 0.2, 0.3, 0.4, and 0.5, so the lowest stays close to a faithful elaboration of the proxy and the highest departs furthest from it. All parts and all samples are generated in parallel.
Appendix G: Cut or Union: Why the Choice Depends on the Surface
To form a flat face at a connecting surface, the rewrite either cuts material away or adds it. We choose the operation based on how the part's surface sits relative to the connecting surface. Taking the wrong operation destroys the geometry the sampling produced; Figure 25 shows the counterexamples.
For a concave surface, one that falls short of the connecting surface, we union: this fills only the shallow gap and leaves the surface intact. A cut cannot trim there, since the material is already below
it; to expose a flat face it must slice the part down to the lowest point the surface reaches, which flattens the whole footprint into a bare plane and removes every feature that sat above it. For a convex surface, one that protrudes past the connecting surface, the situation is reversed and we cut, removing only the thin part that overshoots and leaving the rest of the surface as it was. A union instead wraps added material around the protruding geometry, so the curved face is buried and the interface becomes a flat block, again erasing the feature. In both cases the alternative reduces a shaped surface to a featureless plane, so we take the operation that keeps the surface and changes the part as little as possible.
We classify the surface locally, only based on the geometry at the connecting surface. Over the region where the two parts meet, we sample the part's surface and measure how far it reaches past the connecting surface, calling it convex when the largest such distance exceeds a small tolerance and concave otherwise.
Appendix H: Proof of the Composability Proposition
We make the setting of the proposition explicit. Every proxy is an axis-aligned box, and the proxies have pairwise disjoint interiors. Each connecting surface is a planar region of positive area on a face of and is the entire intersection with its attached neighbor. The two proxies lie on opposite sides of its plane . The attachment graph is connected, and the proxies and interfaces are fixed across samples.
Let be the solid after Steps 1 and 2. We assume that its material inside forms a nonempty connected solid. At every interface handled by a convex cut, this in-box material already contains the entire . We also assume that every part of outside lies in a region removed by one of the convex cuts, and that each concave extrusion produces a solid inside that meets the part when added. These assumptions restrict the samples to which the proposition applies.
Step 3 retains the two cases of Algorithm 1. At a convex surface, the cut removes material on the outward side of . The material already covering lies inside and is retained, so the cut exposes a flat face containing . At a concave surface, the added extrusion has as a face in , so its union with the part also covers . Later operations preserve this coverage: every cut acts outside , and a union cannot remove an existing interface.
All material added by the unions lies inside , and all original material outside is removed by the cuts. Hence the final output satisfies , establishing (i). The two branches establish for every , giving (ii). Since each supports , containment also gives (iii): no material lies on the outward side of the interface plane.
The output is connected as well. The cuts leave the original in-box solid intact. Each added extrusion lies inside and meets the current part, so it meets the current in-box material. Thus every union preserves the connectedness of that material. Once all exterior material has been removed, the remaining solid is therefore connected.
The composition properties follow. Every selected solid lies inside its own proxy, so their interiors are pairwise disjoint. For an
23 of 27
(a) Adding Joints

(b) Assembled Parts

Figure 26: Joints between parts. (a) At each connecting surface we add a peg on one part and a matching socket on the other, both centered on the surface and running along its normal. (b) The two parts assembled, with the joint hidden inside and the outer geometry undisturbed.
attached pair sharing ,
Thus the pair meets exactly along , with no gap or volumetric overlap. Every selected solid is connected, and the connected attachment graph joins them through these shared interfaces, so their union is connected.
The argument applies to any selection of samples satisfying the stated assumptions for which the rewrite completes within the material budget. The budget does not weaken the resulting geometric properties. □
Appendix I: Joints
To hold assembled parts together we add a peg-and-socket joint at every connecting surface (Figure 26). The joint is centered on the connecting surface and runs along its normal, so it is hidden once the parts are assembled and does not disturb the outer geometry.
We first choose which side takes the socket. Drilling along the normal is limited by how much material lies behind the surface on each side, so we take the side that admits the deeper hole and place the socket there; the matching peg is added to the other part. The socket diameter is , where is the diagonal of the connecting surface, so the joint scales with the interface but never falls below a printable size. Its depth is the smaller of 2 cm and the depth the material behind the surface permits. The peg is generated as the same cylinder on the opposite part, so the two are congruent by construction.
Appendix J: Setup Prompts
The prompts for the two VLM baselines of Section 6.2. The prompt for , which produces the whole object in one pass, is:
You are given a concept sketch of a single object. Write one CadQuery program that reconstructs the entire object. First decide the object's semantic parts, the parts a designer would model separately. Then define exactly one function per part,
each named after its part and returning that part's solid (for example, def backrest() -> cq.Workplane). Place every part in a shared coordinate frame so that together they form the object shown in the sketch, with adjacent parts meeting where they should and the proportions matching the drawing. Return only the CadQuery program, with no explanation.
uses two prompts. The first asks for the proxy:
You are given a concept sketch of a single object. Write a CadQuery program that reconstructs the object as a proxy. First decide the object's semantic parts, the parts a designer would model separately. Represent each as one simple primitive volume, and define exactly one function per part, each named after its part and returning that part's solid (for example, def backrest() -> cq.Workplane). Place every part in a shared coordinate frame, sized and positioned so that the proxies together match the object in the sketch: its proportions, the way the parts are aligned, and which parts meet. Do not add detail or features; one primitive per part is enough. Return only the CadQuery program, with no explanation.
The second is issued once per part, with the full proxy program as context:
Below is a CadQuery program that produces a simple proxy of a {object}, with one function per part. Rewrite the function for the {part} into a detailed, realistic version of that part, and leave every other function unchanged. Keep the part's overall placement and extent close to the proxy, and add the geometry, features, and detail the proxy leaves out. Make sure the part still meets its neighbors where the proxy has them meet. Return only the edited CadQuery program, with no explanation.
Appendix K: VLM-Based Repair Prompt
We provide the complete CadQuery program for each selected shape and use the following prompt. The execution harness enforces a three-minute wall-time limit per shape.
You are given a CadQuery program that generates a multi-part object. Execute the program and inspect the resulting geometry. Repair gaps and overlaps between parts, and ensure that parts intended to connect meet over flat contact regions. Preserve the existing part structure and geometric details, including holes, curved features, and thin elements. Keep the parts as separate functions so that they remain individually accessible. You may execute and revise the program repeatedly. Return the final executable CadQuery program.
Appendix L: Perceptual Comparison Protocol
We ran a pairwise comparison to test whether the extra geometry our programs carry is preferred by people, since program length alone does not establish that it is worth having.
Participants. We recruited 12 participants from within our organization by email. Participants had to be at least 18 years old and proficient in English, and were not required to have professional experience in sketching, 3D modeling, or generative AI. Each session lasted about 30 minutes and participants were compensated with a small token of appreciation.
24 of 27
Y. Li et al. / Composable CAD
Stimuli. Each trial shows one input sketch alongside two shapes generated from it, one by the single-pass baseline () and one by our pipeline (Figure 27). The two are presented side by side as Shape A and Shape B, unlabeled, with left and right positions randomized per trial. Participants can drag either shape to rotate it and reset the camera to the starting angle at any time. Each participant sees 15 sketches drawn at random from the corpus.
Task. Participants are told that the two shapes came from two different automatic methods, without being told which produced which, and are shown how to inspect a shape in 3D. For each sketch they answer four preference questions, with no option to abstain and no correct answer:
-
Which shape better preserves the details of the sketch?
-
Which shape better preserves the size and proportions of the parts in the sketch?
-
Which shape better depicts the sketched object in a buildable form?
-
Which shape do you prefer overall?
All four must be answered before the next sketch is shown. We report, for each question, the proportion of trials on which our shape was chosen.
Appendix M: Exploration Study
We ran a user study with six participants to investigate how the design space is used. Sessions ran about an hour in person. Each participant drew two sketches on a pen tablet, on subjects of their own choosing, and explored shapes through two different systems in counterbalanced order, one sketch per condition. Design spaces were generated on the spot. Both interfaces are shown in Figure 21.
The baseline condition is a VLM-only system. A sketch produces a gallery of 16 generated shapes, from which the participant chooses their five favorites and edits them with a single text instruction before committing. We then decompose the edited shapes and present the result as a design space for the participant to combine from. Because these shapes are generated separately and segmented separately, their parts are not guaranteed to fit together.
Ours produces a per-part design space from the sketch, and the participant selects parts to combine, as introduced in Section 5.1.
Each condition allowed up to ten minutes of exploration, excluding generation wait time, and ended with the participant committing to a final shape. Sessions closed with a semi-structured interview about which workflow they preferred, what they liked and disliked about each, how clearly they had the shape in mind when they drew the sketch, and whether exploring in 3D changed what
they wanted. The study asks three questions: whether participants want part-based selection and exploration, how much part connectivity matters to the experience, and how far the final shape departs from the initial sketch. We report what we found on each below, and show the shapes participants produced with our system in Figure 22.
Part selection was the feature participants valued. All participants preferred choosing parts to choosing whole shapes, and the reason they gave was consistent: no single generated shape was their favorite, but pieces of several were. As one participant put it, "with so many options I cannot choose one favorite shape. I like a part of all of them." Participants also found selecting a part easier than describing one in text, since they often lacked the words for the part they wanted, and picking it from the design space asked for none.
Coherent parts matter. In the baseline condition, where every shape is generated on its own, participants met floating and overlapping parts. These drew immediate negative reactions whenever they appeared, and participants said such parts made it impossible to explore any further. Our rewrite is what removes them, and the reaction confirms that the failure matters perceptually and not only geometrically. Participants consistently praised our condition for producing clean shapes.
Exploration goes beyond the sketch. Participants described their own sketches as rough and unfinished, and said that exploring with our system often gave them new ideas, welcoming the additions the final shape made to their design. For some objects, however, they felt the baseline's whole-shape variants suggested more ideas than our per-part samples, since varying every part at once departs further from the sketch.
Segmentation granularity needs to be controllable. Participants said the segmentation did not always divide the object the way they wanted. Three asked for finer parts, while one found that too many parts added noise and got in the way of a clean exploration. All of them asked for a hierarchical segmentation instead, so that a part could be opened up and explored in more detail when they chose to.
Appendix N: Example Programs
To give a concrete sense of what our system produces, we show the three artifacts it generates for one object, an office chair. The planning stage emits the proxy program (Figure 28) and the constraint program (Figure 29); detail generation and the rewrite produce the final program (Figure 30).
25 of 27

Figure 27: The comparison interface. Each trial shows the input sketch on the left and two shapes generated from it, one by the single-pass baseline and one by our pipeline, in randomized left and right order and unlabeled (a). Participants can rotate either shape freely, and answer four preference questions before continuing to the next sketch (b).
import cadquery as cq
WP = cq.Workplane
def base(): part = WP("XY").cylinder(height=60, radius=35).translate((0, 0, 70)) for i in range(5): angle = i * 72 leg = (WP("XY").box(30, 280, 20).translate((0, 140, 50)) .rotate((0, 0, 0), (0, 0, 1), angle)) pin = (WP("XY").cylinder(height=30, radius=8) .translate((0, 270, 35)) .rotate((0, 0, 0), (0, 0, 1), angle)) wheel = (WP("YZ").cylinder(height=20, radius=20) .translate((0, 270, 20)) .rotate((0, 0, 0), (0, 0, 1), angle)) part = part.union(leg).union(pin).union(wheel) return part
def column(): return WP("XY").cylinder(height=160, radius=20).translate((0, 0, 180))
def seat_pan(): return WP("XY").box(500, 480, 80).translate((0, 20, 300))
def backrest(): part = WP("XY").box(460, 40, 650).translate((0, 0, 325)) return part.rotate((0, 0, 0), (1, 0, 0), 10).translate((0, -200, 300))
def left_armrest(): top = WP("XY").box(20, 220, 20).translate((-260, -80, 480)) post = WP("XY").box(20, 20, 180).translate((-260, 20, 390)) link = WP("XY").box(50, 60, 20).translate((-235, -200, 480)) return top.union(post).union(link)
def right_armrest(): return left_armrest().mirror("YZ", (0, 0, 0))
PARTS = [base, column, seat_pan, backrest, left_armrest, right_armrest]
def build_assembly(): asm = cq.Assembly(name="office_chair") for build in PARTS: asm.add(build(), name=build.name) return asm
if name == main": shape = build_assembly().toCompound() cq.exporters.export(shape, "proxy_shape.stl")

Figure 28: The proxy program for the office chair. Each part is one function returning a simple volume, and the renders below show the parts and the assembled proxy.
26 of 27
Y. Li et al. / Composable CAD
from measure import AX, anchor, bbox, center, diag, extent, gap
PROXY = { "base": [-278.9, -240.5, 0.0, 278.9, 290.0, 100.0], "column": [-20.0, -20.0, 100.0, 20.0, 20.0, 260.0], "seat_pan": [-250.0, -220.0, 260.0, 250.0, 260.0, 340.0], "backrest": [-230.0, -332.6, 296.5, 230.0, -220.0, 943.6], "left_armrest": [-270.0, -220.0, 340.0, -210.0, 30.0, 490.0], "right_armrest": [210.0, -220.0, 340.0, 270.0, 30.0, 490.0], }
CONNECTING_SURFACES = [ ("base", "column", "z", 100.0), ("column", "seat_pan", "z", 260.0), ("seat_pan", "backrest", "y", -220.0), ("seat_pan", "left_armrest", "z", 340.0), ("seat_pan", "right_armrest", "z", 340.0), ("backrest", "left_armrest", "y", -220.0), ("backrest", "right_armrest", "y", -220.0), ]
def inside_envelope(part, box, tol=1.0): lo, hi = bbox(part) return all([lo[i] >= box[i] - tol and hi[i] <= box[i + 3] + tol for i in range(3)])
def reaches_surface(part, ax, plane, tol=1.0): lo, hi = bbox(part) return lo[AX[ax]] - tol <= plane <= hi[AX[ax]] + tol
ALIGN_FRAC = 0.10 CONTACT_FRAC = 0.05 SIDE_FRAC = 0.15 PROP_TOL = 0.30 MIRROR_FRAC = 0.25 GROUND_TOL = 2.0
def aligned(a, b, ax, af="center", bf="center"): tol = ALIGN_FRAC * max(extent(a, ax), extent(b, ax), 1.0) return abs(anchor(a, ax, af) - anchor(b, ax, bf)) <= tol
def attached(parent, child, ax=None, sign=0): tol = CONTACT_FRAC * min(diag(parent), diag(child)) ok = gap(parent, child) <= tol if ax and sign: off = center(child)[AX[ax]] - center(parent)[AX[ax]] span = extent(parent, ax) + extent(child, ax) ok = ok and sign * off >= -SIDE_FRAC * span / 2 return ok
def on_ground(part): zmin = bbox(part)[0][2] return abs(zmin) <= max(GROUND_TOL, 0.02 * extent(part, "z"))
def proportion(part, ratio): lo, hi = bbox(part) ext = [h - l for l, h in zip(lo, hi)] got = [e / (max(ext) or 1.0] for e in ext] want = [r / (max(ratio) or 1.0) for r in ratio] return max(abs(g - w) for g, w in zip(got, want)) <= PROP_TOL
def mirroring(a, b, ax): ea, eb = extent(a, ax), extent(b, ax) return abs(ea - eb) <= MIRROR_FRAC * max(ea, eb, 1.0)
RELATIONS = [ (proportion, ("base"), ((1, 1, 0.2),)), (proportion, ("column"), ((0.2, 0.2, 1),)), (proportion, ("seat_pan"), ((1, 1, 0.1),)), (proportion, ("backrest"), ((0.8, 0.2, 1),)), (proportion, ("left_armrest"), ((0.2, 1, 0.7),)), (proportion, ("right_armrest"), ((0.2, 1, 0.7),)), (on_ground, ("base"), ()), (attached, ("base", "column"), ("z", 1)), (attached, ("seat_pan", "column"), ()), (attached, ("backrest", "seat_pan"), ("z", -1)), (attached, ("seat_pan", "left_armrest"), ("y", 1)), (attached, ("seat_pan", "right_armrest"), ()), (attached, ("backrest", "left_armrest"), ("z", -1)), (attached, ("backrest", "right_armrest"), ("y", -1)), (aligned, ("column", "base"), ("x"),), (aligned, ("seat_pan", "base"), ("y"),), (aligned, ("left_armrest", "right_armrest"), ("y"),), (mirroring, ("left_armrest", "right_armrest"), ("y"),), ]
OVERRIDES = {}
def check_contract(parts): out = [[slug, inside_envelope(parts[slug], box)) for slug, box in PROXY.items()] for parent, child, ax, plane in CONNECTING_SURFACES: out.append(({"parent": ~child}), reaches_surface(parts[parent], ax, plane) and reaches_surface(parts[child], ax, plane))) return out
def check_relations(parts): out = [] for check, slugs, args in RELATIONS: name = {"check.name}{{"', 'join(slugs)}"}" if name in OVERRIDES: out.append((name, None)) else: args_in = [parts[s] for s in slugs] + list(args) out.append((name, check(sargs_in))) return out


Figure 29: The constraint program for the office chair. It holds the bounding boxes and connecting surfaces, the executable predicates that check each relation, and the extracted attachment, alignment, proportion, mirroring, and resting relations. Below: the connecting surfaces on the proxy (left) and the relation graph over the parts (right).
27 of 27
import math
import cadquery as cq
WP = cq.Workplane
def box_at(dims, corner): solid = cq.Solid.makeBox(dims, cq.Vector(*corner)) return WP("X").newObject(solid)
def base(): hub = WP("X") .workplane(offset=75).cylinder(50, 65) hub = hub.faces("Z").chamfer(3).faces("Z").chamfer(3) collar = WP("X") .workplane(offset=98).cylinder(4, 67) hub = hub.union(collar.edges().chamfer(1))
def arch(wp, w, h): return (wp.moveTo(-w / 2, -h / 2) ,lineTo(w / 2, -h / 2).lineTo(w / 2, h / 4) ,threePointArc((0, h / 2), (-w / 2, h / 4)) .close())
root = WP("Y") .workplane(offset=30).center(0, 75) tip = arch(root, 24, 30).workplane(offset=155).center(0, -30) leg = arch(tip, 16, 15).loft()
stem_x, wheel_x, wheel_z = 170, 175, 19 stem = WP("X") .workplane(offset=30).center(stem_x, 0) , circle(4).extrude(20))
hood = WP("X") .polyline([stem_x - 5, 38], stem_x + 5, 38), (wheel_x + 10, wheel_z), (wheel_x - 12, wheel_z]) , close().extrude(10, both=True))
axle = (WP("XZ") .center(wheel_x, wheel_z)) , circle(12).extrude(11, both=True))
caster = hood.union(axle).union(stem) caster = caster.edges("Y").fillet(2)
def wheel(s): rim = (WP("XZ") .workplane(offset=10.5 * s) , center(wheel_x, wheel_z).circle(19) , extrude(7.5 * s)) core = (WP("XZ") .workplane(offset=16 * s) , center(wheel_x, wheel_z).circle(18) , extrude(3 * s)) face = "y" if s > 0 else "x" return rim.cut(core).faces(face).chamfer(1.5)
full_leg = leg.union(caster).union(wheel(1)).union(wheel(-1))
part = hub for i in range(5): spoke = full_leg.rotate((0, 0, 0), (0, 0, 1), i * 72 - 90) part = part.union(spoke) return part.translate((0, -40, 0))
def column(): pts = [(0, 160), (9, 160), (10, 150), (10, 127), (9, 127), (9, 125), (10, 125), (12, 123), (12, 92), (11, 92), (11, 90), (12, 90), (14, 88), (14, 57), (13, 57), (13, 55), (14, 55), (16, 53), (16, 25)] profile = (WP("XZ") .polyLine(pts) , threePointArc((17.5, 12), (20, 0)) , lineTo(0, 0).close()) part = profile.revoke(360, (0, 0, 0), (0, 1, 0)) part = part.translate((0, 0, 100)) pad = box_at((30, 30, 3.333333), (-15, -15, 256.666667)) return part.union(pad)
def seat_pan(): part = WP("X") .box(500, 480, 80).edges["Z"].fillet(20) part = part.translate((0, 20, 300)) for y in (-160, -70, 20, 110, 200): groove = WP("Y") .moveTo(y, 345).circle(8) part = part.cut(groove.extrude(200, both=True)) for x in (-250, 210): pad = box_at((40, 250, 1.666667), (x, -220, 338.333333)) part = part.union(pad) return part
def backrest(): def front_y(z): if z <= 490: return -220.0 r = 7148058 - (z - 311.2) ** 2 return math.sqrt(max(r, 0)) - 2887.6
def back_y(z): if z <= 490: return -270.0 r = 16643924 - (z - 157.2) ** 2 return math.sqrt(max(r, 0)) - 4336.1
groove_h, groove_d, step = 4.0, 3.0, 5.0 pts = [[-220.0, 297.0]]
z_base = 297.0
for qz in (530, 590, 650, 710, 770, 830, 890): z_end, z_top = qz - groove_h / 2, qz + groove_h / 2 z = z_base while z < z_end: pts.append((front_y(z), z)) z += step if pts[-1][1] != z_end: pts.append((front_y(z_end), z_end)) pts.append((front_y(z_end) - groove_d, z_end)) pts.append((front_y(z_top) - groove_d, z_top)) pts.append((front_y(z_top), z_top)) z_base = z_top
z = z_base while z < 944.0: if z > z_base: pts.append((front_y(z), z)) z += step if pts[-1][1] != 944.0: pts.append((front_y(944.0), 944.0)) z = 944.0 while z >= 297.0: pts.append(back_y(z), z)) z -= step if pts[-1][1] >= 297.0: pts.append(back_y(297.0), 297.0))
ribs = WP("YZ") .polyLine(pts).close().extrude(260, both=True) shell = (WP("XZ") .moveTo(231, 250).lineTo(231, 491).lineTo(210, 800) , threePointArc((0, 944), (-210, 800)) , lineTo(-231, 491).lineTo(-231, 250) , close().extrude(500, both=True)) return ribs.intersect(shell)
def left_armrest(): frame = (WP("YZ") .workplane(offset=-245) , moveTo(7.5, 340).lineTo(22.5, 340) , lineTo(22.5, 472.5).lineTo(-180, 472.5) , lineTo(-180, 457.5).lineTo(7.5, 457.5) , close().extrude(15)) near = cq.NearestToPointSelector frame = frame.edges(near((-237.5, 22.5, 472.5)), fillet(18) frame = frame.edges(near((-237.5, 7.5, 457.5))).fillet(5) bracket = (WP("X") .workplane(offset=457.5) , moveTo(-245, -165).lineTo(-215, -165) , lineTo(-215, -220).lineTo(-230, -220) , lineTo(-230, -180).lineTo(-245, -180) , close().extrude(15)) bracket = bracket.edges(near((-215, -165, 465))), fillet(25) bracket = bracket.edges(near((-230, -180, 465))).fillet(10) pad = WP("X") .box(35, 210, 18) pad = pad.translate((-237.5, -78.75, 481)) pad = pad.edges("Z").fillet(17.49) pad = pad.edges("Z").fillet(4).edges("Z").fillet(2) seat_plate = (WP("X") .workplane(offset=340) , center(-230, -95).rect(40, 250).extrude(5)) back_plate = (WP("X") .workplane(offset=340) , center(-220, -217.5).rect(20, 5).extrude(150)) return (frame.union(bracket).union(pad) , union(seat_plate).union(back_plate))
def right_armrest(): return left_armrest().mirror("YZ", (0, 0, 0))
PARTS = [base, column, seat_pan, backrest, left_armrest, right_armrest]
def build_assembly(): asm = cq.Assembly(name="office_chair") for build in PARTS: asm.adf(build), name=build, name return asm
if name == main": shape = build_assembly().toCompound() cq.export(shape, "final_shape.stl")

whole shape

base
column

seat_pan
backrest

left_armrest

right_armrest
Figure 30: The final program for the office chair, after detail generation and the deterministic rewrite. Each part is elaborated from its proxy volume into detailed geometry, with the renders on the right showing the parts and the assembled shape.