Manuscript Offprint
arXiv:2610.08698PrimitiveCAD: An LLM-Based Point-to-CAD Reconstruction with Primitive-Aware Tokenization and Operation Alignment
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Jian Gao
Hangzhou Dianzi University
Hangzhou, Zhejiang, China
Kailin Bi
Hangzhou Dianzi University
Hangzhou, Zhejiang, China
Jiamin Xu
Hangzhou Dianzi University
Hangzhou, Zhejiang, China
Jinlan Xu
Hangzhou Dianzi University
Hangzhou, Zhejiang, China
Gang Xu
Hangzhou Dianzi University
Hangzhou, Zhejiang, China

Figure 1: Using a point cloud as input, our method generates an executable Python script that creates a parametric CAD model. Through primitive-aware tokenization and operation-aligned LLM fine-tuning, our approach is capable of producing high-fidelity, feature-preserving CAD models.
Abstract
Large-model-based point-to-CAD generation holds immense potential for advancing industrial design and enhancing 3D modeling efficiency. However, most existing methods approach the problem as a general point-cloud encoding and token prediction task, neglecting the tokenization and supervision specifically for CAD-related primitives. As a result, these methods often struggle to accurately reconstruct the intricate primitive structures. To address this limitation, we propose PrimitiveCAD, a novel multi-stage paradigm for point-to-CAD reconstruction that enhances the geometric accuracy of generated CAD models while better preserving critical geometric features. First, we introduce a primitive-aware point cloud tokenization model, enabling the system to learn more robust geometric representations from CAD point clouds. Next, we perform supervised finetuning on a large language model (LLM) and introduce an operation alignment loss to align key CAD operation frequencies, thereby improving the preservation of global shape features. Finally, we incorporate reinforcement learning (RL) and introduce a feature-line alignment reward to further reduce stochasticity and enhance the fine-grained preservation of geometric features. Experiments on the DeepCAD and Fusion360 datasets show that our method achieves state-of-the-art performance in code validity, geometric accuracy, and geometric feature preservation.
CCS Concepts
• Computing methodologies → Shape modeling.
ACM Reference Format:
Jian Gao, Kailin Bi, Jiamin Xu, Jinlan Xu, and Gang Xu. 2026. PrimitiveCAD: An LLM-Based Point-to-CAD Reconstruction with Primitive-Aware Tokenization and Operation Alignment. In Proceedings of the 34th ACM International Conference on Multimedia (MM '26), November 10–14, 2026, Rio de Janeiro, Brazil. ACM, New York, NY, USA, 9 pages. https://doi.org/10.1145/3767308.3835531
Corresponding authors.

This work is licensed under a Creative Commons Attribution 4.0 International License. MM '26, Rio de Janeiro, Brazil
© 2026 Copyright held by the owner/author(s).
ACM ISBN 979-8-4007-2213-4/2026/11
https://doi.org/10.1145/3767308.3835531
1 Introduction
Computer-Aided Design (CAD) plays a crucial role in industrial design and manufacturing, enabling the creation and modification
Jian Gao, Kailin Bi, Jiamin Xu, Jinlan Xu, & Gang Xu
of objects across various industries, including architecture, automotive, and aerospace. Traditionally, CAD requires designing 2D sketches and performing 3D operations to generate models—a process that demands specialized knowledge and skills, making it less accessible to non-experts. With the rise of Artificial Intelligence (AI) and Large Language Models (LLMs), a new approach called Computer-Automated Design (CAutoD) has emerged, integrating AI to enhance design speed, creativity, and personalization. This evolution simplifies the CAD generation and manipulation process, making it more intuitive and user-friendly for both experts and non-experts.
For CAD generation, an effective output model representation is essential. Early methods typically relied on Constructive Solid Geometry (CSG) [8] or Boundary Representation (B-Rep) [1]. Recent studies, however, have shifted towards encoding CAD models as operation sequences [32] or more flexible representations, such as Python code (e.g., CadQuery [26]), which offer enhanced interpretability. The task of converting inputs into Python code aligns well with recent advancements in Large Language Models (LLMs), which excel at in-context learning and multimodal tokenization. At the input level, however, due to the limitations of text descriptions and occlusions in 2D images, LLMs often struggle to generate accurate CAD models from simple language or visual descriptions. In contrast, point clouds capture detailed geometric data and can be easily obtained through scanning or direct modeling techniques, making them a superior modality for conditioning and providing more precise guidance for CAD generation. As a result, we condition CAD generation on point cloud inputs and generate CAD models as executable Python scripts.
The point-to-CAD sequence generation method using LLMs converts point cloud data into tokens, which are fed into the LLM as context to generate corresponding CAD sequences using the model's next-token prediction capability. However, current methods have several key limitations: 1) Insufficient capability to extract CAD features from point clouds; existing methods either train point feature extraction from scratch via end-to-end training or use general point cloud feature extractors like PointNet [23] or Point Transformer [33, 38], which are not specifically designed for CAD features; 2) The supervision for supervised finetuning (SFT) of CAD sequences in LLMs is adapted from general chat models, without adjustments for CAD sequences, leading to suboptimal SFT performance; 3) The reward design in Reinforcement Learning (RL) only considers geometric overlap, neglecting the specific point-line-plane structural features inherent in CAD models.
To resolve these issues, our method first trains a primitive-aware tokenizer for point clouds, using Point Transformer v3 (PTv3) [33] as the backbone. We fine-tune PTv3 with geometry primitives derived from CAD sketching and extrusion operations, enabling it to produce discriminative features for points sampled from CAD models. Next, we perform SFT to allow the LLM to generate Python code. To enhance SFT supervision, we introduce an operation alignment loss specifically designed for CAD sequences, which aligns the expected frequency of core CAD operations and imposes macro-level geometric constraints. We found that even with SFT alone, our method performs on par with existing baselines that incorporate RL. Finally, similar to Cadrille [12], we apply RL to further refine the model. In the RL phase, traditional volume-based IoU rewards often fail to capture fine geometric details and provide insufficient guidance when small features are missing. To address this, we propose a geometry feature-line alignment reward that explicitly extracts and matches key topological features. Incorporating this RL phase enables our method to generate CAD models with low stochasticity and highly accurate reconstruction performance.
In summary, this work systematically integrates CAD structural information into the entire learning pipeline, spanning point-cloud tokenization, SFT, and RL. Our main contributions are summarized as follows:
-
We propose a point-to-CAD reconstruction framework with a multi-stage training paradigm. This framework first extracts discriminative features to achieve primitive-aware tokenization for CAD point clouds, and then uses an LLM to generate CAD sequences through SFT and RL.
-
During the SFT phase, we introduce an operation alignment loss that uses a relaxed IoU on the frequency of key operators, establishing macro-level constraints for CAD operation sequences and improving SFT performance.
-
During the RL phase, we introduce a novel feature-line alignment reward, effectively addressing the limitations of traditional volume-based IoU rewards when handling small geometric features and complex CAD topologies.
Experimental results demonstrate that our point-to-CAD reconstruction framework achieves state-of-the-art performance in CAD sequence reconstruction across multiple public benchmarks.
2 Related work
CAD sequence generation. DeepCAD [32] pioneered sequence-based CAD generation by encoding sketch and extrusion operations as discrete tokens. Although CAD-Diffuser [20] and SECAD-Net [15] further extended this sequence modeling paradigm, they still rely on customized command spaces or task-specific symbolic sequences. CAD-Recode [26] represents CAD models as Python code based on CadQuery [4], enabling the model to directly generate executable parametric modeling programs rather than customized discrete instructions.
Recent advances in LLMs have revolutionized CAD sequence generation. LLM-based approaches generate CAD construction sequences from text [11] or images [37]. CAD-MLLM [34] further supports text, image, and point-cloud inputs using pretrained multimodal models. CAD-Recode [26] generates Python programs for point-to-CAD reconstruction, while Cadrille [12] extends this paradigm to multimodal inputs. Other approaches improve topology selection [24], dimensional precision [25], and CAD program refinement through visual or geometric feedback [7, 9, 16]. However, these methods rely solely on token-level cross-entropy loss, which does not account for the unique characteristics of CAD operations, limiting the model's ability to preserve CAD features.
Since large-model generation is inherently stochastic, recent approaches like CADCrafter [3], Cadrille [12] and ReCAD [14] use reinforcement learning to reduce stochasticity and improve output quality. However, these methods do not explicitly align fine-grained CAD geometric features. To address this, we introduce a feature-line alignment reward that aligns key geometric features (such as
PrimitiveCAD: An LLM-Based Point-to-CAD Reconstruction with Primitive-Aware Tokenization and Operation Alignment
MM '26, November 10–14, 2026, Rio de Janeiro, Brazil

Figure 2: Overview of the proposed point-to-CAD reconstruction pipeline. We propose a multi-stage framework for point-to-CAD reconstruction that enhances geometric accuracy while more effectively preserving CAD-specific geometric features. In the first stage, we introduce primitive-aware finetuning to improve point cloud tokenization, allowing the system to learn primitive from CAD point clouds, which are then used as context for the LLM. In the second stage, we fix the tokenization and apply SFT to the LLM, incorporating a novel operation alignment loss to align key CAD operation frequencies, thereby improving the preservation of global shape features. In the third stage, we integrate RL and a feature-line alignment reward to reduce stochasticity and further enhance the fine-grained preservation of geometric features.
lines, arcs, and circles), thereby enhancing local geometric fidelity during reinforcement learning.
Point-based CAD generation. Early point-to-CAD methods used parametric surface fitting [2], RANSAC [17], or region growing [22] for primitive fitting and object decomposition. Later approaches directly recover geometric structures from point clouds but often rely on predefined primitives or local fitting objectives [19, 30, 39]. LLM-based methods generate CAD programs from point clouds using learned point-cloud representations [18, 26, 35]. However, they lack primitive-aware geometric priors, which may limit representation and reconstruction accuracy. To overcome this limitation, we introduce primitive-aware point cloud tokenization to enhance geometric representation.
3 Proposed Method
3.1 Overview
Our goal is to generate a CAD model from an input point cloud P, where the target CAD model is represented as an executable Python script [26] that generates the parametric boundary representation (B-Rep). Consequently, the task of generating a CAD model from a point cloud is transformed into a conditional language generation problem. To achieve this, as shown in Fig. 2, we first train a primitive-aware tokenizer for the CAD point cloud (Sec. 3.2), incorporating point cloud tokens into an LLM [29] and then fine-tune it with ground-truth Python scripts. We also introduce an operation alignment loss to enhance supervision (Sec. 3.3). However, with SFT, the LLM may still have a probabilistic chance of generating undesirable models. To reduce stochasticity, we incorporate RL and use a novel geometry feature alignment reward to further refine the model (Sec. 3.4).
3.2 Primitive-Aware Point Cloud Tokenization for CAD Models
We first train a point cloud tokenizer for CAD models, which extracts discriminative features from the point cloud, followed by sampling and projection to generate point cloud tokens as input for the LLM.
Regarding point cloud features, the current self-supervised pretrained Point Transformer v3 (PTv3) [33] is designed for 3D point cloud downstream tasks, such as indoor and outdoor scene segmentation. However, as shown in Fig. 3, directly applying these pre-trained features is not suitable for CAD models, which involve operations like sketching, extrusion, and boolean operations. To achieve more descriptive tokenization, we fine-tune the pre-trained PTv3 network by adding two heads, enabling it to output two types of predictions for each point : a normal vector and a 32-dimensional category logit vector , where is a probability distribution for CAD-primitive instance segmentation:
Here, N is the number of points. Each represents a fine-grained segmentation of the point cloud into non-overlapping primitive instances. The primitive instances are categorized into four types: 1) sketch, 2) extrude, 3) cylinder, and 4) box, as shown in Fig. 4. Each type contains at most K = 8 instances.
Ground-Truth Primitive Labels. Given the CAD sequence and the sampled point cloud, we can obtain the ground-truth primitive labels by parsing the geometric instances and extracting the necessary parameters for label assignment. Each point's
Jian Gao, Kailin Bi, Jiamin Xu, Jinlan Xu, & Gang Xu

