algorithms for collision detection and avoidance for five-axis nc machining: a state of the art...

17
Computer-Aided Design 51 (2014) 1–17 Contents lists available at ScienceDirect Computer-Aided Design journal homepage: www.elsevier.com/locate/cad Review Algorithms for collision detection and avoidance for five-axis NC machining: A state of the art review Tran Duc Tang Faculty of Aerospace Engineering, Le Quy Don Technical University, 236 Hoang Quoc Viet Str., Cau Giay Dist., Hanoi City, Viet Nam article info Article history: Received 21 April 2013 Accepted 3 February 2014 Keywords: Collision detection Collision avoidance Local and global Interference Five-axis NC machining abstract Five-axis CNC machine tools are more and more popular in machining area, because of their ability to machine parts with complex geometries efficiently as well as achieve higher dimensional accuracy. Since two additional rotational axes are introduced in five-axis machines, there are difficult geometric problems that need to be solved in order to take full advantages of five-axis machining, and the most complex problems are collision detection and avoidance. Due to its widespread importance, a lot of researches have been carried out to solve the collision detection and avoidance problems. These include the surface properties analysis based method, convex hull based method, C -space based method, accessibility based method, bounding volume and space partition method, distance calculation (vector) based method, rolling ball method, radial projection method, graphic-assisted method, and sweep plane approach. This paper aims at providing a state of the art review on algorithms for collision detection and avoidance in five-axis NC machining. In addition, a comparison of algorithms for collision detection and avoidance is considered. © 2014 Elsevier Ltd. All rights reserved. Contents 1. Introduction........................................................................................................................................................................................................................ 2 2. Review of algorithms for collision detection.................................................................................................................................................................... 2 2.1. Surface properties analysis based method........................................................................................................................................................... 2 2.2. Convex hull based method .................................................................................................................................................................................... 4 2.3. C -space based method .......................................................................................................................................................................................... 4 2.4. Accessibility base method ..................................................................................................................................................................................... 5 2.5. Bounding volume and space partition method ................................................................................................................................................... 6 2.6. Distance calculation (vector) based method........................................................................................................................................................ 7 2.7. Rolling ball method ............................................................................................................................................................................................... 8 2.8. Radial projection method ...................................................................................................................................................................................... 9 2.9. Graphics-assisted approach .................................................................................................................................................................................. 10 2.10. Sweep plane approach........................................................................................................................................................................................... 10 3. Review of algorithms for collision avoidance .................................................................................................................................................................. 10 3.1. Correction vector based method........................................................................................................................................................................... 10 3.2. C -space method ..................................................................................................................................................................................................... 10 3.3. Visibility and accessibility method ....................................................................................................................................................................... 11 3.4. Tool lifting method ................................................................................................................................................................................................ 12 3.5. Angle-adjustment method .................................................................................................................................................................................... 13 3.6. Local surface geometry based method ................................................................................................................................................................. 13 This paper has been recommended for acceptance by Desmond J. Walton. Tel.: +84 973 991 486. E-mail addresses: [email protected], [email protected]. http://dx.doi.org/10.1016/j.cad.2014.02.001 0010-4485/© 2014 Elsevier Ltd. All rights reserved.

Upload: tran-duc

Post on 23-Dec-2016

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Algorithms for collision detection and avoidance for five-axis NC machining: A state of the art review

Computer-Aided Design 51 (2014) 1–17

Contents lists available at ScienceDirect

Computer-Aided Design

journal homepage: www.elsevier.com/locate/cad

Review

Algorithms for collision detection and avoidance forfive-axis NC machining: A state of the art review✩

Tran Duc Tang ∗

Faculty of Aerospace Engineering, Le Quy Don Technical University, 236 Hoang Quoc Viet Str., Cau Giay Dist., Hanoi City, Viet Nam

a r t i c l e i n f o a b s t r a c t

Article history:Received 21 April 2013Accepted 3 February 2014

Keywords:Collision detectionCollision avoidanceLocal and global InterferenceFive-axis NC machining

Five-axis CNC machine tools are more and more popular in machining area, because of their ability tomachine parts with complex geometries efficiently as well as achieve higher dimensional accuracy. Sincetwo additional rotational axes are introduced in five-axismachines, there are difficult geometric problemsthat need to be solved in order to take full advantages of five-axis machining, and the most complexproblems are collision detection and avoidance. Due to its widespread importance, a lot of researcheshave been carried out to solve the collision detection and avoidance problems. These include the surfaceproperties analysis based method, convex hull based method, C-space based method, accessibility basedmethod, bounding volume and space partition method, distance calculation (vector) based method,rolling ball method, radial projection method, graphic-assisted method, and sweep plane approach. Thispaper aims at providing a state of the art review on algorithms for collision detection and avoidance infive-axis NC machining. In addition, a comparison of algorithms for collision detection and avoidance isconsidered.

© 2014 Elsevier Ltd. All rights reserved.

Contents

1. Introduction........................................................................................................................................................................................................................ 22. Review of algorithms for collision detection.................................................................................................................................................................... 2

2.1. Surface properties analysis based method........................................................................................................................................................... 22.2. Convex hull based method.................................................................................................................................................................................... 42.3. C-space based method .......................................................................................................................................................................................... 42.4. Accessibility base method ..................................................................................................................................................................................... 52.5. Bounding volume and space partition method ................................................................................................................................................... 62.6. Distance calculation (vector) based method........................................................................................................................................................ 72.7. Rolling ball method ............................................................................................................................................................................................... 82.8. Radial projection method...................................................................................................................................................................................... 92.9. Graphics-assisted approach .................................................................................................................................................................................. 10

2.10. Sweep plane approach........................................................................................................................................................................................... 103. Review of algorithms for collision avoidance .................................................................................................................................................................. 10

3.1. Correction vector based method........................................................................................................................................................................... 103.2. C-space method ..................................................................................................................................................................................................... 103.3. Visibility and accessibility method....................................................................................................................................................................... 113.4. Tool lifting method ................................................................................................................................................................................................ 123.5. Angle-adjustment method .................................................................................................................................................................................... 133.6. Local surface geometry based method ................................................................................................................................................................. 13

✩ This paper has been recommended for acceptance by Desmond J. Walton.∗ Tel.: +84 973 991 486.

E-mail addresses: [email protected], [email protected].

http://dx.doi.org/10.1016/j.cad.2014.02.0010010-4485/© 2014 Elsevier Ltd. All rights reserved.

Page 2: Algorithms for collision detection and avoidance for five-axis NC machining: A state of the art review

2 T.D. Tang / Computer-Aided Design 51 (2014) 1–17

3.7. Binary and bisection search method .................................................................................................................................................................... 143.8. Intersection curve based method ......................................................................................................................................................................... 153.9. Graphics-assisted approach .................................................................................................................................................................................. 15

4. Comparison of algorithms for collision detection and avoidance .................................................................................................................................. 165. Conclusion .......................................................................................................................................................................................................................... 16

Acknowledgment ............................................................................................................................................................................................................... 16References........................................................................................................................................................................................................................... 16

1. Introduction

Five-axis CNC machines are widely used in machining ofsculptured surfaces such as turbine blades, impellers, molds anddies. The advantages of five-axis machining over three-axis oneswere well identified; they includes better tool accessibility, fastermaterial removal rates, reduced machining time and improvedsurface finish.

Collision detection and avoidance are themain problems inma-chining of sculptured surfaces. Collision problems in five-axis ma-chining can be classified into two types: local and global collision(Figs. 1, 2). Local collision includes local gouging and rear gouging(Fig. 1(a), (b)). Local gouging refers to the removal of excess mate-rial in the vicinity of the cutter contact (CC) point(s) due to themis-match in curvatures between the tool swept surface and the partsurface at the CC points (Fig. 1(a)). Rear gouging is caused by trail-ing edge of the cutter and the design surface (Fig. 1(b)). Rear goug-ingmay also be caused by using a large size cutter or by choosing animproper cutter orientation. Local gouging and rear gouging can beeliminated either by using a smaller cutter or by change of lead/lagangle or by revising the original design geometry. Global collisionis referred to accidental contacts (i) between surfaces of the tool (ortoolholder) and theworkpiece (ormachine components) as shownin Fig. 1(c), (ii) between workpiece and machine components, or(iii) between moving machine components (Fig. 2). In these twotypes of collision, global collision is considered to be more seriousas accidents may happen if such collision occurs. The consequenceof local collision could just be unqualified workpieces whose er-rors exceed specified tolerance. However, for global collision, be-sides the unacceptable workpieces machined, it may also damagethe cutter, fixtures and the machine itself [1].

