## 4 Methodology
### Extract Cross-Sectional Sketches and Reconstruct Features
#### 4.2.3 Reconstructing Features Based on Open CASCADE
Figure 9: Piecewise fitting of cross-sectional sketch curves oriented toward four types of features: (**a**) extrusion; (**b**) rotation; (**c**) sweep, and (**d**) lofting. Figure 10: Cont. Figure 10: Apply geometric constraints and dimensions to the sketches, followed by optimizing the impact of over-constraints. ### Comparative Analysis

In this section, we compare our method with representative CAD reconstruction works that produce geometric primitives, where applicable, to highlight the relative strengths of different approaches. Specifically, we focus on works that adopt the \"segmentation + primitive fitting\" paradigm for patch reconstruction, such as RANSAC [11], SPFN [19], ParSeNet [20], and HPNet [21]. The dataset used in this study is a subset of the ABC dataset [43]. It consists of 20,000 models for training and 3000 models for testing. To ensure fair comparisons, this dataset follows the same split as used by [PERSON] et al. [20]. Before analysis, all meshes undergo a data cleaning process to eliminate errors. We utilize four metrics to evaluate the accuracy of the reconstructed CAD model compared to the ground truth (GT): (1) The Chamfer distance, a bidirectional residual measure that disregards separation into surfaces [19; 20; 21]. (2) The residual error, which measures the degree of alignment between each generated patch and its corresponding target segment regions, quantified using the calculation formula provided in [19; 20; 21]. (3) P-coverage, which measures the percentage of input vertices on the mesh surface that was covered by the predicted patches, calculated according to the formula described in [19; 20; 21]. (4) The patch-to-patch topology error, which quantifies the structural fidelity of the reconstructed topology by measuring its deviation from the adjacency matrix of the GT, also discussed in [19; 20; 21]. According to the experimental results presented in Figure 12, our method demonstrates notable advantages over other \"segmentation + primitive fitting\" approaches in terms of Chamfer distance, residual error, and P-coverage, which are the three primary met

Figure 11: Parametric and variant designs from triangular meshes: (**a**) demonstrates the triangular mesh area designated for reconstruction; (**b**) highlights the feature reconstruction effect; (**c**,**d**) present the new features generated after parametric editing. rics for evaluating the accuracy of geometric reconstruction. Compared to RANSAC [11], SPFN [19], ParSeNet [20], and HPNet [21], our results show a significant reduction in Chamfer distance. Additionally, our method significantly improves the P-coverage metric. This improvement is primarily due to our unified mathematical representation that categorizes four common solid CAD features as GSV, enabling us to utilize the API functions provided by the Open CASCADE kernel to perform CAD model reconstruction with enhanced geometric accuracy compared to fitting geometric primitives. Given the importance of Boundary Representation (B-Rep) topology in assessing the consistency of CAD models, we also evaluated the topology error between different features reconstructed within a single model using the patch-to-patch topology error metric. We integrate different types of features reconstructed in various regions with the assistance of the Open CASCADE kernel to obtain a legitimate B-Rep model. As shown in Figure 12d, our method significantly outperforms the \"segmentation + primitive fitting\" methods in terms of topological error. ### Case Studies in CAD Software

To validate the incorporation of our approach into commercial CAD software, we created a cloud-native CAD application tailored for customized 3D-printing purposes. This application is constructed on the Open CASCADE platform and is capable of direct operation within a web browser. The developmental procedure included utilizing Open CASCADE's Python interface, PythonOCC 7.7.0 [44], and incorporating Flask 2.3.0 [45] as the web microservices framework.