CAD model
Pretrained
PTv3
Fine-tuned
PTv3
Figure 3: PCA visualization of PTv3 [33] feature embeddings before and after CAD-specific finetuning. After finetuning with our CAD primitive supervision, the resulting feature space shows enhanced semantic separability.
primitive-instance label is determined by comparing its position to the geometric constraints of the parsed instances. If a point lies within the support region of an instance, it is assigned to that instance. For sketch and extrude primitives, we check whether the point lies on the base or top plane for the base-face label and on the barrel surface for the barrel-face label. For cylinder primitives, we verify if the point belongs to the cylindrical surface based on its radial and axial position. For box primitives, label assignment is based on the local coordinate system. This process ensures that points are consistently mapped to the correct primitive-level instance labels based on geometric constraints.
Primitive Instance Segmentation Supervision. After obtaining the ground-truth primitive labels for the point cloud, we fine-tune the PTv3 [33]. The training objective includes an unoriented normal consistency loss, , and a primitive instance segmentation loss, , which together constrain the per-point geometric direction and the semantic classification of points to primitive instances, such as base-or-barrel for sketch/extrude operations, and cylinder or box for other primitives. The overall loss function is expressed as:
To resolve the ambiguity caused by normal sign flipping, we constrain the predicted and ground-truth normals using an unoriented cosine distance:
Primitive Instance Segmentation Loss. Since the indices of primitive instances are not ordered, different permutations of the indices may correspond to the same geometric partition. Thus, we treat the predictions as an unordered set and use Hungarian matching [13] to find the optimal one-to-one correspondence with the ground truth primitive labels. We construct a similarity matrix and apply Hungarian matching [13] to obtain the permutation , which reorders the predicted instances into to align with S.
Next, we compute the instance segmentation loss by applying the Relaxed IoU (RIoU) similarity between the predicted instances and the ground-truth instances:

Figure 4: Point-wise primitive instance labels for primitive-aware finetuning of PTv3 [33], including instance assignments for sketch, extrude, cylinder, and box primitives.
Through finetuning on normal estimation and primitive instance segmentation tasks, the PTv3 model [33] gains a clear understanding of the geometric semantics and spatial structure of CAD instances (Fig. 4). This backbone network is then used as a geometric feature extractor, transforming the point cloud into the latent features which provides geometric priors and primitive parsing capabilities for subsequent CAD code generation.
Latent Features Tokenization. To transform the latent features into tokens , where represents the token dimension, we first apply farthest point sampling (FPS) to select a subset of 256 points. We then extract features from the full set of points and obtain the features for the selected subset. To mitigate the loss of continuous spatial values, the encoder applies a Fourier transform to the original coordinates of , generating high-frequency positional encodings that capture absolute spatial coordinate information:
where denotes a predefined set of frequencies. We then stack the latent features and the positional encodings , and tokenize them through a linear projection, yielding the final point cloud token sequence:
3.3 SFT with Operation Alignment
To achieve deep alignment between geometric information and textual semantics in a unified representation space, we fine-tune the Qwen2 LLM [29] through SFT. We reserve a placeholder interval of length 256 in the input sequence of the language model and replace the corresponding token embeddings within this interval with point cloud tokens . This explicit feature alignment strategy allows the model to directly map geometric structure priors and coordinate representations into the reasoning space of the LLM, providing robust cross-modal contextual support for subsequent CAD code generation.
To better supervise the model, we decouple the training objective into two components: a traditional token-level autoregressive generation loss and a novel operation-level global alignment loss specifically designed for CAD sequences. The former ensures the local correctness of the code syntax, while the latter enhances the
PrimitiveCAD: An LLM-Based Point-to-CAD Reconstruction with Primitive-Aware Tokenization and Operation Alignment
MM '26, November 10–14, 2026, Rio de Janeiro, Brazil