The importance of collision detection has long been recognizedand many researchers have attempted to solve this problem. Avariety of methods for collision detection and avoidance wereinvestigated. This paper is to provide a state of the art review onalgorithms for collision detection and avoidance in five-axis NCmachining.

The rest of the paper is organized as follows. In Section 2, areview of algorithms for collision detection is presented. Section 3reviews algorithms for collision avoidance. A comparison ofalgorithms for collision detection and avoidance is presented inSection 4, and the last Section is the conclusion.

2. Review of algorithms for collision detection

2.1. Surface properties analysis based method

The surface properties are characterized by the first and secondfundamental forms of differential geometry. The first fundamentalformprovidesmetrical properties of surfaces such asmeasurementof lengths, areas and angles between two curves on the surface. Thesecond fundamental form allows analyzing the surface curvatureat a given point [2].

For a free-form surface S(u, v), its unit normal vector n at point(u, v) can be calculated:

n(u, v) =Su × Sv

|Su × Sv|(1)

where Su and Sv are the tangent vectors along u- and v-parametricdirections.

The important geometric properties of a surface are the meancurvature H and Gaussian curvature K . The mean curvaturemeasures the deviation of a surface from the minimal surface. TheGaussian curvature describes the local shape of a surface.

H =12

(k1 + k2) =EN + LG − 2MF2

EG − F 2

K = k1k2 =

LN − M2

EG − F 2

(2)

where E, F ,G and L,M,N are the magnitudes of the first andsecond fundamental forms, respectively.

E = S2u , F = SuSv, G = S2v (3)

L = n · Suu, M = n · Suv, N = n · Svv. (4)

The principal curvatures are the upper and lower bounds of thenormal curvature at a given point. The principal curvatures k1 andk2 can be calculated from H and K :

k1 = H +

H2 − K , k2 = H −

H2 − K . (5)

Based on the values of K and H , the surface shape around apoint can be classified into three basic types: concave, convex andsaddle [3].

If K > 0 and H > 0, it is a concave pointH < 0, it is a convex point

If K = 0 and H > 0, it is concave pointH = 0, it is a planar pointH < 0, it is a convex point

If K < 0, it is a saddle point.

(6)

Initially Choi and Jun [4] used the surface properties to checkfor cutter interference with the part surface in sculptured surfacemachining. They converted the CC points data into cutter location(CL) points data, and then detected interference points from CLdata. With this algorithm the computation timewill be very long ifthe density of CC points is large.

Also using the surface properties analysis, Ding et al. [3] pro-posed a method to detect interference regions in three-axis moldmachining. Both the local and global interference detection waspresented. In this algorithm, the input is the surface of the work-piece and the dimension of the cutting tool. The surface geometryis firstly analyzed and classified according to its shape. The localinterference is then detected in the concave and saddle surfaces bycomparing the extreme concave and saddle surface curvature val-ues with that of the cutter. If maximum value (kmax) of k1 in Eq. (5)is less than that of the cutter, the region is free of the local inter-ference at the CC point; if theminimum value (kmin) of k1 is greaterthan that of the cutter, every point in the region is the local inter-ference point. The global interference is detected from the surfaceboundaries of the local interference-free surfaces, and the regionthat is closed by an interference-free boundary is proven to be freeof the global interference.

Page 3: Algorithms for collision detection and avoidance for five-axis NC machining: A state of the art review

T.D. Tang / Computer-Aided Design 51 (2014) 1–17 3

(a) Local gouging. (b) Rear gouging. (c) Global collision.

Fig. 1. Local collision and global collision at workpiece level.

Collision between Workpiece and Z-axis Collision between Tool and A-axis

Fig. 2. Global collision at machine level.

In essence, the local gouging is defined as mismatching in cur-vatures between the designed surface and the tool swept surfaceat the CC point [5]. Based on the definition, Rao and Sarma [5]detected and eliminated local gouging by sampling a finite set ofpoints on the tool path, while comparing curvatures of the toolswept surface and the designed surface. It is different from otheralgorithms that onlymatch the curvatures in one or two directionsfor checking the condition for the occurrence of local gouging. Thealgorithm proposed by Rao and Sarma [5] matches the effectivecurvature of the tool and the surface in every direction.

By considering local geometries of designed and cutter surfaces,Yoon et al. [6] found that the surface X is locally millable, withoutlocal gouging, by the cutter Σ at contact point p if

kmax + kmin − (Kmax + Kmin) > 0 and (7)−(kmax − Kmax)(kmin − Kmin)

+ sin2 θ(kmax − kmin)(Kmax − Kmin) < 0 (8)

where Kmax and Kmin are the maximum and minimum principalcurvatures of the designed surface X at point p, respectively. kmaxand kmin are maximum and minimum principal curvatures of thecutter surfaceΣ at point p, respectively. θ is the angle between themaximum principal directions of the two surfaces. Yoon et al. [6]also pointed out that in most recent researches; gouging problemsare solved by curvature matching between the part and the cuttersurface at the CC point in one or two directions. Therefore, testing

only in one or two normal sections do not guarantee collisionfree or local millability. It must be checked in all directions.However, their local millability theorem cannot be used to detectrear gouging or side gouging. These types of collision the authorconsider as global gouging.

Based on the curvature matching technique, Chen et al. [2]detected the local gouging and then determined an optimal cutterorientation by matching the instantaneous cutting profile of thecutter and the machined surface as close as possible. Rear gougingdetection and avoidance was implemented by calculating theintersection between the offset cylinder of the cutter and theoffset surface of the machined surface, for simple smooth surface.Whereas, for the complex shaped surfaces, a search for possiblerear gouging is conducted by firstly dividing the machined surfaceinto a set of triangular facets, and then classifying the relativeposition of the bottom plane of the cutter and the vertices of thetriangular facets. If one of the vertices of the triangles under thecutter shadow is above the bottomplane of the cutter, rear gougingwill occur. If so, the cutter orientation is adjusted to eliminategouging.

In addition to the approach of using surface properties, Caiet al. [7] presented an optimal calculationmethod of themaximumcurvature of the surface by using the Genetic Algorithm in theiralgorithm for checking the local interference between the cutterand the surface. Since the curvatures in each tangent orientationon a point on the surface are different, the principal curvatures

Page 4: Algorithms for collision detection and avoidance for five-axis NC machining: A state of the art review

4 T.D. Tang / Computer-Aided Design 51 (2014) 1–17

at different points on the surface are different. The calculation ofthe maximum curvature of the surface is a complex optimizationproblem. Because of the irregularity of the curvature on the surface,the result may be a local optimal value, and not the global optimalvalue.

It is important to note that the surface properties analysismethod is usually for local gouging, or local collision detection.

2.2. Convex hull based method

Lee and Chang [8] proposed a 2-phase approach to global toolinterference avoidance in five-axis machining, in which controlpoints and surface curvature parameters were adjusted. In thefirst phase, a quick feasibility checking is used to detect potentialinterference by using the convex hull property of the controlmesh. If the checking fails, the second detailed feasibility checkingphase which uses the vector calculation method for exact collisiondetection is activated, and the tool orientation is then correctedif required. The first checking phase is extremely fast while thesecond phase is more time consuming. To reduce the computationtime, only the points located within a region adjacent to the givenpoint are checked for possible tool collisions. The checking regionis found by projecting the cutterwith the cutting direction onto theXY plane of the global coordinate system. However, this approachdoes not allow a general form of the tool and assume a cylindricalapproximation for it. The calculation of all feasible tool orientationsis time consuming and sometimes unnecessary.

2.3. C-space based method

The concept of configuration space (C-space), essentially cap-tures the legal configuration of the tool such that it does not in-tersect with the obstacle objects or go beyond the motion limitsof the machine tool. It has been used for robotic path planning aswell as tool path generation [9–11]. The idea of the C-spacemethodis to represent a moving object as a point in an appropriate spacein which the obstacles are mapped. This mapping transforms thecomplex problem of planning the motion of an object into a sim-pler one of planning the motion of a point in the C-space.

Choi et al. [9] proposed a C-space approach to tool pathgeneration for die and mold machining that provides gouge-freeand collision-free tool paths. Choi’s algorithm is limited to three-axismachining. In this approach, the geometric data describing thedesign surface and stock surface (the surface of the raw-stock orin-process workpiece) were transformed into C-space elements;and then all the tool paths generation decisions were made inthe C-space. Concretely, the C-space of NC machine (VNC) wasconstructed based on the following elements (as depicted in Fig. 3)

SS—CL trajectory for the stock surfaceSD—CL trajectory for the design surfaceVF—free C-space—free of collision space (space above SS)VM—machining C-space (space between SS and SD)VG—gouging C-space (space below SD)

