This paper presents a new spiral smoothing method to generate smooth curved tool paths directly on mesh surfaces. Spiral tool paths are preferable for computer numerical control (CNC) milling, especially for high-speed machining. At present, most spiral tool path generation methods aim mainly for pocketing, and a few methods for machining complex surface also suffer from some inherent problems, such as selection of projecting direction, preprocessing of complex offset contours, easily affected by the mesh or mesh deformation. To address the limitations, a new spiral tool path method is proposed, in which the radial curves play a key role as the guiding curves for spiral tool path generation. The radial curve is defined as one on the mesh surface that connects smoothly one point on the mesh surface and its boundary. To reduce the complexity of constructing the radial curves directly on the mesh surface, the mesh surface is first mapped onto a circular region. In this region, the radial lines, starting from the center, are planned and then mapped inversely onto the mesh surface, thereby forming the desired radial curves. By traversing these radial curves using the proposed linear interpolation method, a polyline spiral is generated, and then, the unfavorable overcuts and undercuts are identified and eliminated by supplementing additional spiral points. Spline-based technique of rounding the corners is also discussed to smooth the polyline spiral, thereby obtaining a smooth continuous spiral tool path. This method is able to not only greatly simplify the construction of radial curves and spiral tool path but also to have the ability of processing and smoothing complex surfaces. Experimental results are presented to validate the proposed method.

## Introduction

Mesh surface has been widely used in the fields of computer numerical control (CNC) milling, rapid prototyping, and incremental forming, especially along with the stereo lithography (STL) format as the de facto standard data input in many commercial computer-aided design/computer aided manufacturing (CAD/CAM) system [14]. Compared with the parametric models, the mesh surface is more flexible to approximate the complex surface and is easier to check the gouge and collision in CNC milling. However, due to the lack of information of the parametric domain for mesh surfaces, tool path generation methods for the parametric surface are difficult to be directly used for CNC milling of mesh surface. As a result, the tool path of iso-planar type, which is generated by slicing the mesh surface using a series of parallel planes, is the typical choice for machining a mesh surface even at the expense of machining quality and efficiency in CNC milling [5]. Iso-planar method is simple and straightforward in the aspect of tool path computation but it has the inherent disadvantage that excessive short paths may be generated when processing the surface with complex shapes, especially with irregular boundary [6]. Such tool paths usually increase the number of interruptions or rapid traversals of tool motions and leave the apparent unfavorable tool marks of tool entries and/or exits on the surface. The ultimate goal of tool path planning is to achieve good machined surface quality by finding the most suitable path topology within the shortest machining time. The best possible way to mill a complex surface would be to do it in a continuous fashion, with a least number of interruptions or air cutting as possible for maximum cutting efficiency [7]. This is especially important for high-speed machining due to the extremely fast cutter movement during high-speed cutting. In the work of Zhang and Tang [8], it was recognized that it is extremely critical for five-axis high-speed milling that the generated five-axis tool paths should not consist of any sharp-turn or rapid retracting tool motion, especially in the finishing process. Also, smooth tool path is important for flank machining [9]. It has been pointed out that, for good quality of complex surface machining, it is more desirable to have smooth tool motions, such as spiral tool path, for high-speed finishing of complex surfaces. At present, most spiral tool path generation methods are primarily applied for 2.5D pocketing, as mentioned in Refs. [1017]. From literatures, there are only handful studies that focused on the spiral tool path generation for complex surface machining. To address the challenging issues of high-speed machining complex surfaces, the objective of this paper is to present an in-depth study on the spiral tool path generation for mesh surface machining with a new efficient solution. In the following, we first list four of the current common practices of spiral path generation methods:

1. (1)

Projection-based methods [1820]: This method is well known in commercial CAD/CAM systems, such as ug/nx [18]. It generates spiral tool path by projecting Archimedean spiral onto the design surface along a fixed direction. However, this method has two distinct disadvantages: one is the distance between the adjacent paths increases along with the increase of the slope of part surface [19], as shown in Fig. 1(a). Especially, when the surface normal is vertical or near vertical to the projecting direction, no spiral paths will be generated for these regions (see Fig. 1(a)). The other disadvantage is projecting Archimedean spiral onto complex surface will cause excessive rapid traversals or interruptions of smooth tool motions, as an example shown in Fig. 1(b). To solve the first problem, Gong et al. [19] introduced the concepts of the space spiral and the surface of quasi-revolution. The space spiral is designed on a base surface of revolution, and then, it is projected onto the surface of quasi-revolution along the normal direction of the base surface. A prerequisite for using this method is the angle between the normal of the base surface and the normal of the design surface has to be less than a specified angle limit. This condition limits its usefulness in milling the surface of different types. Later, a method proposed by Huertas-Talón et al. [20] solved the second problem. In Huertas-Talón's method, the first two-dimensional (2D) profile was created by projecting the part boundary on a Z-plane, and it was an offset continuously toward inside. A planar spiral path was created as a diagonal curve between the parallel profiles. Then, the spiral path was gained by projecting the planar spiral onto the mesh surface. Since this method still relies on the projection along Z-axis, the first problem mentioned earlier is inevitable yet when the surface consists of high-slope regions.

2. (2)

Offset contour-based methods [7,21,22]: This type of method was first proposed by Lee [7]. In his method, the offset contours were created continuously, and then, the spiral tool path was generated as a diagonal curve between the offset contours. To avoid the undesired artifacts in the spiral cutting operations of starting on the outside border and stopping in the center, Hauth and Linsen [21] designed further a double-spiral tool path between the neighboring offset curves so that the starting point and the ending point of the spiral tool path both lie on the outside border of the surface. As mentioned in Ref. [21], their method still relied on the computation of offset curves. But computation of the offset curves on a complex surface has proven to be not a very easy task, especially for recognition and removal of complicated self-intersections of the offset curves [23]. To simplify the problem, instead of using offset curves, Malhotra et al. [22] used the slicing contours to compute the diagonal spiral so that self-intersections of the contours could be automatically avoided. The dependency of the slicing algorithm on the slicing direction may cause a new problem that the slicing contours may not be generated at the region where the surface normal is nearly parallel to the slicing direction, resulting in an undesired slicing contours when processing a complex surface model, as an example shown in Figs. 2(a) and 2(b).