Figure 5: Comparison of operator counts between the generated CAD sequence and the ground truth. Differences across operator types reflect the operation-level mismatch targeted by the operation alignment loss.
model's ability to capture the global geometric characteristics by aligning the frequency of core CAD operations.
Autoregressive Cross-Entropy Loss. In line with the standard fine-tuning paradigm for large language models, we compute the negative log-likelihood of the target code sequence as the primary sequence modeling loss. Given the target CAD code sequence , the cross-entropy loss is defined as:
This loss guides the model in generating syntactically valid Python code from the extracted point cloud tokens .
3.3.1 Operation Alignment Loss. Although effectively guides token-level code generation, CAD reconstruction is highly sensitive to operation-level errors. Missing or redundant operators can lead to significant deviations in the final geometry. To address this, we introduce an operation alignment loss that regularizes the global operator composition of the generated CAD sequence.
Let be the set of core CAD operators and primitive types. For each ground-truth Python code, we calculate the occurrence count for each operator using explicit string matching. In contrast, for the predicted Python code, directly counting operator occurrences from discrete tokens is non-differentiable. To address this, we define a differentiable soft count by summing the operator's probabilities. Since each operator can have multiple token patterns, we enumerate the valid tokenization variants. We calculate the matching probability for each pattern at every position in the sequence, aggregate the variants in log space, and sum the probabilities across all positions to obtain the soft count . As shown in Fig. 5, discrepancies in operator counts indicate global inconsistencies in the CAD construction logic.
Based on the ground-truth count vector and the predicted soft count vector, the operation alignment loss is defined as:
The overall training objective combines the token-level autoregressive loss and the operation alignment loss as follows:

Figure 6: Feature line extraction and classification in the RL stage. The extracted features are categorized into three geometric types: straight lines, arcs, and circles.
By introducing as an auxiliary regularization term, the model is guided not only to generate syntactically valid CAD code, but also to maintain the underlying construction logic and structural characteristics of the target CAD geometry.
3.4 RL with Feature-Line Alignment
After the SFT stage, we introduce an online reinforcement learning phase where the model is further refined using feedback from programmatic execution to reduce stochasticity and improve geometric accuracy. We use Group Relative Policy Optimization (GRPO) [27] for feedback, which does not require a separate reward model. Instead, it estimates an advantage function based on the relative quality of different samples within a group.
At this stage, the paired point cloud and code sequence used for SFT is no longer required. Unlike SFT which relies on annotated CAD reconstruction sequences, RL evaluates the results of the model-generated outputs through execution and feeds the reward signals back into the optimization process. This eliminates the need for complete CAD sequence labels and allows the use of 3D datasets without sequence annotations, significantly expanding the available training data. By learning from more diverse geometric shapes, the LLM becomes more robust to geometric noise and artifacts in real-world scenarios.
In each training iteration, given the point cloud tokens, the fine-tuned LLM samples K candidate code sequences in parallel. We execute the generated code to obtain the corresponding CAD models and compute the reward r for each sample. The advantage function A is calculated based on the normalized rewards within the group. To evaluate the geometric quality of the generated sequences, we design a reward function that considers both global volumetric consistency and local feature fidelity, addressing the limitations of conventional volumetric rewards in capturing fine-grained structures.
When the generated code successfully executes into a valid CAD model , we align and normalize both the predicted model and the ground-truth model . The global geometric similarity is then measured using the IoU between and . Additionally, as shown in Fig. 6, local structural similarity , captured through feature-line extraction and matching, is incorporated into
Jian Gao, Kailin Bi, Jiamin Xu, Jinlan Xu, & Gang Xu
the reward function:
We set and . When the generated code fails to execute, we fix the reward r to a value of -10.
To compute , we perform feature-line matching by calculating the similarity for each feature type (e.g., straight lines, arcs, and circles). This is done by constructing a normalized similarity matrix based on the 1 - L2 distance, which incorporates geometric attributes such as endpoint distance, center offset, length ratio, and directional consistency. Since the numbers of feature lines in the ground-truth and predicted models may differ, is computed as the optimal normalized matching score using the Hungarian algorithm [13], where unmatched feature lines are assigned zero score in the final aggregation. For feature-line extraction, we extract feature lines in the mesh domain; please refer to the supplementary materials for further information.
4 Experiments
To validate the effectiveness of the proposed method, we compare it with representative methods for point-to-CAD reconstruction. The baselines include sketch and extrusion sequence modeling methods, such as DeepCAD [32], Point2Cyl [28], HNC-CAD [36], MultiCAD [21], TransCAD [5], CAD-Diffuser [20], and CAD-SIGNet [10], as well as recent methods that generate executable programs, including CAD-Recode [26] and Cadrille [12]. In the ablation study, we examine the effectiveness of the PTv3 [33] finetuning and the operation alignment during the SFT stage. Then we compare the reconstruction performance achieved without feature-line alignment reward and with different RL strategies. We also assess the impact of point cloud tokenization under varying input point counts. For implementation details, please refer to the supp. material.
Datasets. During the SFT stage, to ensure a fair comparison with existing methods for point-to-CAD reconstruction, we adopt the DeepCAD dataset [32], which contains approximately 16k CAD models collected from real design data, as the primary training set for point cloud based supervision. We also incorporate approximately one million models from the CAD-Recode dataset [26] for training, where all CAD models are constructed from executable programs written in CadQuery [4]. During the RL stage, we leverage the Fusion360 dataset [31], a small scale CAD reconstruction benchmark containing complex and realistic CAD models, to guide the model toward generating CAD structures that better satisfy real world engineering requirements.
Metrics. Following CAD-Recode [26], we evaluate our method using four metrics: intersection over union (IoU), invalidity rate (IR), mean Chamfer distance (Mean CD), and median Chamfer distance (Med. CD). IoU measures volumetric overlap with the ground truth, IR is the fraction of code failing to compile into valid 3D solids, and CD assesses surface accuracy by sampling 8192 points per model. Both mean and median CD are scaled by for easier comparison.
For quantitative comparisons, we adopt a single-pass evaluation as in Cadrille [12], without test-time best-of-N candidate selection. For qualitative comparisons with other LLM-based methods in Fig. 7, we report the best result among 10 generated candidates for each method. For the RL ablation in Fig. 9 and Table 5, we further report both best-of-10 and worst-of-10 results to analyze the effect of RL in reducing stochasticity.
4.1 Evaluation of SFT and RL
To comprehensively evaluate the proposed method, we conduct quantitative comparisons with representative prior methods on the DeepCAD [32] and Fusion360 [31] test sets, and further compare our method with Cadrille [12] under both the SFT-only and RL-finetuned settings. The quantitative results are reported in Table 1 and Table 2, while qualitative comparisons are shown in Fig. 7.
As shown in Table 1, our method achieves the best overall performance on both DeepCAD [32] and Fusion360 [31]. In particular, under the same Qwen2VL-2B-Direct [29] backbone as Cadrille [12], our method obtains higher IoU and lower Mean CD and median CD, indicating more accurate CAD reconstruction. As shown in the last two rows of Table 1, the performance of our method can be further enhanced by training on the larger CAD-Recode [26]. These results validate the effectiveness of the primitive-aware tokenization and the proposed SFT design.
In Table 2, we evaluate the effectiveness of RL by comparing our method with Cadrille [12] under both the SFT-only and RL-finetuned settings on the Fusion360 dataset [31]. Even without RL, our model already achieves performance on par with the RL-finetuned Cadrille [12]. After RL finetuning, our method consistently outperforms Cadrille [12] on all evaluation metrics, demonstrating that the proposed RL stage further improves reconstruction accuracy and validity on top of the SFT baseline. In Fig. 7, we present qualitative CAD reconstruction results from input point clouds. Compared with CAD-Recode [26] and Cadrille [12], our approach can better-preserved fine-grained geometric features, such as holes and right angles. These qualitative improvements are consistent with the quantitative gains in Table 1 and Table 2, and can be attributed to the combined effect of PTv3 [33] finetuning with primitive labels, the operation alignment during the SFT stage, and the feature-line alignment reward adopted during the RL stage. We also compare our method with CAD-MLLM [34], please refer to supp. material.
We further train and evaluate our method on the complex CAD dataset CADEvolve [6], demonstrating that our framework can generalize to complex CAD operations, including fillet, chamfer, and shell. The results are provided in the supplementary material, demonstrating that our method can reconstruct CAD models with these advanced operations while preserving geometric accuracy.
4.2 Ablations
Primitive-Aware Tokenization and Operation Alignment in SFT. To evaluate the effectiveness of PTv3 [33] finetuning with primitive labels and the proposed operation alignment loss, we conduct an ablation study during the SFT stage. The qualitative and quantitative results are shown in Fig. 8 and Table 3, respectively. Table 3 shows that PTv3 [33] finetuning with primitive labels and the introduction of jointly improve IoU and CD, enhancing overall reconstruction performance. The qualitative comparisons in Fig. 8 are consistent with these quantitative gains. For further ablation studies, please refer to the supp. material.
PrimitiveCAD: An LLM-Based Point-to-CAD Reconstruction with Primitive-Aware Tokenization and Operation Alignment
MM '26, November 10–14, 2026, Rio de Janeiro, Brazil
Table 1: Comparison of point-to-CAD methods on the DeepCAD and Fusion360 datasets [31, 32], training on DeepCAD [32] (DCAD), CAD-Recode [26] (CADR), or both datasets. Our method consistently outperforms existing state of the art methods. For fair comparison, all reported results are obtained without RL finetuning or test-time sampling.
| Method | Year | Train Dataset | DeepCAD Test Set | Fusion360 Test Set | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Mean CD↓ | Med. CD↓ | IoU↑ | IR↓ | Mean CD↓ | Med. CD↓ | IoU↑ | IR↓ | |||
| DeepCAD | 2021 | DCAD | 42.50 | 9.64 | 46.7 | 7.1 | 76.10 | 89.20 | 39.9 | 25.2 |
| Point2Cyl | 2022 | DCAD | - | 4.27 | 73.8 | 3.9 | - | 4.18 | 67.5 | 3.2 |
| HNC-CAD | 2023 | DCAD | - | 8.64 | 65.3 | 5.6 | - | 36.80 | 63.5 | 7.3 |
| MultiCAD | 2023 | DCAD | - | 8.09 | - | 11.5 | - | 42.20 | - | 16.5 |
| TransCAD | 2024 | DCAD | 32.30 | 4.51 | 65.5 | 1.1 | 78.60 | 33.40 | 60.2 | 2.4 |
| CAD-Diffuser | 2024 | DCAD | - | 3.02 | 74.3 | 1.5 | - | 3.85 | 63.2 | 1.7 |
| CAD-SIGNet | 2024 | DCAD | 6.81 | 0.29 | 77.3 | 5.0 | 14.50 | 0.70 | 58.3 | 9.3 |
| Cadrille | 2025 | DCAD | 3.43 | 0.25 | 79.4 | 0.4 | 7.61 | 0.66 | 63.7 | 0.6 |
| Ours | 2026 | DCAD | 0.75 | 0.18 | 86.0 | 0.1 | 0.81 | 0.19 | 82.0 | 0.5 |
| CAD-Recode | 2025 | CADR | 0.83 | 0.18 | 87.1 | 3.1 | 1.21 | 0.19 | 79.1 | 5.0 |
| Cadrille | 2025 | CADR | 0.76 | 0.18 | 87.1 | 2.1 | 1.10 | 0.19 | 79.8 | 2.8 |
| Ours | 2026 | CADR | 0.69 | 0.17 | 89.4 | 1.9 | 0.69 | 0.17 | 81.7 | 1.8 |
| Cadrille | 2025 | DCAD + CADR | 1.37 | 0.19 | 86.6 | 0.9 | 1.05 | 0.22 | 76.5 | 2.0 |
| Ours | 2026 | DCAD + CADR | 0.44 | 0.17 | 90.9 | 0.1 | 0.65 | 0.17 | 84.9 | 0.4 |
GT
Point clouds
CAD-Recode
Cadrille
Ours