that satisfies:

VNC = VF ∪ VM ∪ VG with ∅ = VF ∩ VM ∩ VG.

Morishige et al. [10] applies C-space method to five-axismachining. In this approach, the cutting tool is the moving objectand the workpiece is the obstacle, and collision-free access can beinferred by simply navigating the point in the C-space around theobstacles in the C-space. Fig. 4 shows a local coordinate system ateach cutting point. In this coordinate system, the tool axis vector isdetermined by the inclination angle θ and the rotation angle ϕ. Thecorresponding 2-dimensional C-space of this coordinate system isshown in Fig. 5. At a point in this C-space, the distance between the

Fig. 3. Construction of C-space for three-axis machining [9].

Fig. 4. Tool axis vector in the local coordinate system [10].

Fig. 5. Two-dimensional C-space [10].

point and the origin of the C-space corresponds to the inclinationangle θ and the rotation angle around the origin corresponds to theangle ϕ. In other word, a point in the C-space corresponds to onlyone tool attitude in the real space.

Page 5: Algorithms for collision detection and avoidance for five-axis NC machining: A state of the art review

T.D. Tang / Computer-Aided Design 51 (2014) 1–17 5

(a) Gouging avoidance on both XL–YL and YL–ZL cutting planes. (b) Cutting shape fitting on XL–YL cutting plane.

(c) Cutting shape fitting on YL–ZL plane.

Fig. 6. Fitting the cutting shapes of a filleted endmill into local surface [12].

Jun et al. [11] then gave a searching method in the machiningC-space to find the optimal tool orientation by considering thelocal gouging, rear gouging and global tool collision in five-axismachining. Based on the machined surface error analysis, theauthors developed a boundary search method to find a set offeasible tool orientations in the C-space to eliminate gouging andcollisions.

Although the C-space method is theoretically simple, however,it is difficult to compute explicitly since the tool is a complexshape and the workpiece and machining environment are evenmore complex.Mapping obstacles to the C-space is a computation-ally expensive. The C-space can depend on the place within theworkspace region, whichmakes it often difficult andmore compli-cated to use.

2.4. Accessibility base method

Based on the evaluation of local surface shape, Lee [12] de-veloped the geometry analysis method to find admissible toolorientation for five-axis complex surface machining. The methodincludes finding feasible tool orientations by considering a localsurface shape and updating feasible tool orientations by consider-ing global geometry to prevent the rear gouging. In the first step,

the feasible tool orientation is found by fitting the cutter’s effectivecutting shapes into the local surface along two orthogonalinstantaneous cutting planes (Fig. 6). In the second step, tool ori-entation is updated with gouging prevention by circular approxi-mation (Fig. 7). In the third step, a localization algorithm is usedto identify rear gouging and a detailed checking algorithm is con-ducted to detect and correct the rear gouging by controlling ad-missible tool orientation (Fig. 8). As shown in Fig. 8 the bottom ofa filleted endmill is placed in such a way that the bottom planePLm does not intersect with any surface point within a range ofdistance Dck (for a filleted endmill cutter Dck can be choose asDck = 2R1 + 2R2 + ε, where R1 and R2 are the bottom and cor-ner radii of the cutter, ε is a pre-defined small clearance toleranceand ε ≥ 0) from the CC point Pcc to avoid rear gouging. To avoidexhausting checking of all the surface points for possible gouging,the author developed a localization algorithm to identify candidatesurface points for possible gouging. To find the candidate surfacepoints for rear gouging checking, a surface point Pi(xL,pi, yL,pi,zL,pi)within Dck from the cutter contact point Pcc is transformed intothe tool coordinate basis (ZT − YT − ZT ) as Pi(xT ,pi, yT ,pi,zT ,pi), asshown in Fig. 8. After identifying the set of candidate surface points{Pck,j}, check all the points Pi ∈ {Pck,j} to find minimal tool orien-tation to correct the rear gouging problem. In the second step of

Page 6: Algorithms for collision detection and avoidance for five-axis NC machining: A state of the art review

6 T.D. Tang / Computer-Aided Design 51 (2014) 1–17

Fig. 7. Tool inclination control for rear gouging avoidance by circular approxima-tion [12].

Fig. 8. Placement of an inclined cutter to avoid rear gouging in complex surfacemachining [12].

the proposed algorithm, the concave region is approximated by acircular arcwith a constant radius to calculate the inclination anglefor avoiding gouging; although this method work for simple andwell behaved smooth surfaces, it may not work for very complexsurfaces or some irregular region for gouging avoidance.

Elber and Cohen [13] proposed a solution to the global acces-sibility in the context of multi-axis machining. The authors do notfollow the methods that identify and resolve the gouging problemon a point by point basis, for each individual point-location alongthe tool path developed in the past. This algorithm resolves theproblem for the entire surface and no constraint are imposed (ex-cept that only interference free tool orientation should be accept-able) on the possible orientations of the tool during the machiningprocess neither are any inflicted on the shape of the free-form sur-face. The advantages of the Elber and Cohen method over a pointby point local validation and correction approach are: (i) the solu-tion is independent of the selected tool path as it solves the generalaccessibility problem that is not specific to some given tool path;

(ii) by considering the global picture, global algorithm can poten-tially be made more accurate and efficient; and (iii) when a toolpath is validated on a point by point basis, no guarantee can bemade on possible gouging in between the verified contact pointlocations. In contrast, this guarantee is fundamental in the globalalgorithm.

Also utilizing the idea of admissible area interpolation for thewhole designed free-form surface, Lin et al. [14] proposed an algo-rithm to generate tool posture collision-free area for the free-formsurface during five-axis CNC finishing period. The algorithm con-sists of two phases. In the first phase, a few points are picked onthe surface and the admissible area of tool posture is calculated ateach point. In the second phase, the admissible area of the sam-pling points are interpolated with cubic B-surface interpolationtechnique, forming an expression as Q (u, v), through which whenthe parameters u and v are assigned, the global collision-free areafor the corresponding surface point can be easily calculated. Thealgorithm can detect any kind global collision between the cuttingtool and a workpiece surface and can be extended to any kind ofcutting tool.

2.5. Bounding volume and space partition method

The idea behind the approaches using a hierarchy of boundingvolumes is to approximate the objects with bounding volumes orto decompose the space they occupy by using decompositions, toreduce the number of pairs of objects of primitives that need to bechecked for collisions. The main advantages of these approachesare (i) in many cases, an interference or non-interference situationcan be easily detected at the first level in the hierarchy, and(ii) the refinement of the representation is only necessary in theparts where collision may occur [15].

Ho et al. [16] and Balasubramaniam et al. [17–19] proposed analgorithm for rapidly detecting and correcting collision betweena manually pre-defined tool and an arbitrary workpiece. The toolis modeled by using implicit equations and the workpiece ismodeled as a cloud of points. The algorithm is based onhierarchicalbounding boxes, called k-DOPs, for both tool and workpiece. Thetool and workpiece are pre-processed to form their respectivehierarchical bounding boxes. The collision detection algorithmreturns the points of the object that are in collision with thetool. However, the algorithm cannot be used in cases where bothobjects are arbitrary. Also, collisions between the tool and otherparts of the CNCmachine, such as rotating tables, clamping device,are not handled. The limitations of this approach are: First, theimplicit equation defining object is not fully extendable to complexsolids. Second, undetected collision occurs when the implicitequation object is entirely in the interior of the point cloud. Third,determination of the necessary auxiliary functions is difficult forcomplex shapes. Fourth, the point-cloud representation for theworkpiece tends to lose efficiency as the number of sampledpoints is increased in order to obtain a good approximation for themachined part.

Based on the hierarchical oriented bounding box (OBB) andoctree space partition Ding et al. [20] developed an algorithm forthe global interference detection in five-axis machining. In thisalgorithm, the tool and toolholder are modeled by a hierarchicalOBB structure, whereas the workpiece surfaces are approximatedby an octree. The interference detection is conducted betweenthe tool OBBs and the gray octants of the surface octree with theseparating axis theorem. In addition, the surfaces are discretizedinto points besides the construction of the surface octree, thesediscretized points are used formore precise interference detection.If volume interferences are found between OBBs and octantsat the lowest level of the leaf nodes, then a conventionalvector calculation algorithm is used to determine whether a real

Page 7: Algorithms for collision detection and avoidance for five-axis NC machining: A state of the art review

T.D. Tang / Computer-Aided Design 51 (2014) 1–17 7

Fig. 9. Local collision detection [22].