3. (3)

Solution of partial differential equation (PDE) based methods [10,13,24]: Initially, this method was only applied for 2D pocket machining [10]. On 2D pocket region to be machined, the PDE problem is defined which is subject to Dirichlet boundary condition applied to the outside boundary of a pocket. The iso-value curves of the PDE solution were used to guide the spiral tool path generation. Zhou et al. [24] extended this method to the surface machining. In their method, the iso-curves, which were the solution contours of PDEs of thermal conductivity model, were first constructed on the parametric domain formed by the surface projection maximum contour and the boundary condition. Then, the iso-curves were mapped back onto the surface, forming the spiral tool path. For PDE-based methods, spiral tool path construction depends on the numerical mesh resolution used for computation of iso-curves of PDE solution [13], especially when processing the regions with sharp corners, the mesh has to be carefully designed. As shown in Fig. 3, since three vertices of the triangle at the sharp corner all lie on the boundary, it is impossible to generate an iso-curve on this triangle. Also, since the triangles near this corner are very close to the mesh boundary and this boundary triangle, it makes the iso-curve far away from this corner, as shown in Fig. 3(c), so that the undesirable distribution of path interval appears at this corner.

4. (4)

Mapping-based methods [6,25,26]: This method was developed earlier by our research team [6,26]. The mapping-based method realizes the harmonic mapping, which satisfied the Laplace equation, from the physical surface to a region of a simple topology by constructing a piecewise linear approximation [25]. Once the mapping relationship between the design surface and the planar region is created, Archimedean spiral on the planar region can be mapped inversely onto the part surface, forming the spiral tool path [26]. Since this method does not involve the operations depending on the projecting direction, it can process a relatively complex surface without suffering from the drawbacks of other methods mentioned previously [6]. For the mapping-based methods, the mapping of the mesh surface to the circular region can be seen as stretching or extruding the elastic triangles onto the planar region. The mesh mapping deformation has great influence on the distance between two successive turnings of the spiral tool path, though it is constant for Archimedean spiral on the planar region. As shown in Fig. 4(a), when processing the surface with sharp corner, the mesh deformation makes the spiral path far away from the corner. When generating the spiral tool paths on the surface with high slope, the distribution of the path interval varies unevenly from the boundary to the center of the surface, as shown in Fig. 4(b). In such situations, the distance between the turnings of the spiral tool path has to be carefully computed so that the machining requirement can be satisfied.

Fig. 1
Fig. 1
Close modal
Fig. 2
Fig. 2
Close modal
Fig. 3
Fig. 3
Close modal
Fig. 4
Fig. 4
Close modal

Existing spiral path generation methods unfortunately suffer from some typical inherent limitations, such as selection of the desirable projecting direction of the planar spiral [1820], preprocessing of complex offset curves [7,21,22], easily affected by the mesh [10,24] or mesh deformation [25,26]. To overcome these problems, a new spiral tool path generation method is presented in this paper. In this new method, radial curves on the mesh surface are first introduced, which plays a key role to guide the spiral tool path generation. The radial curve method can not only simplify the operation of generating spiral tool path but also makes this method capable of processing the surface with complex shapes and high slopes. As the practical example results shown in Sec. 4, the experimental results validate the effectiveness of the proposed method. The remainder of the paper is organized as follows: Section 2 presents the radial curve generation method. Section 3 shows detailed methods of interpolating and smoothing spiral tool paths and the technique of how to eliminate the undercut and overcut in the spiral path. Section 4 presents the experimental results in detail. Section 5 gives the discussion and future works, followed by the concluding remarks in Sec. 6.

## Radial Curve Planning for Spiral Path Generation

In this paper, radial curves are selected for spiral tool path planning. To serve the planning objective in this paper, radial curves are defined as a family of curves on a mesh surface, which connects smoothly one point on the mesh surface and its boundary. These radial curves have the characteristics of having no sharp corners and neither self-intersecting nor intersecting with each other. Generally, it is difficult to plan such radial curves directly on a mesh surface. In this paper, to simplify this problem, the mesh mapping technique is first introduced to map the mesh surface onto a circular region, and then, the planar radial lines along the radius direction are inversely mapped back onto the mesh surface, thereby forming the desired radial curves. After that, by traversing the radial curves using an interpolation algorithm, the spiral path can be generated conveniently. Details of the radial curve planning and the interpolation procedures are discussed in Secs. 2.2, 2.3, and 3.

### Mapping of Mesh Surface Onto Circular Region.

For the foundation of the radial curve method, the essential procedures of mapping a mesh surface onto a circular region will be first briefly introduced in this subsection based on the part of our earlier mesh surface mapping works already presented in Refs. [25] and [26]. Assume that a triangular mesh is composed of the elastic, triangular rubber sheets sewn together along their edges, the mapping of a mesh surface onto the circular region, $h:Ωs→Ωc$, can be imagined as stretching or extruding the elastic triangular facets onto a circular region. In this mapping process, the deformation energy function $Υh:Ωs→Ωc$ can be defined and calculated as follows:
$Υh:Ωs→Ωc=∑vis,vjs∈ΕΩswi,jhvis−hvjs2=∑vic,vjc∈ΕΩcwi,jvic−vic2$
(1)
where $Ωs$, $Ωc$ denote the mesh surface and the circular region, respectively, $h$ stands for the conformal mapping from $Ωs$ to $Ωc$, $vic$ is the corresponding point of the mesh surface vertex $vis$ in $Ωc$, $ΕΩs$ and $ΕΩc$ denote the edge sets of $Ωs$ and $Ωc$, respectively, and $wi,j$ is the elastic coefficient of the edge$vis,vjs$. Using Eq. (1), the mapping of the mesh surface to a circular region becomes a process to minimize Eq. (1) by arranging the positions of all vertices of $Ωs$ in $Ωc$. It can be realized by first specifying the circular boundary and then arranging the positions of the interior vertices of $Ωs$ in $Ωc$. In the first step, the boundary points of the mesh surface are mapped onto the circle according to the chord length parameterization by the following mapping function $B:∂Ωs→∂Ωc$:
$B:∂Ωs→∂Ωc⇒vis→vic:rcos2πτirsin2πτi,vis∈∂Ωsandvic∈∂Ωc$
(2)
where $B:∂Ωs→∂Ωc$ stands for mapping the surface boundary $∂Ωs$ to planar region boundary $∂Ωc$, $r$ is the radius of the circular region, and $τi$ is the normalized chord parameter with $τ0=0$ and for the remaining boundary points of $Ωs$. The second step is to arrange the position of the interior vertices of $Ωs$ in $Ωc$ to minimize the deformation energy function $Υh:Ωs→Ωp$ in Eq. (1), by solving the following linear equation system:
$∂Υh:Ωs→Ωc∂vc=0⇒Ab×bCb×n−bDn−b×nBb×2En−b×2$
(3)

