## 5 Assembly Contact Forces and Resulting Part Deviations
### Inspection of the Plane Position of the Assembly Contact Fit Area  
Two parts to be assembled may have interference or gaps in the assembly contact fit area. If interference exists, the assembly force is applied to the two parts at the location of the interference or gap by the assembly plate before the riveeting or welding operation to eliminate the impending interference or gap and to ensure that the assembly stressesgenerated by the two parts in the assembly contact fit area are minimized. At this point in the assembly process, the part deformation caused by the assembly stresses between the two parts can be ignored and only the part deviation caused by the assembly forces on the assembly plate can be ignored. Through flush coordinate transformation, the deviation vector of each part and the normal vector of the mating plane in the contact fit zone are unified in the global coordinate system, and the deviation of the measuring point of the part in the contact fit zone can be tested for contact relationship. To design a contact relationship detection algorithm for the contact fit planes, based on the vertex coordinates of the two fit planes, the normal vector of the two planes in the global coordinate system is used as the contact normal to detect whether there is interference or a gap between the two planes, and, thus, determine the fit of the two planes. The Devillers and Guigue algorithm (Devillers' algorithm) is a spatial triangle intersection detection algorithm that determines whether two triangles in space intersect in terms of the positivity or negativity of the determinant of each vertex on the triangle. The specific usage is as follows, the spatial position coordinates of four points in the known space:  
\[A\!= \begin{bmatrix}x_{A}&y_{A}&z_{A}\end{bmatrix} ^{T}\!,\,B\!= \begin{bmatrix}x _{B}&y_{B}&z_{B}\end{bmatrix} ^{T}\!,\,C\!= \begin{bmatrix}x_{C}&y_{C}&z_{C} \end{bmatrix} ^{T}\!,\,D\!= \begin{bmatrix}x_{D}&y_{D}&z_{D}\end{bmatrix} ^{T} \tag{25}\]  
define Equation (26) as the determinant algorithm 1:  
\[ \begin{array}{ccccc}\left|A&B&C&D\right|_{1}=\begin{vmatrix}x_{A}&y_{A}&z_{A} &1\\ x_{B}&y_{B}&z_{B}&1\\ x_{C}&y_{C}&z_{C}&1\\ x_{D}&y_{D}&z_{D}&1\end{vmatrix}=(A-D)\!\cdot\!(B-D)\times(C-D)\end{array}  \tag{26}\]  
As shown in Figure 8, the four vertices of the contact fit area of part 1 and part 2 are connected to form quadrilaterals \(Q_{1}\) and \(Q_{2}\). The vertices of \(Q_{1}\) and \(Q_{2}\) are noted as \(A_{Q_{1}}\), \(B_{Q_{1}}\), \(C_{Q_{2}}\), \(D_{Q_{1}}\) and \(A_{Q_{2}}\), \(B_{Q_{2}}\), \(C_{Q_{2}}\), \(D_{Q_{2}}\), respectively, and the points \(A_{Q_{1}}\), \(B_{Q_{1}}\), \(C_{Q_{1}}\) and the points \(A_{Q_{2}}\), \(B_{Q_{2}}\), \(C_{Q_{2}}\) form triangles \(S_{1}\) and \(S_{2}\). If the two triangles satisfy the intersection of space triangles test equation:  
\[\left|A_{Q_{1}}&B_{Q_{1}}&A_{Q_{2}}&B_{Q_{2}}\right|_{1}\leq 0\cap\left|A_{Q_{1 }}&C_{Q_{1}}&A_{Q_{2}}&C_{Q_{2}}\right|_{1}\leq 0 \tag{27}\]  
However, [PERSON] algorithm can only be used to determine whether two planes intersect, as shown in Figure 9, when the plane \(Q_{1}\) completely penetrates \(Q_{2}\); the penetration  
Figure 8: Interference and clearance between contact fit zone planes \(Q_{1}\) and \(Q_{2}\).then the two triangles \(S_{1}\) and \(S_{2}\) intersect in space, i.e., the contact fit zone planes \(Q_{1}\) and \(Q_{2}\) are in both interference and clearance. relationship between the two planes cannot be correctly judged. Therefore, a spatial triangle penetration detection algorithm based on the deviation of the part measurement points is proposed to determine the penetration relationship between two triangles in space with the help of the positive and negative of the determinant formed by the deviation of each vertex on the plane triangle.