interference occurs between the tool and the discretized surfacepoints contained in these leaf nodes. The algorithm can be usedto detect local and global interferences; however it only detectscollision between the tool and workpiece.

2.6. Distance calculation (vector) based method

You and Chu [21] firstly subdivide the surfaces to be machinedinto discrete sample points. Then tool interference detection isconducted betweendiscrete tool positions and these sample pointson the machined surface by calculating the relative distance fromthe sample points and the tool axis. Before calculation, the tool ge-ometry is projected onto the XY plane and the sample pointswhichare covered in the shadow of the tool projection are considered aspossible interference points. To locate these points, a bounding boxis calculated to approximate the tool projection area and only sam-ple points in this bounding boxneed further interference detection.In this method, since the interference detection is conducted onlyat discrete sample points, not for the polyhedral model; therefore,it is possible that the cutter does not interfere with the discretesample pointswhile it protrudes into the surface between the sam-ple points.

You and Chu’s approach was then adopted by Ding et al. [20]in their oriented bounding box and octree based algorithm todetermine whether the discrete surface points stored in thecolliding leaf octants really collide with the tool.

Also based on the distance calculation, in the algorithm forautomatic cutting tool selection for five-axis finish surface ma-chining, Jensen et al. [22] presented algorithms for detection andcorrection of local and global tool interference. In this algorithm,the local tool interference is detected by calculating the short-est distance between the cutter bottom and the part surface. Theglobal tool interference is detected by calculating the distance be-tween the cutter body and the part surface.

Suppose a fillet end cutter is positioned at the CC point P on asculptured surface represented by S(u, v), as shown in Fig. 9. CircleC with radius r is the center of the torus bottom of the cutter. Let hbe the distance between the cutter bottom and surface S(u, v) andhc be the distance between circle C and surface S(u, v) so that h =

|hc − rc |, where rc is the cutter fillet radius. Point s on the surfaceand pointQ on the cutting bottom of the cutter forms this distance.Then, the issue of local collision detection is the calculation ofthe shortest distance between circle C and the part surface. Inthis algorithm, the surface is approximated into triangles and thecalculation of the shortest distance between a circle and a surfaceis approximated by the distance between the circle and the surfacetriangles. To correct the local tool interference, the lag angle 1α iscalculated and adjusted. The authors pointed out that the lag angle

Fig. 10. Global collision detection [22].

1α can be calculated by the following equation:

1α = arctan

δ − h|s − O| l · (T × k)

(9)

where δ is the surface tolerance, s is a point on the surface, O is apoint on the center of the torus of the cutter, l = (s−O)/|s−O|, Tis the tool axis vector, and k is the rotational axis vector, k = l×n.

For global collision detection, due to the symmetry of the cutterbody, the problem of the distance between the cutter cylindricalbody and a surface is simplified to the problem of the distancebetween the cutter axis and the surface triangles. The distancebetween the cylindrical body of the cutter and the surface is thenexpressed as:

h = hl − R, for 0 ≤ l ≤ Le (10)

where hl is the distance between the line segment of the cutter axisand the surface, R is the cutter radius, and Le is the cutter effectivelength (Fig. 10).

and h = hl − RH , for Le ≤ l ≤ L (11)

where RH is the cutter holder radius and L is the total cutter length(Fig. 10).

If the cutter gouges into the surface, h < 0; otherwise, h ≥ 0.To correct the collision, the authors defined the rotational axisk = m × n, where m = (P1 − O1)/|P1 − O1|, n is the surfacenormal vector, and the correction angle 1θ is calculated as below(Fig. 10)

1θ = arctan

δ − h|P1 − O1|m · T

(12)

where δ is the surface tolerance, T is the tool axis vector.Another distance calculation based method was introduced

by Zhang et al. [23]. In this algorithm, to check the intersectionbetween the cutter bottom and the designed surface (gouging) theauthors simplified this problem by converting the cutter bottomplane into a limited number of circles (Fig. 11(a)), and thenchecking the intersection between each of these circles and thedesigned surface. If one of these circles intersectswith the designedsurface, gouging exists.

Similarly, the intersection checking between the cylindricalsurface of the tool and the designed surface (global collision)is simplified by converting the cylindrical surface into a limitednumber of circles (Fig. 12(a)), and then checking the intersectionbetween the circles and the designed surface. To check the

Page 8: Algorithms for collision detection and avoidance for five-axis NC machining: A state of the art review

8 T.D. Tang / Computer-Aided Design 51 (2014) 1–17

a b c

Fig. 11. Check interference between the cutter bottom and the designed surface [23].

a b

c d

Fig. 12. Check collision between the cutter cylindrical surface and the designed surface [23].

intersection between a circle and the designed surface, the authorscalculate the minimal distance between the circle and the surface.Once a collision is detected, the inclination and tilt angle areadjusted to avoid collisions.

In [24], gouging detection is done by projection the triangles ofthe facetedmodel and the cutting tool to a projection plane (e.g. theXY plane of the workpiece coordinate system). On the projectionplane, the region covering all the triangles which are intersectedby the shadow of the extended cutting tool projection is calledpossible interference region (PIR) (Fig. 13). All triangles in the PIRare then transferred to the tool coordinate system. Only triangleswhich are in the interference region are really checked for gougingat the rear-bottom side of the cutting tool and near the CC point.

2.7. Rolling ball method

Gray et al. [25] introduced a rolling ball method. The basic ideaof this method is to roll a varying radius ball along the tool path; ateach tool position, a small portion of the surface of the ball is usedto approximate a small portion of the surface being machined inthe vicinity of the cutting tool. The tool is then positioned to cut theinside (for concave and saddle regions) or the outside (for convexregions) surface of the ball. The first step in the rolling ball methodis to select an area beneath the tool called the shadow checkingarea (Fig. 14). The shadow checking area is then discretized into

points call shadow grid points. For each shadow grid point, apseudo-radius of curvature is computed as the radius of the circlewhose center lies along the surface normal of the CC point andcontacts both the CC point and the shadow grid point (Fig. 14). Thecurvature of the rolling ball may be convex, planar or concave. Theradius of the rolling ball is selected to be one of the pseudo-radiiof curvature computed. The selection is based on the hierarchyscheme shown in Fig. 15 The most ‘‘concave’’ radius of curvatureis used as the rolling ball radius for the current tool position. Thehierarchy scheme ensures that the tool is tilted far enough so thatit will not gouge the surface locally. In this algorithm, local gougechecking is automatically built-in to the positioning computations.However, determining interferences between the tool shank andtool holder with the part and fixture is not an integral part to thepositioning strategy.

The method presented by Gray et al. [25] requires the surfaceequations to compute the shadow checking grid points and a trans-formation from parametric space to the Euclidean space for theshadow checking grid points. This means that general surfacesdefined in other ways, e.g. triangulated data, and parts with mul-tiple surface patches that are intersected or stitched togethercannot be easily machined and the intersection lines betweenadjacent surface patches cannot be easily traversed. Gray et al. [26]then proposed a graphics-assisted method to eliminate this bar-rier by defining the shadow checking area directly in the local

Page 9: Algorithms for collision detection and avoidance for five-axis NC machining: A state of the art review

T.D. Tang / Computer-Aided Design 51 (2014) 1–17 9

Fig. 13. Possible interference region [24].

Euclidean space using the computer graphics hardware and bycomputing the shadow checking grid points using the computer’sdepth buffer. The graphics-assisted rolling ball method simpli-fies the calculations by using the computer’s graphics hardwareto compute surface points instead of repeatedly evaluating para-metric surface equations. This allows to easily machining multiplesurface patches. However, in this approach, tool positions weregenerated only at the vertices of the triangles representing the sur-face. It would be beneficial to position the tool anywhere on thesurface. The rolling ballmethod also generates conservative tilt an-gles in order to guarantee gouge-free tool positions. Gray et al. [27]

then developed a new arc-intersect method upon the rolling ballmethod by directly positioning the tool to contact the surfaceand thereby eliminates the conservative nature of the rolling ballmethod to give optimal tool positions. The deficiency in the struc-ture of the arc-intersect method is that it spends a lot of time tocompute the rotation angles for many shadow grid points. But atthe end, only one computed angle is used to determine the incli-nation angle of the tool. This is because in arc-intersect method,it is impossible to determine the largest rotation angle, unless allother rotation angles are also computed [28]. A new localizationtechnique that dynamically reduces the number of checking pointsduring the positioning process and consequently reduces the com-putation time needed for calculating the optimal inclination angleis then introduced by Hosseinkhani et al. [28]. Hosseinkhani de-veloped a quantitative definition for the gouging concept and usingthis definition in conjunctionwith numerical root-finder algorithmto determine the optimized tool orientations.