where $A$, $C$, $D$ are the coefficient matrices of $∂Υ/∂vc$, $b$, and $n$ are, respectively, the number of the boundary and the number of all vertices, $Bb×2=v1c,…,vbcT$, $En−b×2=vb+1c,…,vncT,$ and $vic=ui,viT$. After the boundary vertices $vici=1b$ are computed by Eq. (2), $u$ and $v$ coordinates of the unknown interior vertices in $Ωc$ can be obtained by solving Eq. (3).

### Planning Planar Radial Lines.

The first task for planning the radial lines is to determine the number of the radial lines. Since the approximation error of generating a mesh surface from the original free-form surface can be controlled with a specified tolerance set by the user, it is here assumed that the accuracy of the mesh surface is adequate for CNC milling. In this case, the number of the radial lines can be preferentially specified as the number of the boundary vertex. As shown in Fig. 5(a), a planar radial line $Lt$ is defined as follows:
$Linei:Lt=pcenter+tvic−pcentervic−pcenter,vic∈∂Ωc$
(4)
where $pcenter$ is the center of the circle, $0≤t≤r$ and $i=1,…,b$. If the number of the radial curves is specified by the users, then, as shown in Fig. 5(b), the planar radial lines can be defined by the following equation:
$Linei:Lt=pcenter+tpi−pcenterpi−pcenter,pi=r cos2πi−1bsr sin2πi−1bs$
(5)

where $pi$ is evenly sampled from the circle, $bs$ is the specified number of the radial curves, and $i=1,…,bs$.

Fig. 5
Fig. 5
Close modal

The intersections of the radial lines with the planar mesh need to be calculated so that the radial lines can be conveniently mapped inversely onto the radial curves on the mesh surface. The process of calculating the intersection starts from the center of the circle, and the subsequent intersections are obtained by intersecting the edges with the radial lines. To speed up this process, the topology of the mesh is combined in the calculation of the intersection so that not all edges are required to intersect the radial lines. In this process, two cases for the intersection need to be carefully addressed:

Case 1: If the current intersection is just a vertex on a mesh, then next intersection needs to be calculated from the edge set of the one-ring neighboring triangles of this vertex.

Case 2: If the current intersection is on an edge of a mesh, then next intersection must be on the other edges of the triangle which shares this edge and does not contain the previous intersection.

The above procedures of calculating the intersection are iterated forward until the boundary edge or the boundary vertex is reached. Then, the obtained intersections, for example, the green intersecting points shown in Fig. 5 are stored sequentially, including the circle center, thereby forming the discrete radial lines $pi,jc,$ where $i$ is the index of the radial line, and $j$ is the index of the point on the ith radial line.

### Generating Radial Curves on Mesh Surface.

Assume that $pc$ is the intersection of a radial line with the planar mesh edge $Ec:vic,vjc$, and the corresponding edge of $Ec$ on the mesh surface $Ωs$ is $Es:vis,vjs$, then, the corresponding point $qs$ on $Es$ of $pc$ can be calculated using the following linear interpolation equation:
$qs=vis+pc−vicvjc−vicvjs−vis$
(6)
The circle center $pcenter$ also needs to be mapped onto the mesh surface $Ωs$ as the fixed point of the radial curves $qfixed$. Different from the mapping of the intersection (as in Eq. (6)), $qfixed$ is calculated using the area coordinate interpolation as detailed in the following. Assume that three vertices of the triangle $Δc$, which contains $pcenter$, are $v1c$, $v2c$, and $v3c$, respectively, then linking $pcenter$ with the three vertices forms three new triangles, $Δv1cv2cpcenter$, $Δv2cv3cpcenter$, and $Δv3cv1cpcenter$. According to the area ratios of the three new triangles and $Δc$, $qfixed$ is calculated by
$qfixed=areaΔv1cv2cpcenterareaΔcv3s+areaΔv3cv1cpcenterareaΔcv2s+areaΔv2cv3cpcenterareaΔcv1s$
(7)

where $areaΔ$ denotes the area of the triangle $Δ$, and $v1s$, $v2s$, and $v3s$ are the three vertices of the corresponding triangle $Δs$ on the mesh surface of $Δc$. Using Eqs. (6) and (7), the radial lines on the circular region can be conveniently mapped onto the mesh surface, thereby forming the desired radial curves which are denoted by $qi,js,$ where $i$ is the index of the radial curve, and $j$ is the index of the point on the ith radial curve. Figure 6 gives an example of the radial curves on the bicycle seat generated using the above method. It is seen that the resulting radial curves have the defined characteristics, i.e., no sharp corners and neither self-intersecting nor intersecting with each other.

Fig. 6
Fig. 6
Close modal

## Spiral Tool Path Generation

Once the radial curves planning is done, they are used for the spiral path generation. The process is realized by traversing the radial curves using the spiral interpolation algorithm to be discussed in this section. At the same time, the undercut and overcut in the interpolated polyline spiral are identified and then eliminated by supplementing the additional spiral points. Subsequently, the polyline spiral is smoothed by the splines to round the corners that may possibly exist.

### Polyline Spiral Interpolation.