Figure 7: Qualitative CAD reconstruction results. Best result among 10 generated candidates for each method. Compared to prior approaches, the proposed method produces reconstructions with more accurate overall shapes and better-preserved fine-grained geometric features.
Number of Points for Tokenization. To analyze the impact of input point numbers on tokenization, we evaluate four different input point quantities. Table 4 shows that the variant using 512 input points performs the worst in terms of IoU and CD, indicating that 512 points are insufficient for learning effective primitive-aware geometric representations. The variants using 1024, 2048, and 4096 input points achieve comparable overall performance. In particular, the 1024-point variant obtains the best IoU, while the 4096-point variant achieves slightly better CD. These results indicate that increasing the number of input points beyond 1024 brings only
Jian Gao, Kailin Bi, Jiamin Xu, Jinlan Xu, & Gang Xu
Table 2: Quantitative comparison of SFT and RL variants on Fusion360 [31].
| Method | Mean CD↓ | Med. CD↓ | IoU↑ | IR↓ |
|---|---|---|---|---|
| Cadrille w/o RL | 1.05 | 0.220 | 76.5 | 2.00 |
| Cadrille w/ RL | 0.58 | 0.176 | 84.8 | 0.46 |
| Ours w/o RL | 0.65 | 0.168 | 84.9 | 0.35 |
| Ours w/ RL | 0.45 | 0.161 | 86.6 | 0.06 |

Figure 8: Visualization of the SFT ablation study. We compare variants with and without PTv3 [33] finetuning and with and without the operation alignment loss .
Table 3: Ablation study of the operation alignment loss during supervised finetuning.
| Method | Mean CD↓ | Med. CD↓ | IoU↑ | IR↓ |
|---|---|---|---|---|
| SFT w/o PTv3 FT | 0.88 | 0.177 | 82.4 | 0.70 |
| SFT w/o | 0.71 | 0.172 | 83.4 | 0.75 |
| SFT | 0.65 | 0.168 | 84.9 | 0.35 |
Table 4: Ablation study with varying numbers of input points for primitive-aware point cloud tokenization.
| Method | Mean CD↓ | Med. CD↓ | IoU↑ | IR↓ |
|---|---|---|---|---|
| 0.66 | 0.171 | 84.4 | 0.35 | |
| 0.65 | 0.168 | 84.9 | 0.35 | |
| 0.66 | 0.170 | 84.6 | 0.46 | |
| 0.62 | 0.167 | 84.6 | 0.41 |
marginal gains. Overall, the results suggest that 1024 input points provide a good balance between reconstruction performance and input complexity, and are sufficient for learning effective geometric representations.
Feature-Line Alignment Reward and RL Strategy. To evaluate the effect of the feature-line alignment reward, we conduct an ablation study with three variants: the SFT-only baseline, an RL model without the feature-line alignment reward, and the full RL model. To demonstrate that RL can effectively reduce stochasticity, we report the best and worst results out of 10 trials. As shown in Table 5 and Fig. 9, RL improves reconstruction robustness compared to the SFT-only baseline, particularly under worst-of-10 evaluation. Removing the feature-line alignment reward reduces IoU and increases CD, demonstrating its contribution to fine-grained geometric supervision, especially in preserving feature-line boundaries and subtle geometric details.