2.8. Radial projection method

Ilushin et al. [29] introduced a new approach for global collisiondetection in multi-axis NC machining. The authors exploitedthe axial-symmetry inherent in the tool’s rotational motion toderive a highly precise polygon-tool intersection algorithm. In thisalgorithm, theworkpiece and the parts of the CNCmachine that areto be checked for collision are given in a polygonal representation.To check for collisions, the authors firstly find a set of polygons(represent the workpiece and the CNC machine parts) those areclose to the tool by computing their inclusion or intersection witha bounding cylinder around the tool. These polygons serve aspotential candidates for interference test with the tool. First, theauthors radially project the model around the symmetry axis ofthe tool to a three-dimensional space, obtaining a set of surfacepatches. Then examine the projected surfaces, computing theplanar silhouette curves of these surfaces patches and constructingtheir lower envelope. Finally, the authors compare this lowerenvelope against the profile of the tool and check whether thetwo entities intersect. Such intersections will identify the collisionbetween the rotating parts of the CNC machine and the workpiece

Fig. 14. Shadow checking area [25].

Fig. 15. Hierarchy to rank pseudo-radius of curvature [25].

Page 10: Algorithms for collision detection and avoidance for five-axis NC machining: A state of the art review

10 T.D. Tang / Computer-Aided Design 51 (2014) 1–17

or other stationary parts such as fixture or base table. Thealgorithm allows testing for collisions against arbitrary shaped tooland toolholder. Nonetheless, the algorithm only detects possiblecollisions at the cutter contact points. Obviously, collisions couldoccur between cutter contact points and hence were missed.

Wein et al. [30] extended Ilushin’s approach to detect collisionsalong a continuous motion path of the tool. The motion of the toolis approximated by a sequence of sub-paths of pure translationsinterleaved with pure rotations. The collision detection problemalong each sub-path is then solved by using radial projectionof the obstacles (the workpiece and the static parts of the CNCmachine) around the tool axis to obtain a collection of criticalsurface patches, and by examining planar silhouettes of thesesurface patches. However, the algorithm can only detect collisionsbetween the tool and workpiece or between the tool and machineparts.

2.9. Graphics-assisted approach

Wang et al. [31] proposed a graphics-assisted approach to rapidcollision detection for multi-axis machining by integrating ma-chining environment culling and a two-phase collision detectionstrategy. In this approach, the machining environment is initiallysubdivided and organized hierarchically using a binary space parti-tioning (BSP) tree structure. The machining environment is culledconservatively to remove the irrelevant geometries from furtherchecking steps. Then in the precise collision detection stage, a two-phase collision detection strategy is used. In the first phase, basedon the extracted portions ofmachining environment and the view-ing volumes which are modeled according to the cutting tool’s ge-ometry, a collision map is generated to determine the collision.The second phase of detection will be invoked only for some am-biguous cases, where vector-based calculation is adopted to pre-cisely check the collision between the cutting tool geometry and acouple of ambiguous triangles which have been located by phaseone. Since this approach utilizes the graphics processing unit ingraphics hardware to assist computation in its main steps, thecomputation efficiency of the algorithm is improved. However, thechecking accuracy of the algorithm is subject to the size of thecutting tool and the graphics hardware’s specification. In addition,the algorithm only detect collisions between the cutting tool andworkpiece or machine parts, collisions among machine parts wasnot taken into account.

2.10. Sweep plane approach

All the introduced algorithms above only solved the problembased on the collision test on the final part; the change of theworkpiece geometry during the machining process was not takeninto consideration. It is obvious that if the workpiece geometryis not updated during the execution of the milling path, thesimulation program can only perform a collision test on thegeometry of either the blankworkpiece or the final part. Therefore,when thematerial is cut to produce the final shape of the designedpart, the algorithm could report collisions of the toolholder ormachine bodieswith thematerial already cut by the preceding partof the tool path [32]. In fact, this does not actually occur in reality. Inan earlier paper presented by the present author [33], the authorhave proposed a new algorithm to detect global collision in five-axis NCmachining in which the change of theworkpiece geometrydue to material removal is taken into account. In this algorithm,the workpiece and machine bodies are firstly approximated byan octree of bounding spheres. Collision detection is conductedbetween these spheres. If there is any interference betweenthese bounding spheres, their sub-spheres are further tested. Thesubdivision process is recursively performed until the resolution

Fig. 16. Global collision avoidance [8].

reaches the desired precision level. If there is no interferencebetween the spheres, there is noneed to subdivide anymore.Whenthe interference is detected between the spheres in the last octreelevel, the slices within these colliding spheres are further checkedby using the sweep plane algorithm to determine whether theenclosed objects really collide with each other. In the sweep planealgorithm, most of the slices of the moving bodies stay in paralleland their collisions are detected by checking the interferencebetween these parallel slices using 2D polygon clipping. Whereas,if the slices are not in parallel to the reference slicing direction(due to the rotary axes), the interference detection is conductedby examining overlaps of the projections of these slices on the 3perpendicular planes XY , YZ , and ZX . The accuracy of the algorithmcan be adjusted by changing the distance between the sweepplanes. This algorithm take into account not only collision betweentool and workpiece, but also collision between the other parts ofthe CNC machine. The algorithm can be applied to any five-axisCNC machines.

3. Review of algorithms for collision avoidance

3.1. Correction vector based method

In a 2-phase approach to global tool interference avoidance infive-axis machining, Lee and Chang [8] found the correction toolorientation to avoid global collision by defining a correction vectorCr in the direction opposite to the surface normal vector N at thecollision point on the surface Ps (Fig. 16). That means one can usethe interference surface normal to get away from the interferenceregion. The correction vector Cr is given by

Cr = (r − d) · N (13)

where r is radius of the cutter, d is the distance between thecollision point Ps and the tool axis Ty, as shown in Fig. 14. Thenthe correct tool axis and the new cutter center can be calculatedfrom the CC point Pa, the original tool axis Ty, and the correctionvector Cr .

3.2. C-space method

Morishige et al. [10] used C-space method to deal with the col-lision avoidance problem in five-axis machining. In this algorithm,Morishige employed a 2D C-space to enable automatic judgmentof the possibility of collision avoidance at each cutting point. In thecase where the whole definition area on the C-space is occupiedby the projected collision areas, collision avoidance is considered

Page 11: Algorithms for collision detection and avoidance for five-axis NC machining: A state of the art review

T.D. Tang / Computer-Aided Design 51 (2014) 1–17 11

Fig. 17. Method of collision avoidance using C-space [10].

to be impossible at any cutting point. On the other hand, if somefree areas exist on the C-space, the process of collision avoidance isimmediately carried out. The point corresponding to the tool withcollision is modified to the nearest point on the boundary betweenthe collision area and the free area in the C-space (Fig. 17). Thismodified point indicates a new pair of parameters of the tool ori-entation for which the tool is free of collision.

3.3. Visibility and accessibility method

Balasubramaniam et al. [17] proposed a method to generateroughing tool paths directly from the shape of the workpiece us-ing measures of accessibility to avoid collisions. The proposed ap-proach is done in three stages. In the first stage, the concept ofvisibility is used to determine the directions from which a pointin the delta-volume (the material to be removed) is to be accessi-ble to an observer located outside the convex envelope of the ob-ject (Fig. 18(a)). However, visibility does not ensure accessibilitybecause visibility cannot account for the diameter of the tool, the

toolholder or the spindle. Therefore, in the second stage—posturedefinition stage (Fig. 18(b)), by using rapid collision avoidancealgorithm a local search in the neighborhood of the visibility direc-tion is performed. The output of this step is a set of valid tool pos-tures for every sample point in the delta-volume. Finally, connectthe valid tool postures into a valid continuous tool path (Fig. 18(c)).

The collision avoidance approach is based on analysis of thepenetration of theworkpiece by the tool, the details are as follows:

1. Represent the tool as a series of triangulated slabs as shown inFig. 19(a).

2. Position the tool at the orientation suggested by visibility coneas shown in Fig. 19(b).

3. Performa collision detection check between tool andworkpiece(Fig. 19(c)). If a collision occurs, find the amount of penetrationand compute the correction angle.

4. Rotate the tool by the correction angle and repeat step 3. Exitafter the number of iterations exceeds a pre-defined value.

5. If the algorithm exits without converging, mark the entirevoxel (3D region of material to be removed) being sampled asinaccessible.