The first step to spiral path generation is to determine the number of spiral turnings. To ensure the machined surface finish is satisfied in spiral tool path machining, in this method, the scallop heights between two adjacent spiral tool paths are evaluated, and the spiral tool paths are generated with the consideration of scallop height calculation. As shown in Fig. 7, assuming that the allowable scallop height is $hs$, the path interval $Li,t$ at the tth cutter contact (CC) point $CCi,t$ along the ith radial curve can be calculated as follows:
$Li,t=8hsRρt/ρt+R,hs≪ρt$
(8)
where $R$ is the cutter radius for a ball-end cutter or the effective cutting radius of a flat-end cutter, and $ρt$ is the radius of the normal curvature along the tangential direction of the radial curve at a CC point $CCi,t$ with a positive value for a convex surface and a negative value for a concave surface. The surface curvature radius $ρt$ can be calculated by fitting a circle to the CC point $CCi,t$ and its two adjacent points, as shown in Fig. 7. The maximum allowable path interval $La$ can then be determined as follows:
$La=minimintLi,t$
(9)
where the subscript $t$ is the index of the tth CC point in the ith radial curve. Using Eq. (9) to find the maximum allowable path interval is $La$ and assuming the length of the longest radial curve is $Lmax$, the number of spiral turning $Nspiral$ can then be determined as follows:
$Nspiral=LmaxLa+1$
(10)
where $·$ denotes the rounding operation often used in the computer programming. Equation (10) leads to a slightly smaller path interval than $La$ so that not only the machining requirement can be satisfied but also will give more flexibility to smoothen the spiral tool path later. According to the arc length $Li/Nspiral$ where $Li$ is the length of the ith radial curve, the ith radial curve is evenly sampled, and the sampling points are denoted by $qi,lsp,l=1,…,Nspiral+1$ and $qi,1sp=qfixed$. Then, the arc length of the spiral point $qi,lspiral$ of the lth turning on the ith radial curve can be calculated as follows:
$sqi,lspiral=l−1LiNspiral+μi,lLiNspiralμ1,l=0,μi,l=μi−1,l+qi,l+1sp−qi−1,l+1sp/∑i=2bsqi,l+1sp−qi−1,l+1sp$
(11)
where $1≤l≤Nspiral$, and $sqi,lspiral$ is calculated along the ith radial curve. According to $sqi,lspiral$, the segment of the radial curve $qi,js,qi,j+1s$, which contains $qi,lspiral$, can be determined by the following inequality:
$sqi,js≤sqi,lspiral≤sqi,j+1s$
(12)

where $sqi,js$ and $sqi,j+1s$ stand for the arc length of the points $qi,js$ and $qi,j+1s$ along the ith radial curve, respectively.

Fig. 7
Fig. 7
Close modal
Then, the spiral points $qi,lspiral$ are calculated by the linear interpolation between $qi,js$ and $qi,j+1s$ as follows:
$qi,lspiral=qi,js+σqi,j+1s−qi,jsσ=sqi,lspiral−sqi,js/sqi,j+1s−sqi,js$
(13)

In Eq. (13), $qi,lspiral,i=1,…,bs$ are spiral points of the lth turning. Then, the polyline spiral is generated by sequentially connecting the spiral points of all turnings.

### Eliminating the Overcut and Undercut.

Due to the linear structure of the mesh surface, if the two end points of the spiral segment, $qi,lspiral$ and $qi+1,lspiral$ are not in the same triangle, the overcut and undercut may possibly occur, as shown in Fig. 8. Figure 8(a) shows an example of overcut on top of the mesh triangle. Figure 8(b) shows an example of undercut below the mesh triangle. To prevent these unfavorable overcuts and/or the undercuts, a procedure will be needed for filtering and deletion. For the convenience of identifying and eliminating the overcut and undercut, the triangle that contains the spiral point also needs to be recorded at the same time when calculating the spiral point. For this purpose, a data structure to be used to store the spiral point is defined as follows:

Fig. 8
Fig. 8
Close modal

Definition 1. $SPoint:qspiral,Facet$.

In$SPoint$, $Facet$is the index of the triangle which contains the spiral point$qspiral$. According to$SPoint.Facet$, it is easy to judge whether there are undercut or overcut. For a segment of spiral$SPointi,l,SPointi+1,l$, if$SPointi,l.Facet≠SPointi−1,l.Facet$and$SPointi,l.Facet$and$SPointi,l.Facet$are not on a same plane, then there must be either an overcut or an undercut on this path segment. According to the two end points of the spiral segment, the additional spiral points can be generated by slicing the mesh using a plane through the two end points by the following method (see Fig. 9 ).

Fig. 9
Fig. 9
Close modal
As shown in Fig. 9, $ni,lspiral$ and $ni+1,lspiral$ are the two surface normals of the mesh surface at the spiral points $qi,lspiral$ and $qi+1,lspiral$. According to the geometry relation shown in Fig. 9, the slicing plane $SPlane$ can be defined as follows:
$SPlane:q−qi,lspiral·qi+1,lspiral−qi,lspiralqi+1,lspiral−qi,lspiral×navg=0,navg=ni,lspiral+ni+1,lspiralni,lspiral+ni+1,lspiral$
(14)
where $q$ is a point on the slicing plane. To calculate the intersection of the slicing plane and the mesh edge $v1s,v2s$, the line equation of this edge can be represented as $q=v1s+tv2s−v1s$. Substituting this line equation $q$ into Eq. (14), one can obtain the following intersection $qw,ladd$ between the slicing plane and the edge (also see Fig. 9):
$qw,ladd=v2s−v1sqi,lspiral−v1s·nspv2s−v1s·nsp+v1s,nsp=qi+1,lspiral−qi,lspiralqi+1,lspiral−qi,lspiral×navg$
(15)

As shown in Fig. 9, using Eq. (15), the found intersections $qw,ladd$, i.e., the additional spiral points, are traced from the intersection of the slicing plane with the edge of the triangle that contains $qi,lspiral$, and the subsequent additional points are computed using the procedures similar to that of calculating the intersection of the radial line with the planar mesh edge given in Sec. 2.2. The tracing process terminates once the triangle that contains $qi+1,lspiral$ is finally reached. Then, the obtained additional spiral points $qw,ladd$, as the blue points shown in Fig. 9, are inserted between the spiral points $qi,lspiral$ and $qi+1,lspiral$ to construct the spiral tool path $qspiral$, as shown in Fig. 9.

### Smoothing the Polyline Spiral.