Figure 9: Ablation study on the feature-line alignment reward and RL strategy. Best/worst results over 10 generations are shown.
Table 5: Ablation study on the feature-line alignment reward and RL strategy. Best/worst results over 10 generations are shown.
| Method | Mean CD↓ | Med. CD↓ | IoU↑ | IR↓ |
|---|---|---|---|---|
| w/o RL | 0.27/1.41 | 0.143/0.210 | 89.5/76.2 | 0.00/3.88 |
| Full w/o | 0.28/0.87 | 0.146/0.186 | 89.6/81.5 | 0.00/0.93 |
| Full (Dr. CPPO) | 0.31/0.97 | 0.149/0.188 | 89.4/81.2 | 0.00/1.10 |
| Full | 0.26/0.85 | 0.142/0.179 | 89.6/82.3 | 0.00/0.87 |
We also compare the GRPO [27] strategy used in our RL phase with the Dr. CPPO strategy used in Cadrille [12]. Under the same reward design, Dr. CPPO [12] performs worse than the full model. This may be because Dr. CPPO [12] relies solely on the best and worst samples for preference construction, potentially overlooking valuable supervision from the remaining candidates, which can reduce training stability. In contrast, the full model exhibits small best-worst gaps (mean CD gap = 0.59, median CD gap = 0.037, IoU gap = 7.3, IR gap = 0.87), indicating better and more stable performance across sampled candidates.
5 Conclusion
We propose PrimitiveCAD, a multi-stage approach for generating CAD sequences from point clouds. PTv3 fine-tuning with primitive labels improves geometric representations, operation alignment loss enhances global shape accuracy during SFT, and feature-line alignment reward refines geometric details during RL. Experiments demonstrate the effectiveness of our approach in terms of geometric accuracy, code validity, and reconstruction quality.
Limitation. Currently, our framework mainly focuses on component level generation and does not yet support complex multi-module assembly models, which will be explored in future work.
PrimitiveCAD: An LLM-Based Point-to-CAD Reconstruction with Primitive-Aware Tokenization and Operation Alignment
MM '26, November 10–14, 2026, Rio de Janeiro, Brazil
Acknowledgments
This research was supported by the National Key R&D Program of China (No. 2023YFB3309103), the “Pioneer” and “Leading Goose” R&D Program of Zhejiang Province (No. 2025C01086), the National Natural Science Foundation of China (No. 62572161 and 62302134), the Natural Science Foundation of Zhejiang Province (No. LQ24F020031), and the Hangzhou Key Scientific Research Program (No. 2025SZD1A48).
References
[1] Silvia Ansaldi, Leila De Floriani, and Bianca Falcidieno. 1985. Geometric modeling of solid objects by using a face adjacency graph representation. ACM SIGGRAPH Computer Graphics 19, 3 (1985), 131–139.
[2] Pál Benkő and Tamás Várady. 2004. Segmentation methods for smooth point regions of conventional engineering objects. Computer-Aided Design 36, 6 (2004), 511–523.
[3] Cheng Chen, Jiacheng Wei, Tianrun Chen, Chi Zhang, Xiaofeng Yang, Shangzhan Zhang, Bingchen Yang, Chuan-Sheng Foo, Guosheng Lin, Qixing Huang, et al. 2025. Cadcrafter: Generating computer-aided design models from unconstrained images. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 11073–11082.
[4] CADQuery Developers. 2024. Cadquery: A python parametric cad scripting framework.
[5] Elona Dupont, Kseniya Cherenkova, Dimitrios Mallis, Gleb Gusev, Anis Kacem, and Djamila Aouada. 2024. Transcad: A hierarchical transformer for cad sequence inference from point clouds. In European Conference on Computer Vision. Springer, 19–36.
[6] Maksim Elistratov, Marina Barannikov, Gregory Ivanov, Valentin Khrulkov, Anton Konushin, Andrey Kuznetsov, and Dmitrii Zhemchuzhnikov. 2026. CADEvolve: Creating Realistic CAD via Program Evolution. arXiv preprint arXiv:2602.16317 (2026).
[7] Fengxiao Fan, Jingzhe Ni, Xiaolong Yin, Sirui Wang, Xingyu Lu, Qiang Zou, Ruofeng Tong, Min Tang, and Peng Du. 2026. CADDesigner: Conceptual CAD model generation with a general-purpose agent. Computer-Aided Design (2026), 104087.
[8] James D Foley. 1996. Computer graphics: principles and practice. Vol. 12110. Addison-Wesley Professional.
[9] Soslan Kabisov, Vsevolod Kirichuk, Andrey Volkov, Gennadii Savrasov, Marina Barannikov, Anton Konushin, Andrey Kuznetsov, and Dmitrii Zhemchuzhnikov. 2026. CADReasoner: Iterative Program Editing for CAD Reverse Engineering. arXiv preprint arXiv:2603.29847 (2026).
[10] Mohammad Sadil Khan, Elona Dupont, Sk Aziz Ali, Kseniya Cherenkova, Anis Kacem, and Djamila Aouada. 2024. 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. 4713–4722.
[11] Mohammad S Khan, Sankalp Sinha, Talha U Sheikh, Didier Stricker, Sk A Ali, and Muhammad Z Afzal. 2024. Text2cad: Generating sequential cad designs from beginner-to-expert level text prompts. Advances in Neural Information Processing Systems 37 (2024), 7552–7579.
[12] Maksim Kolodiazhnyi, Denis Tarasov, Dmitrii Zhemchuzhnikov, Alexander Nikulin, Ilya Zisman, Anna Vorontsova, Anton Konushin, Vladislav Kurenkov, and Danila Rukhovich. 2025. cadrille: Multi-modal CAD Reconstruction with Reinforcement Learning. In The Fourteenth International Conference on Learning Representations.
[13] Harold W Kuhn. 1955. The Hungarian method for the assignment problem. Naval research logistics quarterly 2, 1-2 (1955), 83–97.
[14] Jiahao Li, Yusheng Luo, Yunzhong Lou, and Xiangdong Zhou. 2026. Recad: Reinforcement learning enhanced parametric cad model generation with vision-language models. In Proceedings of the AAAI Conference on Artificial Intelligence, Vol. 40. 6190–6198.
[15] Pu Li, Jianwei Guo, Xiaopeng Zhang, and Dong-Ming Yan. 2023. Secad-net: Self-supervised cad reconstruction by learning sketch-extrude operations. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 16816–16826.
[16] Xueyang Li, Jiahao Li, Yu Song, Yunzhong Lou, and Xiangdong Zhou. 2026. SeekCAD: A self-refined generative modeling for 3D parametric CAD using local inference via DeepSeek. In International Conference on Learning Representations, Vol. 2026. 94278–94298.
[17] Yangyan Li, Xiaokun Wu, Yiorgos Chrysathou, Andrei Sharf, Daniel Cohen-Or, and Niloy J Mitra. 2011. Globfit: Consistently fitting primitives by discovering global relations. In Acm siggraph 2011 papers. 1–12.
[18] Jianxing Liao, Junyan Xu, Yatao Sun, Maowen Tang, Sicheng He, Jingxian Liao, Shui Yu, Yun Li, and Xiaohong Guan. 2025. Automated cad modeling sequence generation from text descriptions via transformer-based large language models.
In Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). 21720–21748.
[19] Yujia Liu, Anton Obukhov, Jan Dirk Wegner, and Konrad Schindler. 2024. Point2cad: Reverse engineering cad models from 3d point clouds. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. 3763–3772.
[20] Weijian Ma, Shuaiqi Chen, Yunzhong Lou, Xueyang Li, and Xiangdong Zhou. 2024. Draw step by step: Reconstructing cad construction sequences from point clouds via multimodal diffusion. In 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). IEEE, 27144–27153.
[21] Weijian Ma, Minyang Xu, Xueyang Li, and Xiangdong Zhou. 2023. Multicad: Contrastive representation learning for multi-modal 3d computer-aided design models. In Proceedings of the 32nd ACM International Conference on Information and Knowledge Management. 1766–1776.
[22] Sven Oesau, Florent Lafarge, and Pierre Alliez. 2016. Planar shape detection and regularization in tandem. In Computer Graphics Forum, Vol. 35. Wiley Online Library, 203–215.
[23] Charles R Qi, Hao Su, Kaichun Mo, and Leonidas J Guibas. 2017. Pointnet: Deep learning on point sets for 3d classification and segmentation. In Proceedings of the IEEE conference on computer vision and pattern recognition. 652–660.
[24] Dacheng Qi, Chenyu Wang, Jingwei Xu, Tianzhe Chu, Zibo Zhao, Wen Liu, Wenrui Ding, Yi Ma, and Shenghua Gao. 2026. Pointer-cad: Unifying b-rep and command sequences via pointer-based edges & faces selection. arXiv preprint arXiv:2603.04337 (2026).
[25] Dacheng Qi, Chenyu Wang, Jingwei Xu, Yi Ma, and Shenghua Gao. 2026. Pointer-CAD v2: Plan-Then-Construct CAD Generation with Dimension-Aware Parametric Precision. arXiv preprint arXiv:2606.29301 (2026).
[26] Danila Rukhovich, Elona Dupont, Dimitrios Mallis, Kseniya Cherenkova, Anis Kacem, and Djamila Aouada. 2025. Cad-recode: Reverse engineering cad code from point clouds. In Proceedings of the IEEE/CVF International Conference on Computer Vision. 9801–9811.
[27] Zhihong Shao, Peiyi Wang, Qihao Zhu, Runxin Xu, Junxiao Song, Xiao Bi, Haowei Zhang, Mingchuan Zhang, YK Li, Yang Wu, et al. 2024. Deepseekmath: Pushing the limits of mathematical reasoning in open language models. arXiv preprint arXiv:2402.03300 (2024).
[28] Mikaela Angelina Uy, Yen-Yu Chang, Minhyuk Sung, Purvi Goel, Joseph G Lambourne, Tolga Birdal, and Leonidas J Guibas. 2022. Point2cyl: Reverse engineering 3d objects from point clouds to extrusion cylinders. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 11850–11860.
[29] Peng Wang, Shuai Bai, Sinan Tan, Shijie Wang, Zhihao Fan, Jinze Bai, Keqin Chen, Xuejing Liu, Jialin Wang, Wenbin Ge, et al. 2024. Qwen2-vl: Enhancing vision-language model's perception of the world at any resolution. arXiv preprint arXiv:2409.12191 (2024).
[30] Xiaogang Wang, Yuelang Xu, Kai Xu, Andrea Tagliasacchi, Bin Zhou, Ali Mahdavi-Amiri, and Hao Zhang. 2020. Pie-net: Parametric inference of point cloud edges. Advances in neural information processing systems 33 (2020), 20167–20178.
[31] Karl DD Willis, Yewen Pu, Jieliang Luo, Hang Chu, Tao Du, Joseph G Lambourne, Armando Solar-Lezama, and Wojciech Matusik. 2021. Fusion 360 gallery: A dataset and environment for programmatic cad construction from human design sequences. ACM Transactions on Graphics (TOG) 40, 4 (2021), 1–24.
[32] Rundi Wu, Chang Xiao, and Changxi Zheng. 2021. Deepcad: A deep generative network for computer-aided design models. In Proceedings of the IEEE/CVF international conference on computer vision. 6772–6782.
[33] Xiaoyang Wu, Li Jiang, Peng-Shuai Wang, Zhijian Liu, Xihui Liu, Yu Qiao, Wanli Ouyang, Tong He, and Hengshuang Zhao. 2024. Point transformer v3: Simpler faster stronger. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. 4840–4851.
[34] Jingwei Xu, Chenyu Wang, Zibo Zhao, Wen Liu, Yi Ma, and Shenghua Gao. 2024. Cad-mllm: Unifying multimodality-conditioned cad generation with mllm. arXiv preprint arXiv:2411.04954 (2024).
[35] Runsen Xu, Xiaolong Wang, Tai Wang, Yilun Chen, Jiangmiao Pang, and Dahua Lin. 2024. Pointllm: Empowering large language models to understand point clouds. In European Conference on Computer Vision. Springer, 131–147.
[36] Xiang Xu, Pradeep Kumar Jayaraman, Joseph G Lambourne, Karl DD Willis, and Yasutaka Furukawa. 2023. Hierarchical neural coding for controllable cad model generation. arXiv preprint arXiv:2307.00149 (2023).
[37] Yang You, Mikaela Angelina Uy, Jiaqi Han, Rahul Thomas, Haotong Zhang, Yi Du, Hansheng Chen, Francis Engelmann, Suya You, and Leonidas Guibas. 2025. Img2cad: Reverse engineering 3d cad models from images through vlm-assisted conditional factorization. In Proceedings of the SIGGRAPH Asia 2025 Conference Papers. 1–12.
[38] Hengshuang Zhao, Li Jiang, Jiaya Jia, Philip HS Torr, and Vladlen Koltun. 2021. Point transformer. In Proceedings of the IEEE/CVF international conference on computer vision. 16259–16268.
[39] Xiangyu Zhu, Dong Du, Weikai Chen, Zhiyou Zhao, Yinyu Nie, and Xiaoguang Han. 2023. Nerve: Neural volumetric edges for parametric curve extraction from point cloud. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 13601–13610.