Then, in 2003, also based on the concept of visibility, Balasub-ramaniam et al. [19] used a similar approach in roughing path gen-eration presented early to deal with global collision-free tool pathsfor finish machining. Based on the location of the colliding pointsin the local coordinates of the tool, a rotational or a translationalcorrection is performed to bring the tool out of collision.

The translational correction is performed when the collisionsoccur close to the CC point as shown in Fig. 20. In this case thetool is subdivided into Voronoi regions, and the colliding point isidentified with the region in the tool. Then the colliding point is

(a) Compute visibility cones. (b) Assign tool postures. (c) Connect into tool path.

Fig. 18. Three stages of tool path generation [17].

Fig. 19. Penetration analysis and collision avoidance [17].

Page 12: Algorithms for collision detection and avoidance for five-axis NC machining: A state of the art review

12 T.D. Tang / Computer-Aided Design 51 (2014) 1–17

Fig. 20. Collision avoidance by translation [19].

Colliding points

Correction axis

Fig. 21. Collision avoidance by rotation [19].

moved out of collision through the closest entity on the tool thatdefines the Voronoi region.

The rotational correction is performed when the collidingpoints are far away from the CC point as shown in Fig. 21. In the ro-tational correction, the tool is pivoted about the CC point and thenrotated away from the collision. A point in collision is corrected bydetermining a correction axis and an angle that brings it out of col-lision. The magnitude of the correction angle is determined fromthe exit vector through the closest surface entity and the distanceof the colliding point from the CC point. The correction axis is per-pendicular to the plane containing the CC point, the colliding pointand the tool center. The main advantage of the rotational correc-tion over translational correction is that the CC point does not getshifted.

In the series of algorithms presented by Balasubramaniam, thepart is modeled as a cloud of points. The model may consist ofthousands of points. When a collision occurs between the tool andthe workpiece, it is likely that there are several points in collisionwith the tool. A composite correction is computed byweighting theexit vectors of the points in collision. The weighting process doesnot ensure that the tool will come out of collision in one step. Itmay therefore be necessary to iterate the correction scheme untilcollision has been eliminated.

Similar to the visibility sphere proposed by Balasubrama-niam [17–19], Wang and Tang [34] use the concept of discretizedvisibility map (VMap) to identify the set of valid orientations byinspecting the valid area with all the gouging constraints. Usingspherical coordinates, the unit vector T (represent the axis of thetool), as shown in Fig. 22, can be uniquely defined by two angleθ and ϕ, as shown in Fig. 23(a). Therefore, for every CC point onsurface S, the valid tool axes that respect both local and globalinterference-free constraint can be represented by their corre-sponding θ and ϕ. And the authors use discretized visibility map,VMap (CC), shown in Fig. 23(b), to denote the set of all those validorientations in the θ − ϕ rectangle [0, π] × [0, 2π ], and refer itas the free-space of the CC point. The algorithm supports a generaltype of tool including the flat-end tool and arbitrary complicatedobstacles. However, the computation and storage of the VMaps de-mands huge computer resources-in both of time and space.

Fig. 22. Contact relationship between flat-end tool and surface S [34].

Also based on accessibility analysis, in the algorithm for thegeneration of multi-axis machining tool paths, Xu et al. [35]proposed a solution to find the feasible domain of (θ, ϕ) spacefor avoidance of both tool collision and tool gouging, where θis the tool orientation angle with respect to the tool axis and ϕis the tool orientation angle with respect to the surface normalvector. At every CC point, a feasible domain is constructed for eachof the constraints (tool collision, tool gouging, and machine axislimit). The overlapping region of these domains generates a set ofallowed (θ, ϕ) values satisfying all constraints. Any point withinthe feasible domain thus represents a tool posture that is collisionfree.

Li and Zhang [36–38] developed a point-based method fortool accessibility determination in five-axis milling of sculpturedsurfaces where avoidance of local-gouging, rear-gouging andglobal-gouging were considered. In this algorithm, only collisionbetween tool and machined part was taken into account. Theaccuracy of the algorithm depends on the density of the sampledpoint due to the gaps between the neighboring sampled pointshave not been checked. Thus to reduce errors, the density of thesampled points is preferred high. However, in this case it will betime consuming.

3.4. Tool lifting method

Gouging elimination through tool lifting in tool path generationis presented by Kiswanto et al. [24]. In the proposed algorithm, iffive-axis milling is using constant tool-orientation, then gougingis eliminated by simply lifting the tool immediately when thegouging occurs. If varying optimal tool orientation is applied, thecutting tool will firstly try to find the minimum rotation angle toavoid gouging. If the gouging still occurs, e.g. when the specifiedmaximum inclination angle at a CC point is exceeded, then the toolis lifted. In both methods, the tool is lifted until it is gouge free.

Page 13: Algorithms for collision detection and avoidance for five-axis NC machining: A state of the art review

T.D. Tang / Computer-Aided Design 51 (2014) 1–17 13

a b

Fig. 23. (a) T represented by θ and ϕ; (b) the Vmap [34].

a

b c

Fig. 24. A case for rear gouging [40].

There are two methods of tool lifting for gouging avoidance:

1. Lift the tool to skip the gouging region.2. Lift the tool to barely touch the gouging region.

In the firstmethod, the cutting tool leaves the gouging region byjumping from the last non-gouging CC point to the next CC pointwhich is gouge free. In the second method, the tool is lifted tobarely touch the object of interference and keep the specified CCpoint to be as close as possible with the gouging CC point.

3.5. Angle-adjustment method

Li and Jerard [39] proposed an angle-adjustment method fortool position correction. In this algorithm, for each tool position,only the triangles under the tool shadow are checked. The cuttershadow is the cutter projection onto the xy plane. To simplify theinterference checking, each triangle overlapping the cutter shadowis transformed to a space inwhich the tool axis is parallel to the+zaxis with the tool center at (−r, 0, 0), where r is the tool radius,and the front edge at the origin. The transformation consist of twosteps: first, translating the CC point to the origin, and then rotatingthe coordinate system so the z axis is parallel to the tool axisand with the tool center at (−r, 0, 0). A standard homogeneous

transformation matrix T is used. After the transformation, theprojection of the tool on the xy plane is a disc. Triangles whose xyprojections overlap the disc are checked for interference. Assumethat the tool is at the initial tool position, and is then either raisedor lowered until it just touches the triangle. If the tool has tobe raised, gouging is detected, and the initial tool position needsmodification. Tool positions causing gouging are corrected in sucha way that the tool front edge touches or gets as close as possibleto the nominal CC points on the surface. Tool positions to becorrected aremodified by rotating the tool around the axis throughthe contact point and the normal to the tool-center plane untilthe tool just touches the surface instead of gouging into it. Therotation required to ensure gouge avoidance can be calculated byfinding the tilting angle at which the tool just barely touches thetriangle. The method is a trial and error based so that an initial andintermediate tool orientation is adjusted until gouging is free.

3.6. Local surface geometry based method

A solution for rear gouging checking and avoidance is proposedby Lo [40]. The algorithm is based on checking the local surfacegeometry and gives theminimum inclination angle that causes reargouging on a concave surface. As illustrated in Fig. 24, C and L are

Page 14: Algorithms for collision detection and avoidance for five-axis NC machining: A state of the art review

14 T.D. Tang / Computer-Aided Design 51 (2014) 1–17

(a) Rear gouging. (b) Side gouging.

Fig. 25. Local gouging [41].

the CC and CL points, respectively. L is the center of the circle forthe cutter bottom and C is specific point of the circle that touchesthe surface. G is gouging point, which is another point of the circlethat touches the surface. The author pointed out that C and G forma chord on the circle and are both located on the surface. The chordCG has a distance of d and an angle of ϕ with respect to CL as shownin Fig. 24(b). Lo defines t as a unit vector tangent to the surface; thisvector is obtained by projecting the vector CG onto the f –b plane(Fig. 24(a)). Since C and G are both located on the surface, they canbe connected by a circular arc, for which the radius is equal to theradius of surface curvature in the t direction (Fig. 24(c)). θϕ is theinclination angle that corresponds to a specific value of ϕ. Then thecritical inclination angle for rear gouging avoidance (θc) is obtainedby θc = Max−π/2≤ϕ≤π/2θϕ and by using the inclination angle thatis greater than θc a gouging free posture can be obtained. However,the algorithm is only for flat-end cutters and low curvature surface.For other cutters such as fillet-end or complex shaped surface,more complex algorithms are required.

3.7. Binary and bisection search method

