## 4 Methodology
### Extract Cross-Sectional Sketches and Reconstruct Features
#### 4.2.3 Reconstructing Features Based on Open CASCADE
Likewise, feature paths, exemplified in Figure 7a,c for arc-type paths, Figure 7b for straight-line paths, and Figure 7d for B-spline paths, are also acquired. The validation results validate that the discussed feature extraction method effectively captures these attributes for reconstruction within the triangular mesh region. Specifically tailored for CAD triangular mesh models, this approach minimizes the number of sections utilized to streamline subsequent feature reconstruction, thereby reducing computational complexity. Figure 6: Comparison of the effects before and after optimizing the direction of feature sections, where the black line indicates the initial orientation and the red line denotes the optimized orientation. To evaluate the feasibility of the cross-sectional sketch extraction approach outlined in Section 4.2, four types of features (extrusion, rotation, sweep, and lofting) were selected for verification analysis. The triangular mesh region designated for transforming into the mentioned features was conceptualized as a generalized sweep volume (GSV) defined by the cross-sectional sketch and feature path. The reconstruction procedure was divided into four phases: point sampling, piecewise fitting of curves, applying geometric constraints, and feature reconstruction. The results of the implementation are elaborated upon below:

1. Point sampling

Figure 8 presents the segmented mesh area designated for reconstructing the four types of features, depicting the extracted results of the cross-sectional sampling points. The results highlight the efficacy of our method in precisely capturing the sampling points from the triangular mesh contour intercepted by the feature section. Notably, areas with pronounced curvature, such as fillets and chamfers, exhibit a significantly higher density of sampling points compared to regions with lower curvature, such as straight lines. This varying distribution guarantees that the sampling point contour successfully replicates the true cross-sectional shape to a substantial extent. 2. Piecewise fitting of curves

The sampling point contour undergoes piecewise fitting, incorporating straight line segments (L), arcs (C), and B-spline curves (B) as illustrated in Figure 9. For the extrusion

Figure 8: Acquisition of sampling points for four types of feature sections: (**a**) extrusion; (**b**) rotation; (**c**) sweep, and (**d**) lofting. Figure 7: The typical feature cross-section and feature path extraction effects are depicted as follows: (**a–c**) illustrate CAD meshes, while (**d**) represents an intricate surface. feature, 10 straight lines and two arc segments are utilized. In the rotation feature, two complete arc segments are employed. The sweep feature involves two arc segments and two B-spline curve segments. The lofting feature transforms the sampling point contour into a closed B-spline curve. It is important to note that while the segmented fitting results in a closed and well-reconstructed sketch, the absence of geometric constraints and dimensions results in irregular shaping that inadequately represents the original design intent. Applying geometric constraints

Geometric constraints are applied to each segmented curve upon fitting, dimensions are labeled accordingly, and the over-defined constraint issue is optimized. This effect is demonstrated in Figure 10, where the curve highlighted in red represents an over-defined curve, while the optimized curves are all indicated in black. ### Feature reconstruction

In Figure 11, the reconstruction effects of the four types of features are presented, along with the parametric and variant designs. The experimental results illustrate that our methodology can not only convert unstructured triangular meshes into appropriate CAD features but also parameterize and customize features for variant design. This sets the stage for extracting sophisticated design details, such as construct solid geometry (CSG) trees, from unstructured manifold surfaces.