For the polyline spiral path that is formed by connecting sequentially the obtained spiral points $qspiral$, there may exist some unsmooth corners possibly on the intersections with the mesh surface. To ensure a smooth and continuous spiral path being constructed, a solution approach is presented here by using a smooth B-spline curve, as an example shown in Fig. 10. The primary reason of using B-spline curve in smoothing is that the redundant or overcrowded intersecting points resulting from small STL facets on part surface can be smoothed and merged into smooth trajectory especially when part surface becomes really complex, as some practical examples would be demonstrated later in Sec. 4. Assume that the number of the total spiral points is $m+1$, then a B-spline curve $Φspiralu$, which is fitted to the polyline spiral, is defined by a set of control points $Θi$ and B-spline basis function $Ni,ku$. $Φspiralu$ can be presented in the following form:
$Φspiralu=∑i=0mNi,kuΘi$
(16)
Fig. 10
Fig. 10
Close modal
Initially, the control points $Θi$ in Eq. (16) are set to be the spiral points, i.e., $Θi=qispiral$ for $i=0,…,m$, the degree of B-spline spiral is selected to be equal to 3, i.e., $k=3$, and the knot vector $U$ is defined as follows:
$U=0,…,0︸k+1,uk+1,…,um,1,…,1︸k+1$
(17)
The only unknown in Eq. (16) is the knot vector $U$. Since the control points $Θi$ are known, the knot vector $U$ of Eq. (17) can be solved by Hartley–Judd method presented in Ref. [27], as shown in the following:
$u0=u1⋯=uk=0,um+1=um+2⋯=um+k+1=1ui=∑j=k+1iuj−uj−1,i=k+1,…,m$
(18)
where the parameter $uj−uj−1$ is calculated by the following equation:
$uj−uj−1=∑i=j−kj−1Θi−Θi−1/∑j=k+1m+1∑i=j−kj−1Θi−Θi−1,j=k+1,…,m+1$
(19)
Once the knot vector $U$ is solved, the basis function $Ni,ku$ at any parameter $u$ is known. Since the knot vector $U$ and the control points $Θi$ have been determined, it is possible to smooth and compress the spiral points with the B-spline curve $Φspiralu$ from Eq. (16). To guarantee that the resulting spiral satisfy the required path interval $La$, the distance of the control points $Θi$ to the B-spline spiral $Φspiralu$ is tested to ensure that the distance satisfies the constraint condition
$distΘi,Φspiralu≤Nspiral×La−Lmax$
(20)

If the condition in Eq. (20) is satisfied for all the control points $Θi$, then $Φspiralu$ is the final spiral tool path. If, for example, the distance of the control point $Θi$ to B-spline spiral is more than the distance limitation shown in Eq. (20), then two additional control points are inserted into the control edges $Θi−1,Θi$ and $Θi,Θi−1$, respectively. Usually, the additional control points are selected as the midpoint of the control edges. After that, the control points are refreshed, and the B-spline spiral is constructed again according to the above procedures. This process is repeated until all the control points of the B-spline satisfy the condition shown in Eq. (20), then the latest $Φspiralu$ is the final spiral tool path.

## Experimental Results

The proposed method has been coded in C++ language and implemented in a PC with an Intel 3.4 GHZ and 32 G physical memory. Both the computer simulation and the experimental machining testing were conducted at our lab for testing and validation purpose. In the following, several examples of practical part surfaces were tested and results were analyzed to validate the proposed method. The example surfaces for the test are all created and saved in STL format. When using the implemented computer codes to read the STL files, for the convenience of the following processing, the topological relationship between the elements, such as vertex, edge, and facet is also constructed and at the same time the redundant vertices are removed. For mapping the mesh surface, without the loss of generality, the radius of the circular region is set equal to 1, i.e., $r=1$ in Eqs. (2) and (5).

Example 1. The first example is shown in Fig. 11(a), the example is a typical mechanical part with the surface of revolution that can be fabricated effectively using CNC milling, turning, and sheet metal forming depending on the blanks size and the manufacturing processes selected. It is noted that the slope of the surface changes dynamically from the top to the bottom; especially at the marked areas A and B, where the surface normal is nearly parallel to or vertical to a projection direction, Z-direction. At these areas, as mentioned in Sec. 1, projecting directly Archimedean spiral along Z-direction and constructing the diagonal spiral based on the slicing contours of Z-direction are both difficult to generate the desired spiral paths due to the dependency of the methods on the processing direction. For a comparison, Fig. 11(b) shows the spiral tool path generated by the proposed method. From Fig. 11, it can be seen that, either at the area A where the surface normal is parallel to Z-direction or at the area B where the surface normal is vertical to Z-direction, the tool path generated by the proposed method works much better for these special regions. It shows that the proposed method can overcome effectively the limitations caused by conventional methods and can produce much desirable spiral tool paths over the whole surface.

Fig. 11
Fig. 11
Close modal

Example 2. Figure 12 shows the second example. This example demonstrates the ability of the proposed method in generating the spiral tool path on the mesh surface with complex geometric shapes. The surface for the test is a face model, as shown in Fig. 12(a), which consists of a total of 16,390 vertices and 32,433 facets. As shown in Fig. 12(a), it can be found that the face model has not only the complex geometric shapes but it also has an irregular boundary. On such a surface, offsetting the irregular boundary for constructing the diagonal spiral tool path may result in a large number of complex local and global self-intersections which are highly unfavorable. Also, there is no guarantee of a single-feasible projecting direction that can ensure every vertex is visible so that the projection-based methods and the methods in Ref. [24] would not work. In contrast, these complicated problems can be effectively avoided in our method using the proposed radial curve planning procedure. The generated spiral tool path by the proposed method is shown in Fig. 12(b). In Fig. 12(b), it is found that the generated spiral path is evenly distributed and smooth for tool motions. Moreover, when it gets closer to the corner of the boundary, the generated spiral tool path can automatically conform to the irregular boundary without any drastic change of the path interval. Such smooth and evenly distributed tool paths are most favorable for high-speed machining.

Fig. 12
Fig. 12
Close modal