Anothermethod to detect and avoid rear and side gouging (localgouging) is presented by Li and Feng [41]. Li and Feng employedthe binary search method to find the intersection points G1 andG2 on the bottom tool circle with the design surface (Fig. 25). Todistinguish between rear and side gouging, the position of the pointQ0, the diametrically opposite point to CC point on the bottomcircle, with respect to the design surface is determined. If Q0 isbelow the design surface, it is rear gouging; ifQ0 is above the designsurface, it is side gouging. Then, to avoid gouging, the inclinationangle of the tool is increased until all the points on the bottomtool circle are raised above the design surface. For rear gouging(Fig. 25(a)), based on the distance of point Q to the design surface(the maximum of gouging point located on the arc G1Q0G2) andits relative position to CC on the bottom tool circle, the gouge-freetool inclination can be obtained. In the case of the side gouging(Fig. 25(b)), there are two such maximum gouging points Q1 andQ2 on the arcs G1CC and G2CC, respectively; and two inclination

angles can be determined to raise Q1 and Q2 above the designsurface. The maximum of those two angles will be the gouge-freetool inclination angle. This method can detect and correct localgouging of flat-end mills in five-axis surface machining. However,the algorithm is only applicable to low curvature surface whereradius of curvatures are much larger than the nominal radius ofthe flat-end mill.

Lauwers et al. [1] integrated the collision detection into thetool path generation stage. To perform the collision check andcollision avoidance, tool path generation module, post-processingandmachine simulation have been integrated into one system. Thetool is positioned as close as possible to the final position, thencheck for collision and adjust the tool’s tilt (or lead) iterativelyuntil gouges are no longer detected. One collision is detected; thecollision vector is derived from the center point of the collisioncurve—the curve of intersection between two colliding elements,in the direction perpendicular to the tool axis. The algorithm usesthe length of the collision curve and the collision vector to controlthe iteration process to find a collision free tool posture. Theauthors pointed out that changing the tilt angle during collisionavoidance has the drawback that the tool contact point is moved,this gives an irregular movement of the tool along the tool track.Therefore, in their algorithm the inclination and screw angle hasbeen used to represent the tool orientation. Because changing thescrew angle can be seen as a rotation of the cutter around thesurface normal, this keeps the tool contact point at the same place(Fig. 26).

A collision avoidance algorithm that acts on the inclinationangle and screw angle was proposed by the authors. The algorithmuses a kind of bisection search method to find a collision free toolorientation within the given ranges of the inclination and screwangle. In this algorithm, after each check within the range for theinclination angle, a full search is done within the range for thescrew angle (Fig. 27). After a full search for the screw angle, thealgorithm checks the next position for the inclination angle andif collision still occurs, the search within the range for the screwangle is repeated. The algorithm stops when a collision free toolorientation is found or when a maximum number of checks areexceeded.

Page 15: Algorithms for collision detection and avoidance for five-axis NC machining: A state of the art review

T.D. Tang / Computer-Aided Design 51 (2014) 1–17 15

Fig. 26. Inclination and screw angle [1].

3.8. Intersection curve based method

In the context of the global collision correction, Monieset al. [42] presented a method for correction of global collisionsof a milling cutter for five-axis endmilling of free-form surfaces. Inthis method, tool positioning at the CC point (Pc) is firstly shown(Fig. 28). Then the intersection curve between the tool and themachined part is calculated. This curve is used to define points onthe surface inside the volume of the tool. For all points, the distancebetween the point and the tool axis is calculated to check whetherthey are really in collision (Fig. 29). These points are then used todefine all couples of the tool angular orientation (angle rotation θabout b axis and angle rotation ϕ about t axis, as shown in Fig. 28)for the tool to eliminate global interference.

3.9. Graphics-assisted approach

Wang et al. [43] proposed a graphics-assisted approach toidentify admissible tool orientations for collision avoidance in five-axis ball-end milling. This approach is built upon two techniques:graphics-assisted cubic mapping, and instantaneous visibilityand accessibility cones computation. The graphics-assisted cubicmapping algorithm computes the cutter’s instantaneous visibilitycone with respect to machining environment and the depth alongeach obstructed direction for each colliding CL point. Based onthe instantaneous visibility and depth information, an algorithmof spherical region shrinking is developed to compute the cutter’s

Fig. 28. Determination of tool positioning [42].

Fig. 29. Collision domain [42].

accessibility cone, which represents the aggregate of all admissiondirections of the cutter for current machining point. A collision-free cutter orientation can then be selected from the generatedaccessibility cone. The advantage of this approach is in handlingcomplex colliding situations (multi-point colliding or fully engagedcolliding) for five-axis machining. Nonetheless, the accuracy andcomputation cost of the algorithmdepend on the image resolution.A reduced image resolution results in improved computationalperformance; however, reduced image size indicates reducedaccuracy of accessibility cone.

Inclination

Screw

Fig. 27. Searching algorithm for a collision free tool orientation [1].

Page 16: Algorithms for collision detection and avoidance for five-axis NC machining: A state of the art review

16 T.D. Tang / Computer-Aided Design 51 (2014) 1–17

Table 1Comparison of algorithms for collision detection and avoidance for five-axis NC machining.

Algorithms Completemachinemodeling

Simulatematerialremoval

Workpiecegeometryupdate

Localcollisiondetection

Globalcollisiondetection

Localcollisionavoidance

Globalcollisionavoidance

Machine parts can bedetected

(1) (2) (3) (4) (5) (6) (7) (8) (9)

Surface properties analysis approach [2–7] No No No Yes No Yes No Tool & workpieceConvex hull approach [8] No No No No Yes No Yes Tool & workpieceC-space approach [9–11] No No No Yes Yes Yes Yes Tool & workpieceAccessibility approach [12–14,35–38] No No No Yes Yes Yes Yes Tool & workpieceBounding volume and space partitionapproach [15–19,34,20]

No No No Yes Yes Yes Yes Tool & workpiece

Distance calculation approach [21–24] No No No Yes Yes Yes Yes Tool & workpieceRolling ball approach [25–28] No No No Yes No Yes No Tool & workpieceRadial projection approach [29,30] No No No No Yes No No Tool & machine partsDrive/part surface paradigm approach [1] Yes No No Yes Yes Yes Yes Tool, workpiece &

machine partsGraphics-assisted approach [31,43] No No No No Yes No Yes Tool & machined

partsSweep plane algorithm [33,44] Yes Yes Yes Yes Yes Yes Yes Tool, workpiece, and

all machine parts

4. Comparison of algorithms for collision detection and avoid-ance

Table 1 gives the comparison of the existing algorithms forcollision detection and avoidance for five-axis NC machining.

It can be seen that all available algorithms in the literature onlysolved the problem of collision detection and avoidance based onthe test on the final part or at the finishing operation; the changeof the workpiece geometry during the machining process was nottaken into account and the simulation of material removal was notconsidered, except [33,44] (Table 1, column 3, 4). In addition, thealgorithms do collision check for both local and global, however,most of the algorithms only detect the collision between the toolandworkpiece (Table 1, column 9), possible collisions between themachine and part, themachine and tool or amongmovingmachinecomponents as well as complete machine modeling have not beenconsidered yet, except the approach presented in [1,33] (Table 1,column 2).

5. Conclusion

Collision detection and avoidance is one of the importantproblems in area of five-axis NC machining. A review of thealgorithms for collision detection and avoidance for five-axis NCmachining has been carried out in this work. As presented inthis paper, many new techniques have been developed for thelocal and global collision detection and avoidance in five-axis NCmachining. The proposed solutions can be classified as the surfaceproperties analysis based method, convex hull based method,C-space based method, accessibility based method, boundingvolume and space partitionmethod, and distance calculation basedmethod, rolling ball method, radial projection method, graphic-assisted method, and sweep plane approach. Through the analysisand comparison of algorithms, it is clearly that most of availablealgorithms in the literature only focused on collision detectionand avoidance at the finishing operation; especially, the changeof the workpiece geometry during the machining process was nottaken into account. Most of the algorithms only detect the collisionbetween the tool and workpiece, possible collisions between themachine and part, themachine and tool or amongmovingmachinecomponents as well as complete machine modeling have notbeen considered yet. Therefore, many challenges still need to befurther addressed to improve the quality and efficiency of the toolpath generation and tool orientation in five-axis NC machining. Inaddition, most of the algorithms for the local and global collision

detection and avoidance are computationally expensive; hencetime complexity of the algorithms is also a major issue for furtherimprovement.

Acknowledgment

This research is funded by Vietnam National Foundation forScience and Technology Development (NAFOSTED) under grantnumber 107.04.2011.09.

References

[1] Lauwers B, Dejonghe P, Kruth JP. Optimal and collision free tool posture infive-axis machining through the tight integration of tool path generation andmachine simulation. Comput-Aided Des 2003;35(5):421–32.

