# Research on Three-Dimensional Scanning Path Planning of Casing Parts Based on Industrial Robot
## 3 Scan Path Planning
### Mathematical Modeling of the Circular Scan Path
According to the height \(H_{i}\) of the casing and the cone angle \(\beta\) of the casing, the corresponding radius equation of the scanning is as follows:  
\[R_{i}=(2i-1)\frac{27.5}{2}\sin\beta+R_{0} \tag{3}\]  
The number of times the scanner adjusts the pose \(n\) is as follows:  
\[n=\frac{360^{\lx@math@degree}}{\gamma} \tag{4}\]  
In Figure 7, after the scanner reaches the pose adjustment point A\({}_{1}\), there are regional boundaries \(A_{1}B_{1}\) and \(A_{1}C_{1}\) with the geometric position generated on the outer surface of the casing. \(AW\) is the angular bisector of angular \(\angle\)BAC, and the following relationship was obtained:  
\[\left\{ \begin{aligned} \cos(\frac{\alpha}{2}-\gamma)& =\frac{A_{i}B_{i}{}^{2}+OA_{i}{}^{2}-R_{i}^{2}}{2A_{i}B_{i}OA_{i}} \\ \cos(\frac{\alpha}{2}+\gamma)&=\frac{A_{i}C_{i}{}^{ 2}+OA_{i}{}^{2}-R_{i}^{2}}{2A_{i}C_{i}OA_{i}}\\ OA_{i}&=\frac{(R_{i}+AW)}{\cos\gamma}\end{aligned} \right. \tag{5}\]  
Equation (5) above can obtain the calculation formula of the deflection angle \(\gamma\):  
\[\left\{ \begin{aligned} \gamma&=\arccos\left[\frac{(R+A_{1}W_{1 })^{2}+AC^{2}-R^{2}}{2(R+A_{1}W_{1})AC}\right]-\frac{\alpha}{2}\\ \gamma&=\frac{\alpha}{2}-\arccos\left[\frac{(R+A_{1 }W_{1})^{2}+AB^{2}-R^{2}}{2(R+A_{1}W_{1})AB}\right]\end{aligned} \right. \tag{6}\]  
where \(\cos\frac{\alpha}{2}=\frac{AB^{2}+OA^{2}-R_{1}{}^{2}}{2 AB\times OA}\). 2. Judgment of the scanning boundary  
The scanning field of view corresponding to the laser beam of the scanner is shown in Figure 8. When the initial position of the scanner is at point A, the scanning field width angles in both directions are individually \(\alpha=45^{\circ}\) and \(\theta=50^{\circ}\). When the \(AW\) is 30 cm, the effective field width of the transverse scanning is 25 cm and the effective field width of the vertical scanning is 27.5 cm. Figure 8: The horizontal and vertical field of view of the scanning area of the scanner. According to the standard geometric position relationship between the scanner and the cartridge in Figure 7, when the deflection angle \(\gamma=0^{\circ}\), the boundary distance to the enclosure when the standard position was obtained according to Equation (6):  
\[AB=AC=(R+AW)COS\frac{\alpha}{2}-\sqrt{(R+AW)^{2}{(COS\frac{\alpha}{2})}^{2}-(R+ AW)^{2}+R^{2}} \tag{7}\]  
3. The boundary judgment of the translation limit  
When the scanner moves along the casing arc offset tangent, the laser beams \(AB\) and \(AC\) on both sides of the scanning area also move. The intersection point of the \(A_{1}B_{1}\) laser beam irradiated on the casing arc is point B\({}_{1}\). When \(A_{1}B_{1}\) coincides with the intersection point W of the standard position angle branch to the arc, the length of \(A_{1}B_{1\text{min}}\) is the smallest, which is the boundary of the reference scanning area:  
\[A_{1}B_{1\text{min}}=\sqrt{AW^{2}+{(\frac{25}{2})}^{2}}=32.5\text{ cm} \tag{8}\]  
According to Equations (7) and (8), when AW is in the effective area of the deflection angle, \(A_{1}B_{1}\) conforms to the boundary constraint condition in the translation process. Then, judge \(A_{1}C_{1}\), let \(A_{1}C_{1\text{max}}\)= 40 cm. According to Equation (6), the limit boundary judgment equation of scanning translation is as follows:  
\[\left\{ \begin{aligned} A_{1}C_{1}&=(R+A_{1}W_{1})COS( \frac{\alpha}{2}+\gamma)-\sqrt{(R+A_{1}W_{1})^{2}{[COS(\frac{\alpha}{2}+ \gamma)]}^{2}-(R+A_{1}W_{1})^{2}+R^{2}}\\ A_{1}B_{1}&=(R+A_{1}W_{1})COS(\frac{\alpha}{2}- \gamma)-\sqrt{(R+A_{1}W_{1})^{2}{[COS(\frac{\alpha}{2}-\gamma)]}^{2}-(R+A_{1} W_{1})^{2}+R^{2}}\end{aligned} \right. \tag{9}\]  
The variation range of the deflection angle is obtained by simplifying Equation (9):  
\[0\leq\gamma\leq\arccos\frac{(R+A_{1}W_{1})^{2}+AC^{2}-R^{2}}{2(R+A_{1}W_{1}) AC}-\frac{\alpha}{2} \tag{10}\]  
where \(AC\leq 40\) cm; \(A_{1}W_{1}=\frac{R+AW}{COS\gamma}-R\). 4. The rising posture adjustment process  
After completing the first ring scan, the scanner returns to the starting point A.