To evaluate the performance of the presented method, Example 2 was also used to calculate the total tool path length benchmarked with the conventional direction-parallel tool paths generated using a commercial cam software ug/cam, as shown in Figs. 12(c) and 12(d). The machining parameters used for the tool path generation are a ball-end cutter with a 10 mm diameter and a 0.4 mm scallop height. The generated zigzag tool path and the one-way tool path by ug/cam software are shown in Figs. 12(c) and 12(d), respectively. Both the traditional zigzag and one-way tool paths consist of cutter lift-up tool motions. The tool path lengths generated by the three methods are calculated and shown in Table 1. For this case of cutting the face model, it can be found that the spiral tool path generated by the proposed method is the shortest. Compared with the spiral tool path, zigzag tool path shown in Fig. 12(c) has a 6.2% more tool path length than the proposed spiral path method, and the one-way tool path method has much longer tool path length (230.3%) compared to the proposed method (see Table 1).

Table 1

Comparison of tool path length generated by the proposed method and the direction-parallel methods by the commercial software of Example 2

MethodTool path length (mm)Length increase
Proposed method (Fig. 12(b))23,376.3
Zigzag method (Fig. 12(c))24,824.26.2%
One-way method (Fig. 12(d))70,907.6230.3%
MethodTool path length (mm)Length increase
Proposed method (Fig. 12(b))23,376.3
Zigzag method (Fig. 12(c))24,824.26.2%
One-way method (Fig. 12(d))70,907.6230.3%

Example 3. Figure 13 shows the third example. In Fig. 13, the example shows the applicability of the proposed method for denture machining. The denture models are shown in Fig. 13(a). A denture shown in green color is selected as an example to test the effectiveness of the proposed spiral path generation method on highly curvature-varying complex surfaces. As discussed earlier in Sec. 1, if one directly uses the mapping-based methods [25,26] to generate spiral paths, the distribution of the path interval varies unevenly from the boundary to the center of the surface, and the spiral path may become much denser when it gets closer to the boundary when forcing the tool path in the center region of the surface to satisfy the requirement of the path interval. Figure 13(b) shows the generated spiral tool path on the denture surface by the proposed method. It can be seen in Fig. 13(b) that the distribution problem of the spiral tool path resulted from the mesh deformation has been greatly alleviated. This is because the proposed method generates the spiral paths by interpolating the radial curves directly on the model surface, instead of mapping the spiral on the planar mesh onto the surface, therefore reducing the influence of the mapping deformation on the distribution of the spiral path. As seen in Fig. 13(b), the generated spiral tool path shows a much better path distribution. In this case, the entire denture machining can be achieved by a single smooth and continuous spiral tool path without multiple lift-ups of the cutter during machining.

Fig. 13
Fig. 13
Close modal

Example 4. Figure 14 shows the fourth example. In Fig. 14, the example demonstrates the applicability of the proposed method for machining injection molds. The CAD model of the mold for the test is shown in Fig. 14(a), which consists of a large number of patches. For such model, iso-planar tool path is nearly the only choice for CNC milling. However, our method provides a promising alternative for machining such complex surface model with multiple patches. In the implementation of our method, the surfaces to be machined are first retrieved from CAD model in ug/nx, as shown in Fig. 14(b). The selected surfaces are then saved as the triangular mesh using the triangulation function provided by a commercial software ug/nx system, as shown in Fig. 14(c). Then, the proposed method is used to generate the spiral tool path, as shown in Fig. 14(d). Notice that, in Fig. 14(c), the triangular facet size varies significantly, especially at the high-curvature regions. The proposed B-spline smooth algorithm presented in Sec. 3.3 is capable of smoothing and merging the overcrowded or redundant points and turns them into smoothed and evenly distributed spiral tool path even at high-curvature complex surface regions, as shown in Fig. 14(d). From Fig. 14(d), it is found that the generated spiral tool path covers the whole part surface continuously and smoothly though the facets are not evenly distributed. Also notice that, in Fig. 14(d), there is no interruption of continuous tool path and no need for cutter lift-ups during machining, so the unfavorable nonmachining time can be considerably reduced.

Fig. 14
Fig. 14
Close modal

Example 5. Figure 15 shows the fifth example. The above four examples show the difference between the proposed method and the conventional methods discussed in Sec. 1. The example in Fig. 15 shows the benefits brought by the proposed method by comparing it with the spiral tool paths generated by commercial nx/cam software. The model for the test is a bicycle seat as shown in Fig. 15. In the case of using commercial nx/cam software, the distance between the adjacent spiral turnings is the primary control parameter for tool path generation. For comparison, the maximum allowable distance between the adjacent turnings is set equal to 1.50 mm for both the commercial software and the proposed method. Figure 15 shows the generated spiral tool paths by the proposed method and the commercial nx/cam software. The two generated tool paths are first compared by analyzing the characteristics closely associated with the kinematics performance of the path, such as the interruptions of tool path and rapid traversals. Table 2 shows the comparison of the kinematics performance between the two methods. From Table 1, it can be seen that the proposed method holds the better performance than commercially available software method in this kinematics-related performance with a 22–23% improvement. The generated spiral tool path by the proposed method also conforms nicely to the features of the expected tool path to machine the example complex surface [7,8]. The example demonstrates that the proposed method is capable of generating both geometrically and kinematically smooth tool motions on machine tool for machining, and this can be clearly observed in Fig. 15(b). Table 2 also shows a much shorter total tool path length (22.2% reduction) generated by the proposed method in machining the same part surface without those unnecessary cutter lift-ups during cutting.

Fig. 15
Fig. 15
Close modal
Table 2

Comparison between the proposed method and the spiral path method of nx/cam

Model surfaceMethodsNum. of interruptionNum. of rapid traversalUncut or notPath length (mm)Length improvementFinishing time (s)Time improvement
Fig. 15(b) Proposed00No9197.5722.2%185422.7%
Fig. 15(a) nx/cam8241Yes11,826.592398
Model surfaceMethodsNum. of interruptionNum. of rapid traversalUncut or notPath length (mm)Length improvementFinishing time (s)Time improvement
Fig. 15(b) Proposed00No9197.5722.2%185422.7%
Fig. 15(a) nx/cam8241Yes11,826.592398