[2] Chen T, Peiqing , Wang J. Local interference detection and avoidance in five-axis NC machining of sculptured surfaces. Int J Adv Manuf Technol 2005;25(3–4):343–9.

[3] Ding XM, Fuh JYH, Lee KS. Interference detection for 3-axis mold machining.Comput-Aided Des 2001;33(8):561–9.

[4] Choi BK, Jun CS. Ball-end cutter interference avoidance in NC machining ofsculptured surface. Comput-Aided Des 1989;21(6):371–8.

[5] Rao A, Sarma R. On local gouging in five-axis sculptured surface machiningusing flat-end tools. Comput-Aided Des 2000;32(7):409–20.

[6] Yoon YH, Pottmann H, Lee YS. Locally optimal cutting positions for five-axissurface machining. Comput-Aided Des 2003;35(1):69–81.

[7] Cai Y, Xi G,Wang S. Efficient tool path planning for five-axis surfacemachiningwith a drum-taper cutter. Int J Prod Res 2003;41(15):3631–44.

[8] Lee YS, Chang TC. 2-phase approach to global interference avoidance in five-axis machining. Comput-Aided Des 1995;27(10):715–29.

[9] Choi BK, Kim DH, Jerard RB. C-space approach to tool-path generation for dieand mould machining. Comput-Aided Des 1997;29(9):657–69.

[10] Morishige K, Kase K, Takeuchi Y. Collision-free tool path generation using 2-dimensional C-space for five-axis control machining. Int J Adv Manuf Technol1997;13(6):393–400.

[11] Jun CS, Cha K, Lee YS. Optimizing tool orientations for five-axis machining byconfiguration-space search method. Comput-Aided Des 2003;35(6):549–66.

[12] Lee YS. Admissible tool orientation control of gouging avoidance for five-axiscomplex surface machining. Comput-Aided Des 1997;29(7):507–21.

[13] Elber G, Cohen E. A unified approach to verification in five-axis freeformmilling environments. Comput-Aided Des 1999;31(13):795–804.

[14] Zhiwei Lin, Hongyao Shen, Wenfeng Gan, Jianzhong Fu. Approximate toolposture collision-free area generation for five-axis CNC finishing process usingadmissible area interpolation. Int J Adv Manuf Technol 2012;62:1191–203.

[15] Jimenez P, Thomas F, Torras C. 3D collision detection: a survey. Comput Graph2001;25(2):269–85.

[16] Ho S, Sarma S, Adachi Y. Real-time interference analysis between a tool and anenvironment. Comput-Aided Des 2001;33(13):935–47.

[17] Balasubramaniam M, Laxmiprasad P, Sarma S, Shaikh Z. Generating five-axisNC roughing paths directly from a tessellated representation. Comput-AidedDes 2000;32(4):261–77.

[18] BalasubramaniamM,Ho S, Sarma S, Adachi Y. Generation of collision-free five-axis tool paths using a haptic surface. Comput-Aided Des 2002;34(4):267–79.

Page 17: Algorithms for collision detection and avoidance for five-axis NC machining: A state of the art review

T.D. Tang / Computer-Aided Design 51 (2014) 1–17 17

[19] BalasubramaniamM, Sarma SE, Marciniak K. Collision-free finishing toolpathsfrom visibility data. Comput-Aided Des 2003;35(4):359–74.

[20] Ding S, Mannan MA, Poo AN. Oriented bounding box and octree based globalinterference detection in five-axis machining of free-form surfaces. Comput-Aided Des 2004;36(13):1281–94.

[21] Chun-Fong You, Chih-Hsing Chu. Tool-path verification in five-axis machiningof sculptured surfaces. Int J Adv Manuf Technol 1997;13:248–55.

[22] Jensen CG, Red WE, Pi J. Tool selection for five-axis curvature matchedmachining. Comput-Aided Des 2002;34(3):251–66.

[23] Zhang W, Zhang YF, Ge QJ. Interference-free tool path generation for five-axis sculptured surface machining using rational Bezier motions of a flat-endcutter. Int J Prod Res 2005;43(19):4102–24.

[24] Kiswanto G, Lauwers B, Kruth J-P. Gouging elimination through tool lifting intool path generation for five-axis milling based on faceted models. Int J AdvManuf Technol 2007;32:293–309.

[25] Gray P, Bedi S, Ismail F. Rolling ball method for five-axis surface machining.Comput-Aided Des 2003;35(4):347–57.

[26] Gray P, Ismail F, Bedi S. Graphics-assisted rolling ball method for five-axissurface machining. Comput-Aided Des 2004;36(7):653–63.

[27] Gray P, Bedi S, Ismail F. Arc-intersect method for five-axis tool positioning.Comput-Aided Des 2005;37(7):663–74.

[28] Hosseinkhani H, Akbari J, Vafaeesefat A. Penetration-elimination method forfive-axis CNC machining of sculptured surfaces. Int J Mach Tools Manuf 2007;47(10):1625–35.

[29] Ilushin O, Elber G, Halperin D, Wein R. Precise global collision detection inmulti-axis NC-machining. Comput-Aided Des Appl 2004;1(1–4):233–42.

[30] Wein R, Ilushin O, Elber G, Halperin D. Continuous path verification in multi-axis NC-machining. Internat J Comput Geom Appl 2005;15(4):351–77.

[31] Wang QH, Li JR, Zhou RR. Graphics-assisted approach to rapid collisiondetection for multi-axis machining. Int J Adv Manuf Technol 2006;30(9–10):853–63.

[32] Kruth JP, Lauwers B, Klewais P, Dejonhe P. NC-postprocessing and NC-simulation for five-axis milling operations with automatic collision avidance.Int J Adv Manuf Sci Technol 1999;1(1):12–8.

[33] Tang TD, Bohez ErikLJ, Pisut Koomsap. The sweep plane algorithm forglobal collision detection with workpiece geometry update for five-axis NCmachining. Comput-Aided Des 2007;39(11):1012–24.

[34] Wang N, Tang K. Automatic generation of gouge-free and angular-velocity-compliant five-axis toolpath. Comput-Aided Des 2007;39:841–52.

[35] Xu XJ, Bradley C, Zhang YF, Loh HT, Wong YS. Tool-path generation for five-axis machining of free-form surfaces based on accessibility analysis. Int J ProdRes 2002;40(14):3253–74.

[36] Li LL, Zhang YF. Flat-end cutter accessibility determination in five-axis millingof sculptured surfaces. Comput-Aided Des Appl 2005;2(1–4):203–12.

[37] Li LL, Zhang YF. An integrated approach towards process planning for five-axis milling of sculptured surfaces based on cutter accessibility map. Comput-Aided Des Appl 2006;3(1–4):249–58.

[38] Li LL, Zhang YF. Cutter selection for five-axis milling of sculptured surfacesbased on accessibility analysis. Int J Prod Res 2006;44(16):3303–23.

[39] Li SX, Jerard R. Five-axis machining of sculptured surfaces with a flat-endcutter. Comput-Aided Des 1994;26(3):165–78.

[40] Lo C-C. Efficient cutter-path planning for five-axis surface machining with aflat-end cutter. Comput-Aided Des 1999;31(9):557–66.

[41] Li H, Feng HY. Efficient five-axis machining of free-form surface with constantscallop height tool paths. Int J Prod Res 2004;42(12):2403–17.

[42] Monies F, Mousseigne M, Redonnet JM. Determining a collision-free domainfor the tool in five-axis machining. Int J Prod Res 2004;42(21):4513–30.

[43] Wang QH, Li JR, Gong HQ. Graphics-assisted cutter orientation correction forcollision-free five-axis machining. Int J Prod Res 2007;45(13):2875–94.

[44] Tang TD. Intelligent collision detection and avoidance for five-axis NCmachining. Dissertation No. ISE-07-04. Bangkok, Thailand: Asian Institute ofTechnology (AIT); 2007.

Tran Duc Tang (T.D. Tang) is currently an AssociateProfessor at Faculty of Aerospace Engineering, Le QuyDon Technical University, Hanoi, Vietnam. He receivedhis Master of Engineering and Doctor of Engineeringin Design and Manufacturing Engineering from AsianInstitute of Technology (AIT) - Thailand in 2002 and2007, respectively. He is teaching the courses of AdvancedManufacturing Processes, CAD/CAM/CAE, FMS, Multi-axis Machine Tools. His research interests are Five-axis Machining, CAD/CAE/CAM/CNC, Modeling of FMS,Reverse Engineering, Rapid Prototyping, NC Simulation &

Programming, and Computer Graphics.