## 4 Methodology
### Extract Cross-Sectional Sketches and Reconstruct Features
#### 4.2.3 Reconstructing Features Based on Open CASCADE  
Utilizing the application programming interface (API) functions of Open CASCADE, guided by the cross-sectional sketch curve \(C(t)\) and the feature path \(\Gamma\), the reconstruction of four distinct features (extrusion, rotation, sweep, lofing) is conducted. The subsequent section elaborates on the specific methodologies for reconstructing these four features. 1. Extrusion feature  
For extrusion features, the pseudocode snippet for this process is provided as Algorithm 1:  
```
Input: manifold triangular mesh \(\mathcal{M}\) cross-sectional sketch curve \(\mathcal{C}(t)\) maintains a consistent shape, feature path \(\Gamma\) Output: solid \(\mathcal{S}\) // fitting with patches that suitable for reconstructing extrusion feature for each patch \(i\in\mathcal{M}\)do  fit each patch as extrusion feature using \(\mathcal{C}(t)\) and \(\Gamma\);  end for
```  
**Algorithm 1** Procedure of reconstructing extrusion feature  
```
Input: manifold triangular mesh \(\mathcal{M}\) cross-sectional sketch curve \(\mathcal{C}(t)\) maintains a consistent shape, feature path \(\Gamma\) Output: solid \(\mathcal{S}\) // fitting with patches that suitable for reconstructing sweep feature for each patch \(i\in\mathcal{M}\)do  fit each patch as sweep feature using \(\mathcal{C}(t)\) and \(\Gamma\);  end for
```  
**Algorithm 2** Procedure of reconstructing sweep feature  
```
Input: manifold triangular mesh \(\mathcal{M}\) cross-sectional sketch curves \(\mathcal{C}(t)\) consists of a series of \(n\) rings varying in radii, feature path \(\Gamma\) Output: solid \(\mathcal{S}\) // fitting with patches that suitable for reconstructing rotation feature for each patch \(i\in\mathcal{M}\)do for every pair of adjacent rings varying in radii, depicted as \(\mathcal{C}(t_{j})\) and \(\mathcal{C}(t_{j+1}



* (d) Lofting feature For lofting features, the pseudoc snippet for this process is provided as Algorithm 4:
```
Input: manifold triangular mesh \(\mathcal{M}\) cross-sectional sketch curves \(\mathcal{C}(t)\) consists of a series of \(n\) rings varying in radii, feature path \(\Gamma\) Output: solid \(\mathcal{S}\) // fitting with patches that suitable for reconstructing lofting feature for each patch \(i\in\mathcal{M}\)do for every pair of adjacent rings varying in radii, depicted as \(\mathcal{C}(t_{j})\) and \(\mathcal{C}(t_{j+1})\), do  fit each sub-patch as lofting feature using \(\mathcal{C}(t_{j})\), \(\mathcal{C}(t_{j+1})\) and \(\Gamma\)  end for  end for
```

**Algorithm 4** Procedure of reconstructing lofting feature

## 5 Experimental Results

### Implementation for Extracting Feature Paths and Cross-Sectional Sketches

In order to evaluate the feasibility of the feature path acquisition method detailed in Section 4.1, a case study was conducted to optimize the orientation of feature cross-sections and extract feature paths. The results of the implementation are presented as follows. Figure 6 demonstrates the comparative effects before and after the optimization of the feature cross-sectional orientation across six types of triangular mesh models. For the initial four CAD models with clearly defined sharp features, the test findings indicate that the number of iterations required is consistently below five cycles. In contrast, for the fifth and sixth models characterized by noise and intricate surfaces common in cultural and creative designs, the iteration times can be controlled within 10 cycles. The results validate the capability of our approach to reduce the duration of this process while ensuring the accurate extraction of feature cross-sections. Figure 7 depicts the extraction of four typical feature sections and paths to assess their significance. Feature sections are obtained from the CAD meshes, showcasing distinctive boundary features in Figure 7a-c, as well as the intricate surface in Figure 7b. These sections are aimed at accurately reconstructing the original triangular mesh without any visible intersections or repetitions.