Example 6. Figure 16 shows the sixth example. As shown in Fig. 16, the example shows the actual machining results using the generated tool paths shown earlier in Figs. 15(a) and 15(b). The raw material used in this experimental cutting is AL2024. The raw blanks were first machined in roughing with a flat-end mill cutter with a diameter of Φ10 mm, and they were then finished with a ball-end mill cutter with a diameter of Φ8 mm using the generated spiral tool paths in finishing. Figure 16 shows the machined example parts using both set of tool paths. For the finishing cutting, a feed rate of 300 mm/min was used to machine both the example parts. Figures 16(a) and 16(c) show the example bicycle seats surfaces after the machining was done. For the commercial nx/cam software method, it can be found in Fig. 16(a) that, at the boundary, the apparent cutter marks left on the machined part surface from the cutter lift-ups caused by path interruptions generated by the conventional methods. Also notice in Fig. 16(a) that, when machining close to the boundary, there are uncut materials, i.e., excessive machining scallops, left on the machined surface by the conventional methods, as the example detailed view shown in Fig. 16(b). The excessive machining scallops on the bicycle seat are resulted from one of the major disadvantages of the conventional projection-based methods mentioned in Sec. 1, i.e., increasing the surface slope results in the increase of the path interval, as illustrated by the example in Fig. 16(b). Compared with the commercial software method, the proposed method generates smooth and evenly distributed spiral paths in finishing the same example part, as shown in Fig. 16(c). The spiral tool path generated by the proposed method is able to finish the bicycle seat surface without uncut materials left on the machined surface (see Fig. 16(c)). This is because the path interval of our spiral path generation method can be accurately controlled by a given specified path interval. The comparison in Fig. 16 also indicates that the proposed method can generate tool paths with a better machining efficiency (22.7% improvement, as shown in Table 2) than the conventional and commercially available methods.

Fig. 16
Fig. 16
Close modal

## Discussion and Future Works

It is noticed that the proposed method can be easily applied to the typical three-axis machining operations. When it is extended to higher degree-of-freedom of four- or five-axis CNC machining, the tool orientations along the tool path need to be carefully determined. A simple tool axis inclination of 5–15 deg relative to the surface normal in the feed direction may not necessarily be a desired method, although this is widely used in industry practice to overcome the issues of zero speed at cutter tip. Such fixed angle from surface normal alone may lead to the abrupt change of tool orientation at the areas where the curvature changes drastically, which may result in significant times of deceleration and reacceleration of the rotary axis, leaving the apparent unfavorable tool marks on the part surface and slowing down the tool movement. A good solution to adaptively determine good tool orientation for 4- or 5-axis machining still yet deserves good attention and efforts. Some possible solution approach, besides the surface normal, might include the consideration of the kinematics capacities of the rotary axes in four- or five-axis machine tool and the cutter acceleration/deceleration during four- or five-axis tool motions to select dynamically appropriate tool orientation. This remains to be of interest and is in the authors' next research plan.

## Conclusions

In this paper, a new spiral curve-based method has been presented to generate smooth and evenly distributed continuous spiral tool paths for high-speed machining of complex surface parts. An effective solution method of spiral path planning on mesh surface has been presented in this paper. In the presented method, the radial curves play a key role as the guiding curves for smooth spiral path generation. The proposed method of generating radial curves not only can effectively handle the complex tasks of constructing radial curves directly on the mesh surface to planning radial lines on the plane but it can also generate continuous and evenly distributed spiral path on complex-shaped mesh surfaces. The experimental examples and lab machining examples show that our method is superior to the conventional projection-based methods. The experimental examples and testing results presented in the paper also show that the proposed method is capable of eliminating the geometric processing of mesh surfaces with complicated geometry, such as contour offsetting and self-intersection elimination involved in the conventional offset curve-based methods. The presented method can also greatly alleviate the influences of the mesh and the mesh mapping deformation on the effectiveness of even distribution of the spiral tool path. These have been confirmed by the performed experimental tests. The experimental results and tests presented in the paper demonstrate that the presented method can effectively generate geometrically even distributed and kinematically smooth spiral tool paths on very complex surfaces faced in practical industry challenge.

## Funding Data

• National Natural Science Foundation of China (Grant Nos. 51575086, 51525501, and 11290143).

• National Science Foundation to North Carolina State University (Grant Nos. CMMI-1404916 and CMMI-1547105).

• SCP and STBD to Dalian University of Technology (JCKY2016212A506-010, 2016RD08).

## References

