## 3 Parallel Manipulator Mathematical Model
In this case, we write the first condition for the absence of intersections as:  
\[D_{link}<\sqrt{\left(x^{\prime}\right)^{2}+\left(y^{\prime}\right)^{2}+\left(z^{ \prime}\right)^{2}}, \tag{33}\]  
where \(D_{link}\) is the diameter of the links, \(x^{\prime},y^{\prime},z^{\prime}\) is the distance between the nearest points of the segments along each of the axes and are defined as:  
\[x^{\prime}=\left\{ \begin{array}{cc}\underset{i\in 1,2}{min}x_{Ai}-\underset{j\in 3,A}{max}x_{Ai}\ \text{if}\ \underset{i\in 1,2}{min}x_{Ai}\ \text{is}\ \underset{i\in 1,2}{max}x_{Ai},\\ \underset{i\in 3,A}{min}x_{Ai}-\underset{i\in 1,2}{max}x_{Ai}\ \text{if}\ \underset{i\in 3,A}{min}x_{Ai}>\underset{i\in 1,2}{max}x_{Ai},\\ 0\ \ if\ \left[\underset{i\in 1,2}{min}x_{Ai};\underset{i\in 1,2}{max}x_{Ai} \right]\cap\left[\underset{i\in 3,A}{min}x_{Ai};\underset{j\in 3,A}{max}x_{ Ai}\right].\end{array} \right. \tag{34}\]  
The values \(y^{\prime}\) and \(z^{\prime}\) are defined similarly. There is no intersection of the links when the minimum distance u between the segments \(A_{1}A_{2}\) and \(A_{3}A_{4}\) is greater than the diameter of the links \(D_{link}\):  
\[D_{link}>u \tag{35}\]  
Consider two cases of relative position of links. **Case 1. ** The links are parallel in the case when the condition is fulfilled:  
\[\frac{x_{A2}-x_{A1}}{x_{A4}-x_{A3}}=\frac{y_{A2}-y_{A1}}{y_{A4}-y_{A3}}=\frac{ z_{A2}-z_{A1}}{z_{A4}-z_{A3}} \tag{36}\]  
Determine the minimum distance between the segments by rotating the segments relative to the point \(A_{1}\) so that they become perpendicular to the YOZ plane. Let us denote for points \(A_{2},\ \ A_{3}\) and \(A_{4}\) the obtained coordinates of points after rotation as \(A_{12},\ \ A_{13}\) and \(A_{14}\), respectively. Taking into account the rotation of the segments to the perpendicular position to the YOZ plane, the coordinates of the points \(A_{12},\ A_{13}\) and \(A_{14}\) are calculated as:  
\[x_{A1i}=x_{A1}+c_{i}^{(a)}(x_{Ai}-x_{A1})+s_{i}^{(a)}\Big{(}s_{i}^{(b)}(y_{Ai} -y_{A1})+c_{i}^{(b)}(z_{Ai}-z_{A1})\Big{)}, \tag{37}\]  
\[y_{A1i}=y_{A1}+c_{i}^{(b)}(y_{Ai}-y_{A1})-s_{i}^{(b)}(z_{Ai}-z_{A1}), \tag{38}\]  
\[z_{A1i}=z_{A1}-s_{i}^{(a)}(x_{Ai}-x_{A1})+c_{i}^{(a)}\Big{(}s_{i}^{(b)}(y_{Ai} -y_{A1})+c_{i}^{(b)}(z_{Ai}-z_{A1})\Big{)}, \tag{39}\]  
Figure 3: Representation of the links of the mechanism. where \(s_{i}^{(a)}=\sin\left(\tan^{-1}\left(\frac{s_{i}(y_{A}-y_{A1})+c_{b}(z_{A1}-z_{A1}) }{x_{A1}-x_{A1}}\right)\right)\), \(c_{i}^{(a)}=\cos\left(\tan^{-1}\left(\frac{s_{i}(y_{A}-y_{A1})+c_{b}(z_{A1}-z_{A1}) }{x_{A1}-x_{A1}}\right)\right)\), \(s_{i}^{(b)}=\sin\left(\tan^{-1}\frac{y_{A1}-y_{A1}}{z_{A1}-z_{A1}}\right)\), \(c_{i}^{(b)}=\cos\left(\tan^{-1}\frac{y_{A1}-y_{A1}}{z_{A1}-z_{A1}}\right)\), \(i\in 2,\ 3,\ 4\). In this case, \(y_{A12}=y_{A1},\ z_{A12}=z_{A1},\ y_{A13}=y_{A14},\ z_{A13}=z_{A14}\). The distance between the segments is determined as:  
\[u=\sqrt{u_{1}^{2}+u_{2}^{2}}, \tag{40}\]  
where \(u_{1}\) is the distance between the segments \(A_{1}A_{12}\) and \(A_{13}A_{14}\) in the projection onto the YOZ plane, \(u_{2}\) is the distance between the nearest points of the segments along the X axis. They are defined as:  
\[u_{1}=\sqrt{\left(y_{A13}-y_{A1}\right)^{2}+\left(z_{A13}-z_{A1}\right)^{2}} \tag{41}\]  
\[u_{2}=\left\{ \begin{array}{c}\min\limits_{i\in 1,12}x_{Ai}-\max\limits_{j\in 1 3,14}x_{Aj}\ \text{if}\ \min\limits_{i\in 1,12}x_{Ai}>\max\limits_{i\in 1,12}x_{ Ai},\\ \min\limits_{i\in 3,14}x_{Ai}-\max\limits_{i\in 1,12}x_{Ai}\ \text{if}\ \min\limits_{i\in 1 3,14}x_{Ai}>\max\limits_{i\in 1,12}x_{Ai},\\ 0\ \text{if}\ \left[\min\limits_{i\in 1,12}x_{Ai};\max\limits_{i\in 1,12}x_{ Ai}\right]\cap\left[\min\limits_{i\in 13,14}x_{Ai};\max\limits_{i\in 13,14}x_{ Ai}\right].\end{array} \right. \tag{42}\]  
Figure 4 shows examples of verification for the first case of intersection of links. Figure 4a shows an example when \(u_{1}>D_{link}\), and \(u_{2}=0\), since the coordinate intervals of the segments along the \(X\) axis intersect.