## 2 Constructing Virtual Prototype
### Construction of the Mesh Solid Model Layer
#### 2.1.3 Mesh Solid Modelling  
The key parts of agricultural machinery follow strict parametric design. This study starts with the design parameter equation of each part to fit the part contour, and the generated mesh solid structure corresponds to the real structure. For example, the involute equation is used to fit the gear. Compared with the traditional complex surface fitting algorithm, its mesh solid accuracy and calculation efficiency are higher. The mesh solid model built by the system is the core part of the virtual prototype, which solves the problem of the weak ability of the traditional virtual prototype in physical simulation and continuous collision and interference detection of multiple parts. The arc feature can be decomposed into a mesh solid model composed of a finite number of trapezoidal elements. The gear features can be decomposed into finite tooth section elements along the axial direction to fit the gear features of helical, spiral, and conical teeth. The bright green wireframe in the following figures represents the bounding box of the part. Figure 9a is the 3D model; Figure 9b shows the built-in mesh trigger without physical simulation and collision trigger detection function; Figure 9c is the mesh solid model constructed in this paper, including the gear feature and arc feature of the inner hole. Gear Feature Mesh Solid Modelling  
\[R_{b}=M\times Z\times cos20^{\circ}/2 \tag{12}\]  
\[\frac{\varphi_{a}-\varphi_{b}}{A_{T}}\times i+\varphi_{b}=\varphi_{i} \tag{13}\]  
\[\frac{arcsin(M\times\pi/4)}{\sqrt{2^{2}+y^{2}}}+arctang/z=\delta_{r} \tag{14}\]  
\[t= B/A_{r} \tag{15}\]  
Figure 8: Process and mesh solid model for detecting the inner contour. Figure 9: Relationship diagram between the 3D model and the mesh solid model. \[2\times\pi/Z=\chi \tag{16}\]  
First, the algorithm divides the rolling angle range \([\varphi_{b},\varphi_{a}]\) into finite values \(\varphi_{i}\) according to the accuracy \(A_{T}\) and obtains the corresponding points \(\overset{\rightarrow}{P_{i}}\) on the involute; among them, \(\varphi_{a}\) is the rolling angle corresponding to the intersection P2 of the addendum circle and the involute, and \(\varphi_{b}\) is the rolling angle corresponding to the intersection P1 of the base circle and the involute. Then, the involute rotates around the origin \(\delta_{r}\) radians, mirrors clone along the \(z\)-axis to obtain all differential contour points of the gear section and translates and clones the gear section points on the back to construct the mesh element (see gear section and mesh element). In Formula (12), \(M\) is the module of the spur gear and helical gear and the module of the large end of the spiral bevel gear; \(Z\) is the number of teeth of the gear; and \(y,z\) are the Y and Z coordinates of the intersection of the dividing circle and the involute. \(B,A_{r}\) are the width of the gear and the division accuracy of the tooth line, respectively. When the gear is a cylindrical spur gear, each mesh element is arranged along the axial direction (see spur gear in Figure 10). When the gear is a cylindrical helical gear or a bevel gear, each mesh element with a thickness of \(t\) is arranged along the helix or spiral direction (see the black dotted line in helix gear and spiral bevel gear) to form the mesh solid model of a single gear tooth. Finally, the mesh solid model of a single gear tooth is cloned \(Z\) times, and each clone rotates \(\chi\) radians around the rotation axis of the part to construct the mesh solid model of gear features (see helix gear and spiral bevel gear in Figure 11). Arc Feature Mesh Solid Modelling  
The algorithm divides the arc into broken segments and uses a finite number of trapezoidal mesh elements to fit the arc features. The fitting diagram and effect diagram of the mesh solid model are as Figure 12. The red trapezoid represents a mesh unit with an arc feature. Figure 11: Mesh element and mesh solid model. Figure 10: Process of mesh solid modelling of gear.