1.
Wu
,
T.
, and
Cheung
,
E. H. M.
,
2006
, “
Enhanced STL
,”
Int. J. Adv. Manuf. Technol.
,
29
(
11–12
), pp.
1143
1150
.
2.
Zhu
,
H.
,
Liu
,
Z.
, and
Fu
,
J.
,
2011
, “
Spiral Tool-Path Generation With Constant Scallop Height for Sheet Metal CNC Incremental Forming
,”
Int. J. Adv. Manuf. Technol.
,
54
(
9–12
), pp.
911
919
.
3.
Zhang
,
K.
, and
Tang
,
K.
,
2016
, “
Optimal Five-Axis Tool Path Generation Algorithm Based on Double Scalar Fields for Freeform Surfaces
,”
Int. J. Adv. Manuf. Technol.
,
83
(
9–12
), pp.
1503
1514
.
4.
Hou
,
G.
, and
Frank
,
M. C.
,
2017
, “
Computing the Global Visibility Map Using Slice Geometry for Setup Planning
,”
ASME J. Manuf. Sci. Eng.
,
139
(
8
), p.
081006
.
5.
Xu
,
J. T.
,
Sun
,
Y. W.
, and
Wang
,
S. K.
,
2013
, “
Tool Path Generation by Offsetting Curves on Polyhedral Surfaces Based on Mesh Flattening
,”
Int. J. Adv. Manuf. Technol.
,
64
(
9–12
), pp.
1201
1212
.
6.
Sun
,
Y. W.
,
Xu
,
J. T.
,
Jin
,
C. N.
, and
Guo
,
D. M.
,
2016
, “
Smooth Tool Path Generation for 5-Axis Machining of Triangular Mesh Surface With Nonzero Genus
,”
Comput. Aided Des.
,
79
, pp.
60
74
.
7.
Lee
,
E.
,
2003
, “
Contour Offset Approach to Spiral Toolpath Generation With Constant Scallop Height
,”
Comput. Aided Des.
,
35
(
6
), pp.
511
518
.
8.
Zhang
,
K.
, and
Tang
,
K.
,
2014
, “
An Efficient Greedy Strategy for Five-Axis Tool Path Generation on Dense Triangular Mesh
,”
Int. J. Adv. Manuf. Technol.
,
74
(
9–12
), pp.
1539
1550
.
9.
Lu
,
A.
,
Ding
,
Y.
, and
Zhu
,
L. M.
,
2016
, “
Smooth Tool Path Optimization for Flank Milling Based on the Gradient-Based Differential Evolution Method
,”
ASME J. Manuf. Sci. Eng.
,
138
(
8
), p.
081009
.
10.
Bieterman
,
M.
, and
Sandstrom
,
D.
,
2003
, “
A Curvilinear Tool-Path Method for Pocket Machining
,”
ASME J. Manuf. Sci. Eng.
,
125
(
4
), pp.
709
715
.
11.
Chuang
,
J. J.
, and
Yang
,
D. C. H.
,
2007
, “
A Laplace-Based Spiral Contouring Method for General Pocket Machining
,”
J. Adv. Manuf. Technol.
,
34
(
7–8
), pp.
714
723
.
12.
Held
,
M.
, and
Spielberger
,
C.
,
2009
, “
A Smooth Spiral Tool Path for High Speed Machining of 2D Pockets
,”
Comput. Aided Des.
,
41
(
7
), pp.
539
550
.
13.
Banerjee
,
A.
,
Feng
,
H. Y.
, and
Bordatchev
,
E. V.
,
2012
, “
Process Planning for Floor Machining of 2½D Pockets Based on a Morphed Spiral Toolpath Pattern
,”
Comput. Ind. Eng.
,
63
(
4
), pp.
971
979
.
14.
Xu
,
J. T.
,
Sun
,
Y. W.
, and
Zhang
,
X. K.
,
2013
, “
A Mapping-Based Spiral Cutting Strategy for Pocket Machining
,”
J. Adv. Manuf. Technol.
,
67
(
9–12
), pp.
2489
2500
.
15.
Romero-Carrillo
,
P.
,
Torres-Jimenez
,
E.
,
,
R.
, and
Díaz-Garrido
,
F.
,
2015
, “
Analytic Construction and Analysis of Spiral Pocketing Via Linear Morphing
,”
Comput. Aided Des.
,
69
, pp.
1
10
.
16.
Huang
,
N.
,
Lynn
,
R.
, and
Kurfess
,
T.
,
2017
, “
Aggressive Spiral Toolpaths for Pocket Machining Based on Medial Axis Transformation
,”
ASME J. Manuf. Sci. Eng.
,
139
(
5
), p.
051011
.
17.
Patel
,
D. D.
, and
Lalwani
,
D. I.
,
2017
, “
Quantitative Comparison of Pocket Geometry and Pocket Decomposition to Obtain Improved Spiral Tool Path: A Novel Approach
,”
ASME J. Manuf. Sci. Eng.
,
139
(
3
), p.
031020
.
18.
Siemens PLM Software, 2018, “
NX for Manufacturing
,” Siemens PLM Software, Plano, TX, accessed Apr. 18, 2018, https://www.plm.automation.siemens.com/en/products/nx/for-manufacturing/index.shtml
19.
Gong
,
H.
,
Wang
,
Y.
,
Song
,
L.
, and
Fang
,
F. Z.
,
2015
, “
Spiral Tool Path Generation for Diamond Turning Optical Freeform Surfaces of Quasi-Revolution
,”
Comput. Aided Des.
,
59
, pp.
15
22
.
20.
Huertas-Talón
,
J. L.
,
García-Hernámdez
,
C.
,
Berges-Muro
,
L.
, and
Gella-Marín
,
R.
,
2014
, “
Obtaining a Spiral Path for Machining STL Surfaces Using Non-Deterministic Techniques and Spherical Tool
,”
Comput. Aided Des.
,
50
, pp.
41
50
.
21.
Hauth
,
S.
, and
Linsen
,
L.
,
2011
, “
Double-Spiral Tool Path in Configuration Space
,”
Int. J. Adv. Manuf. Technol.
,
54
(
9–12
), pp.
1011
1022
.
22.
Malhotra
,
R.
,
Reddy
,
N. V.
, and
Cao
,
J.
,
2010
, “
Automatic 3D Spiral Toolpath Generation for Single Point Incremental Forming
,”
ASME J. Manuf. Sci. Eng.
,
132
(
6
), p.
061003
.
23.
Xu
,
J. T.
,
Sun
,
Y. W.
, and
Zhang
,
L.
,
2015
, “
A Mapping-Based Approach to Eliminating Self-Intersection of Offset Paths on Mesh Surface for CNC Machining
,”
Comput. Aided Des.
,
62
, pp.
131
142
.
24.
Zhou
,
B.
,
Zhao
,
J. B.
, and
Li
,
L.
,
2015
, “
CNC Double Spiral Tool-Path Generation Based on Parametric Surface Mapping
,”
Comput. Aided Des.
,
67–68
, pp.
87
106
.
25.
Sun
,
Y. W.
,
Guo
,
D. M.
, and
Jia
,
Z. Y.
,
2006
, “
Spiral Cutting Operation Strategy for Machining of Sculptured Surfaces by Conformal Map Approach
,”
J. Mater. Process. Technol.
,
180
(
1–3
), pp.
74
82
.
26.
Ren
,
F.
,
Sun
,
Y. W.
, and
Guo
,
D. M.
,
2009
, “
Combined Parameterization-Based Spiral Toolpath Generation for Five-Axis Sculptured Surface Machining
,”
Int. J. Adv. Manuf. Technol.
,
40
(
7–8
), pp.
760
768
.
27.
Hartley
,
D. J.
, and
Judd
,
C. J.
,
1978
, “
Parameterization of Bézier-Type B-Spline Curves and Surfaces
,”
Comput. Aided Des.
,
10
(
2
), pp.
130
134
.