1 Introduction

Five-axis CNC machines are widely used in machining of sculptured surfaces such as turbine blades, impellers, blisk, molds, and dies [1, 2]. As one of the key parts used in new jet engines, the integrated structure of blisk reduces the engine’s weight, part count, and so on. However, it also introduces more geometrical constraints to the parts, which increase the complexity of tool orientation planning in milling process. When machining these complex products, it is necessary to flexibly control the direction of the tool posture to avoid interference [3,4,5]. And the filleted end mill has attracted more and more attention because of its larger cutting width [6,7,8,9,10]. So collision detection and avoidance becomes one of the key problems in machining of blisk with filleted end mill.

Collision problems in five-axis machining are divided into local interference and global collision [2, 4, 11]. The local interference usually refers to local gouging and rear gouging. Gouging means that the cutter cuts into the machined surface deeper than the expected geometry. Many methods are proposed to avoid the local interference [2, 12]. These techniques dealt with the local interference to obtain gouging-free tool orientations or locations with the concept of curvature matching.

Moreover, global collision is considered to be more serious as accidents may happen if such interference occurs in five-axis machining. It mainly focuses on the interference between the cutter and objects involved in machining. Global interference detection and avoidance are still a current technique challenge in five-axis milling [7, 13]. In general, there are two kinds of approaches to find the collision-free tool postures. The one firstly generates tool orientations according to some strategies and then adjusts them with interference detection, while the other one directly calculates collision-free regions and then optimizes tool orientations within these spaces [14]. Many methods are proposed based on the first approach [2, 15]. Wu et al. [16] presented a rotation method to eliminate the interference in milling of impellers with a non-orthogonal four-axis machine tool. In these studies, although the noninterference of existing tool orientations is mainly guaranteed, it is not convenient for further tool orientation optimization. In addition, these adjustment methods usually execute interference detection and correction iteratively for several times, which require large computation time and resource.

To avoid deficiencies of iterative adjustments, some research work is devoted to solving the problem of collision-free region directly. Since the interference between a cutter and free-form surfaces is difficult to identify, a convenient approach is converting involved surfaces into points, lines, or subdivided meshes [17, 18]. Chen et al. [17] expressed the sculptured surface as a triangular mesh body and solved the collision-free regions to optimize and smooth tool orientations. Lin et al. [18] expressed the machined surface as point cloud and detect collisions between the cutter and these points. These researches successfully calculate noninterference spaces of tool orientations with adjustment or search method. The efficiency and accuracy of interference detection are largely dependent upon the quantity of sampled or subdivided objects. As the quantity of objects increases, the computation cost will increase rapidly.

There is another perspective to detect the collision by taking advantage of the graphics processing unit in graphics hardware. Bi et al. [19] computed collision-free regions in milling of an impeller with the assistance of occlusion query functionality of the graphics hardware. Wang et al. [20] proposed a two-phase strategy to detect collisions between the cutter and triangulated obstacles. The hardware approach relies on expensive hardware and supporting software system.

An improved approach is presenting involved surfaces as a hierarchical structure, and only the interested parts involved in interference detection are further subdivided iteratively. Hu et al. [14] presented rigorous analyses of the obstacles in five-axis machining and propose efficient numerical algorithms for calculating and representing them. Tang et al. [21] approximated the machined part as an octree of bounding sphere to recursively conduct collision detection in five-axis machining. With the hierarchical approaches, the computational efficiency can be improved because the data involved in the interference calculation can be reduced. However, it is still time consuming to detect the interference repeatedly.

In addition, a novel approach was presented by Liang et al. [4] to solve the accessible regions of tool orientations of ball-end mill. Based on the visibility, only critical points related to the boundaries of accessible regions are searched and processed in two-dimensions. During the search, the checking surface was replaced by an offset surface and the ball-end cutter is converted to a ray accordingly that rotates around the known fixed cutter location point. Therefore, the line between the point on the offset surface and the fixed point is the critical vector to be verified. However, this method is not suitable for filleted end mill. This is because the cutter location point also changes when adjusting the tool posture. And it is almost impossible to construct the offset surface of the checking surface and a ray to replace the cutter.

On the basis of the method described in literature [4], in this paper, an improved method is proposed to solve the collision-free regions which can be applied to the filleted end mill. Based on the concept of free-form visibility, the tool-surface model in critical state can be established. With the model, the boundaries of subinterval feasible regions are related to the critical points on the profiles of checking surface. And the critical points can be searched one by one along the profiles. The rest of this paper is arranged as follows. In Section 2, the strategy of this approach is introduced. And the algorithms to search critical points are proposed in Section 3. Then, the combination of collision-free region is introduced in Section 4. In Section 5, the proposed algorithm is verified and evaluated with a closed blisk and comparing with a referenced method. The work is concluded in the last section.

2 Strategy to find collision-free region

As shown in Fig. 1, a channel of a blisk is formed by two adjacent surfaces and hubs. To machine a point located inside of this channel, tool orientations must be planned appropriately to avoid the potential collisions from the surfaces and hubs. For convenience, the surfaces and hubs of a blisk are represented by the checking surface in the following part.

Fig. 1
figure 1

Typical structure of blisk

A collision-free region is a set of tool posture along which the cutter will not collide or interfere with the checking surfaces. Imagine that there is a virtual sphere which can cover all the checking surfaces centered at the cutter location point. When putting a light source at this point, the region on the sphere that the rays can reach to is not obstructed by these surfaces. It is called collision-free region, while the obstructed region is called collision region. Geometrically, these regions can be presented by their boundaries which are constituted with central projections of these checking surfaces’ profiles.

As shown in Fig. 2, it can be observed how the rays are obscured by the checking surface in a plane which passes through the cutter location point PM. Those rays similar to lR5 can reach the virtual sphere, while the rays similar to lR1, lR2, and lR3 will be occluded. And the rays similar to lR4 will be in the critical state, which just reach the boundaries of the collision-free regions on the virtual sphere. It is these special rays that determine the boundaries of the collision-free regions. Moreover, the critical rays are different in a and b in Fig. 2. In Fig. 2a, the ray lR4 is just across the boundary of the checking surface. However, the ray lR4 in Fig. 2b is tangent to the checking surface. In addition, the ray lR2 is also special. In a very small neighborhood δp, the ray lR2 is tangent to the checking surface at the point Pa. In other words, the ray lR4 is the special state of the ray lR2.

Fig. 2
figure 2

Rays obscured by the checking surface

In this paper, the tool similar to the rays of lR2 or lR4 is called in the critical state. And the vector used to represent the tool posture is named critical vector. Accordingly, the points on the checking surface similar to the points Pa or Pb in Fig. 2b is called critical point. And the curve formed by those critical points is called the profile of the checking surface. For convenience, all the points on the boundary is also called critical point.

Each profile or boundary determines a subinterval collision-free region on the virtual sphere. If all the profiles associated with the channel can be found, the collision-free regions will then be solved with the intersection of those subinterval regions. So the key to solving the problem of collision-free region is to find the profiles of a single checking surface.

The tool is composed of two parts, as shown in Fig. 3, where the non-cutting part of the tool is the cylinder with radius R, while the cutting part is the torus with radius r and R > r > 0. The normal vector nM of the torus at any machining point PM points to the axis of the cutter. And in the plane passing through point PM and the axis of the cutter, the vector nM passes through the fixed point E, which is the center of arc. So the distance between the two points PM and E is equal to radius r. The geometric relationship between the tool and the checking surface and the machining surface will be discussed respectively when it is in the critical state in the next.

Fig. 3
figure 3

Parameters of tool structure

Shown in Fig. 4 is the tool in the critical state. The torus of the cutter is tangent to the machining surface SM(u,v) at the machining point PM. The tool posture is represented by vector τ. Here, the normal vector at the tangent point is the vector nM in Fig. 3. At the same time, the tool is tangent to the checking surface SC(u,v) at the point P by adjusting the vector of τ. Then, the point P is a critical point. The common normal vector of the cutter and the checking surface at the critical point is denoted by nP. For the convenience of data processing, a local orthogonal coordinate system E(xm,ym,zm) is set up at the point PM as follows: (1) the point E is set to the origin of the coordinates, (2) and the vector nM is set to the zm axis, and (3) the movement direction of the cutter at point E is set to the xm axis. Then the ym axis is determined by the right-hand criterion. All the descriptions and calculations are carried out in the coordinates in the following part, unless otherwise specified.

Fig. 4
figure 4

The tool in the critical state

However, the tool-surface tangent model is divided into two different cases. Firstly, as shown in a in Fig. 4, the tangent point is inside the surface, which means that the normal vectors at the critical point of the two surfaces are in the same direction. Secondly, as shown in b in Fig. 4, the tangent point is on the boundary of the checking surface. And there is no special requirement for the direction of the common normal vector and the normal vector of the checking surface at the critical point. In other words, any point on the boundary is a critical point and the corresponding critical vector can be found, while not all points inside the checking surface are critical points. For some special critical points on the boundary, they may satisfy the above two conditions. Then, these points are both on the boundary and on the profile.

Any curve on the checking surface can be represented by sample points distributed over it, whether it is a boundary or a profile. And those points can be searched one by one along the curve. In this paper, all sample points on the four boundaries of the checking surface will be searched with a given discrete precision and the corresponding critical vectors are calculated. And the endpoints of the profiles of the checking surface are selected from the searched sample points. Then, the critical points on the profiles are searched one by one, starting from those endpoints.

Each profile, if it exists, has two endpoints. One is called the starting point and is denoted by Pi,s. The other one is called the end point, which is denoted by Pi,e. As shown in Fig. 5, starting from a starting point P1,s, the first profile PL1 and the end point P1,e of the profile PL1 can be searched. Delete the point closest to point P1,e in the set of searched endpoints. At the same time, the point P1,s removed also from the set. Then, a new starting point P2,s will be taken out of the updated set at random and the second profile PL2 continues to be searched. After that, the process will be repeated until there are no new starting points. The algorithm to search the critical points on a checking surface is shown in Fig. 6.

Fig. 5
figure 5

The process of searching profiles

Fig. 6
figure 6

Flow chart of searching critical points

3 Algorithm to search sample critical points

In this part, the algorithm to solve sample critical points and the corresponding critical vectors will be introduced in detail. During the search, the maximum allowable angle between the adjacent critical vectors is called the discrete precision. This value, denoted by θδ, is pre-set as needed which is a very small number. According to the critical point position, the process is divided into two phases. First, the critical points on the boundaries are searched and the endpoints of the profile are selected. Then, the sample critical points on the profile of the checking surface will be searched starting from the selected endpoints.

3.1 Search sample points on boundary

Suppose four boundaries of the checking surface are SC(u,0), SC(u,1), SC(0,v), and SC(1,v). For convenience, use Lj(w) to represent the jth boundary. Here, w is the curve parameter (wjS ≤ w ≤ wjE), while wjS and wjE are the parameters at the start and end points of the jth boundary, respectively. The kth sample critical point on the boundary Lj(w) is represented by Pj(wk). The tangent vector of the curve Lj(w) at point Pj(wk) is denoted by mj(wk). And the common normal vector at the point Pj(wk) is denoted by nj(wk), as shown in Fig. 7. The intersection of the common normal line at the point Pj(wk) and the axis of the cutter is denoted by Fj(wk), while the intersection of the common normal line at the point PM and the axis of the cutter is denoted by Gj(wk). The intersection between the perpendicular line passing through the point E and the axis of the cutter is denoted as Mj(wk). The tool posture, which is represented by the vector τj(wk), can be determined by points Mj(wk) and Gj(wk).

Fig. 7
figure 7

The cutter is tangent to the boundary

The coordinate values of point Mj(wk) and point Gj(wk) can be solved by the geometric constraint relation that the cutter is tangent to both boundary Lj(w) and the machining surface SM(u,v). The unit vector nM can be calculated with Eq. 1. Here, the outward direction is used in the algorithm.

$$ {\mathbf{n}}_{\mathrm{M}}=\frac{\frac{\partial {\mathbf{S}}_M\left(u,v\right)}{\partial u}\times \frac{\partial {\mathbf{S}}_M\left(u,v\right)}{\partial v}}{\mid \frac{\partial {\mathbf{S}}_M\left(u,v\right)}{\partial u}\times \frac{\partial {\mathbf{S}}_M\left(u,v\right)}{\partial v}\mid } $$
(1)

And the vector \( \overrightarrow{E{G}_j\left({w}_k\right)} \) can be represented by the vector nM with a positive real number ak as Eq. 2.

$$ \overrightarrow{E{G}_j\left({w}_k\right)}={a}_k\cdot {\mathbf{n}}_{\mathrm{M}} $$
(2)

In addition, the points Mj(wk), Gj(wk), and Fj(wk) are all on the axis of cutter, so there should be a non-zero bk which satisfies Eq. 3.

$$ \overrightarrow{M_j\left({w}_k\right){F}_j\left({w}_k\right)}={b}_k\cdot \overrightarrow{M_j\left({w}_k\right){G}_j\left({w}_k\right)} $$
(3)

At the same time, the distance between point Pj(wk) and point Fj(wk) should be equal to R + ∆s and the distance between the point E and the axis of cutter should be equal to R-r. Then, the point Mj(wk) and point Fj(wk) should satisfy Eq. 4. Here, ∆s is safety allowance, which is the distance between the cutter and the checking surface when the cutter is in critical state.

$$ \Big\{{\displaystyle \begin{array}{l}\mid \overrightarrow{P_j\left({w}_k\right){F}_j\left({w}_k\right)}\mid =R+\varDelta s\\ {}\mid \overrightarrow{E{F}_j\left({w}_k\right)}\mid =R-r\end{array}} $$
(4)

Furthermore, the vector τj(wk) is perpendicular to vector \( \overrightarrow{E{M}_j\left({w}_k\right)} \) and vector \( \overrightarrow{P_j\left({w}_k\right){F}_j\left({w}_k\right)} \), respectively. And the vector mj(wk) also is perpendicular to vector \( \overrightarrow{P_j\left({w}_k\right){F}_j\left({w}_k\right)} \). Then, the point Mj(wk), point Gj(wk), and point Fj(wk) should also satisfy Eq. 5.

$$ \Big\{{\displaystyle \begin{array}{l}{\mathbf{m}}_j\left({w}_k\right)\cdot \overrightarrow{P_j\left({w}_k\right){F}_j\left({w}_k\right)}=0\\ {}\overrightarrow{E{M}_j\left({w}_k\right)}\cdot \overrightarrow{M_j\left({w}_k\right){G}_j\left({w}_k\right)}=0\\ {}\overrightarrow{P_j\left({w}_k\right){F}_j\left({w}_k\right)}\cdot \overrightarrow{M_j\left({w}_k\right){G}_j\left({w}_k\right)}=0\end{array}} $$
(5)

In Eq. 4 and Eq. 5, there are five unknowns and five independent equations. The values of ak, bk and the coordinates of point Mj(wk) can be solved. And the outward direction of vector \( \overrightarrow{P_j\left({w}_k\right){F}_j\left({w}_k\right)} \) is used in the algorithm. Then, the coordinates of points Gj(wk) and Fj(wk) can be solved with Eq. 2 and Eq. 3. Furthermore, the unit vector τj(wk) can be calculated by Eq. 6.

$$ {\boldsymbol{\uptau}}_j\left({w}_k\right)=\frac{\overrightarrow{M_j\left({w}_k\right){G}_j\left({w}_k\right)}}{\mid \overrightarrow{M_j\left({w}_k\right){G}_j\left({w}_k\right)}\mid } $$
(6)

Next, the sample points on the boundary Lj(w) are searched. And the included angle between the adjacent critical vectors τj(wk) and τj(wk+1) is denoted by Δθk, which should not be greater than the criterion θδ. The search process is divided into five steps, as shown below.

  1. Step 1

    Starting at the start point of the boundary Lj(w), the corresponding unit critical vector τj(wk) is calculated on the sample points Pj(wk). Here, k = 1 and wk = 0.

  2. Step 2

    Search the next sample point Pj(wk+1) on the boundary with a step of ∆w and calculate the corresponding critical vector τj(wk+1). Here, wk+1 = wk + ∆w.

  3. Step 3

    Calculate the included angle Δθk between the adjacent critical vectors τj(wk) and τj(wk + 1). If Δθk > θδ, then turn to the next step; otherwise, turn to step 5.

  4. Step 4

    Change the step ∆w by 0.5∆w temporarily. Search the point Pj(wk+1), and calculate the vector τj(wk + 1) again. Judge whether the parameter Δθk meets the condition. If Δθk > θδ, update the parameter ∆w again in the same way; otherwise, turn to step 5.

  5. Step 5

    If wk+1 + ∆w < wjE, let k = k + 1 and turn to step 2; otherwise, the search is over.

In this way, all sample points on the boundaries can be searched one by one and the flow chart of algorithm is shown in Fig. 8. After searching the sample points on the boundaries of checking surface, the endpoints of the profiles should be solved if there are. So some special points will be selected from the searched critical points on the boundaries.

Fig. 8
figure 8

Flow chart of solving critical points on the boundaries

Assume that the sample point Pj(wk) is one of the endpoints, at where the cutter and the checking surface are tangent. Then, the normal vectors at that point of the cutter and the checking surfaces should be in the same direction. Here, the normal vector \( \overrightarrow{P_j\left({w}_k\right){F}_j\left({w}_k\right)} \) of the cutter has been calculated in Eq. 5 and the normal vector of the checking surfaces can be calculated, which will be described in Section 3.2. Considering the adjacent sample points on the boundary are very close and the number of endpoints is relatively small, the point Pj(wk) is directly taken as the endpoint of the profile if the angle between normal vectors of the cutter and the checking surfaces is no greater than the precision θδ.

During the search, the searched points are stored into set SPB in order and the selected endpoints are stored into set STj accordingly.

3.2 Search adjacent sample critical point on profile

The process of searching adjacent sample critical point is divided into two parts. It firstly moves with a large step in a certain direction to approach the desired point and then adjusts with adaptive steps to reach the adjacent critical point. This part mainly focuses on the direction and step length of the search process. And the second part will be discussed in Section 3.3 and Section 3.4.

For convenience, the ith profile on the checking surface SC(u,v) is represented by PLi. The current known critical point and the next adjacent critical point on the ith profile are denoted by Pi,C and Pi,N, respectively, as shown in Fig. 9. In addition, the corresponding critical vector at the point Pi,C is denoted as τi,C, and the normal vector of the checking surface at the point Pi,C is denoted by ni,C, Here, the vector ni,C can be got with Eq. 7 and the outward direction is used in the algorithm.

$$ {\mathbf{n}}_{i,\mathrm{C}}=\frac{\frac{\partial {S}_C\left(u,v\right)}{\partial u}\times \frac{\partial {S}_C\left(u,v\right)}{\partial v}}{\mid \frac{\partial {S}_C\left(u,v\right)}{\partial u}\times \frac{\partial {S}_C\left(u,v\right)}{\partial v}\mid } $$
(7)
Fig. 9
figure 9

Search adjacent critical point along the profile

Keeping the cutter tangent to the checking surface, when the critical point moves from the point Pi,C to the next sample critical point Pi,N, the vector of the tool orientation also changed accordingly. The angle between the adjacent critical vectors is denoted by Δθ. And the angle Δθ should not be greater than the accuracy θδ, which means that the points Pi,C and Pi,N are pretty close together. Then, the direction vector ntan, from point Pi,C to point Pi,N, is almost perpendicular to both the vectors τi,C and τi,N, respectively. In addition, the vector ntan is almost parallel to the tangent plane of the checking surface at the point Pi,C. Then, the normal vector ni,C should be perpendicular to the searching direction. Therefore, the search direction vector ntan can be calculated by Eq. 8. Here, the direction to the next point is used in this algorithm.

$$ {\mathbf{n}}_{\mathrm{tan}}=\pm \left({\mathbf{n}}_{i,\mathrm{C}}\times {\boldsymbol{\uptau}}_{i,\mathrm{C}}\right) $$
(8)

Under the condition of a given precision θδ, the rough step length Δd can be calculated with Eq. 9 and will be adjusted as needed in the search. Here, l is the distance d between the points Pi,C and E.

$$ \varDelta d\approx 2l\cdot \sin \frac{\varDelta {\theta}_{\delta }}{2} $$
(9)

Then, a point Pi near the target point Pi,N can be searched from the given point Pi,C along the direction vector ntan with a step length Δd, as shown in Fig. 9.

In the parameter domain of the checking surface, the point Pi,C can be denoted as (ui,C,vi,C), while the search step Δd will change into (Δu, Δv), where Δu and Δv are the variations of parameters from point Pi,C to point Pi,N and that should satisfy Eq. 10.

$$ \left(\varDelta u\cdot {\mathbf{n}}_u+\varDelta v\cdot {\mathbf{n}}_v\right)\cdot {\mathbf{n}}_{\mathrm{tan}}=\pm \mid \left(\varDelta u\cdot {\mathbf{n}}_u+\varDelta v\cdot {\mathbf{n}}_v\right)\mid \cdot \mid {\mathbf{n}}_{\mathrm{tan}}\mid $$
(10)

where nu and nv are the directional derivatives along the direction of u and v respectively at the point Pi,C. The parameters Δu and Δv are also the decomposition of the search vector ntan in the direction of the vectors nu and nv. And at least one parameter is not zero.

The process of searching adjacent critical point Pi,N is divided into six steps, as shown below, where the method of searching critical point in step 5 will be described in detail in Sections 3.3 and 3.4.

  1. Step 1

    Set Δu or Δv to a small value, such as 0.001, and calculate the other one with Eq. 10.

  2. Step 2

    Search the point Pi on the checking surface SC(u,v) with the step (Δu, Δv).

  3. Step 3

    Calculate the ratio λd. Here, λd = Δd/ΔdP and ΔdP is the distance between points Pi,C and Pi.

  4. Step 4

    If 0.95 < λd < 1, the point Pi is considered to be near the adjacent critical point Pi,N. Otherwise, let Δu = λdΔu and Δv = λdΔv and turn to step 2 until λd is satisfied. Here, the value 0.95 can be adjusted as needed.

  5. Step 5

    Search the critical point Pi,N with the point Pi as the starting point, and calculate the corresponding critical vector τi,N.

  6. Step 6

    Calculate the angle Δθ between the vectors τi,C and τi,N. If Δθ ≤ θδ, let j = j + 1 and search for the next adjacent critical point. Otherwise, let λθ = (Δθ-θδ)/Δθ, Δu = λd λθ Δu, and Δv = λd λθ Δv. Then, update the point Pi,0 and turn to step 5.

  7. Step 7

    All the adjacent critical points on one profile of the checking surface can be searched one by one through the search process described above. During the search, the searched points and the corresponding critical vectors on the ith profile are stored into set SPi in order.

3.3 Critical point identification

During the search of adjacent critical point in Section 3.2, the point Pi near the target point has been found and the target critical point needs to be searched. It is mainly divided into two steps. First, determine whether the point is a critical point. Then, if not, search a critical point near it. Here, the first part will be solved in this section and the second will be described in Section 3.4.

Suppose that the point Pi is a tangent point at where the cutter and the checking surface are tangent. Then, it should be a critical point only if the cutter and the machining surface are at the point PM. And this can be determined by the distance from the fixed point E to the axis of the cutter.

As shown in Fig. 10, the normal vector of the checking surface at the point Pi is denoted as ni. And the point Fi is the intersection of the normal line passing through point Pi and the axis of cutter. It can be calculated by Eq. 11. Here, ∆s is safety allowance.

$$ {F}_i={P}_i+\left(R+\varDelta s\right)\cdot {\mathbf{n}}_i $$
(11)
Fig. 10
figure 10

The geometric relationship at the critical point

In addition, the point Gi is the intersection of the normal line passing through point PM and the axis of cutter. Then, there must be a plane, denoted by π, that goes through the point Fi and has a normal vector as ni. And the axis of cutter should be in the plane π. It is obvious that the distance between the point E and the axis of cutter is determined by the position of Pi,j and the normal vector ni on the checking surface. It should be equal to R-r if the cutter and the machining surface are tangent at the point PM. Then, the corresponding critical vector τi can be got with Eq. 12. Here, the point Mi is the perpendicular foot from point E to the axis of cutter.

$$ {\boldsymbol{\uptau}}_i=\frac{\overrightarrow{M_i{F}_i}}{\mid \overrightarrow{M_i{F}_i}\mid } $$
(12)

Based on the above, the method for determining critical point and calculating critical vector will be discussed below in terms of whether the vectors ni,j and nM are perpendicular or not.

  1. (a)

    The vectors ni and nM are not perpendicular. In this case, the point where the normal line PME intersects the plane π is point Gi, because it is on the axis of the cutter, as shown in Fig. 9. Therefore, the coordinates of the point Gi can be solved with Eq. 13. Here, a is non-zero.

$$ \Big\{{\displaystyle \begin{array}{l}{\mathbf{n}}_i\cdot \overrightarrow{G_i{F}_i}=0\\ {}\overrightarrow{G_i{F}_i}=\overrightarrow{P_{\mathrm{M}}{F}_i}-\overrightarrow{P_{\mathrm{M}}{G}_i}\\ {}\overrightarrow{P_{\mathrm{M}}{G}_i}=a\cdot {\mathbf{n}}_{\mathrm{M}}\end{array}} $$
(13)

Since the line EMi is perpendicular to the line FiGi, the coordinates of the points Mi can be solved with Eq. 14. Here, the parameter b is non-zero.

$$ \Big\{{\displaystyle \begin{array}{l}\overrightarrow{F_i{G}_i}\cdot \overrightarrow{E{M}_i}=0\\ {}\overrightarrow{E{M}_i}=\overrightarrow{F_iE}-\overrightarrow{F_i{M}_i}\\ {}\overrightarrow{F_i{M}_i}=b\cdot \overrightarrow{F_i{G}_i}\end{array}} $$
(14)

The point Pi on the checking surface SC(u,v) is the critical point only if the solution to Eq. 11 is a > 0 and the distance from the point E to the axis of cutter is equal to R-r, which makes the cutter tangent to the machining surface at point PM.

  1. (b)

    The vectors ni and nM are perpendicular. In this case, the vector nM is parallel to the plane π. Then, the normal line PME can intersect the tool axis of the cutter which is in the plane π only if the plane π passes through the point E, as shown in a in Fig. 11. It can be identified with Eq. 15. Here, the point Fi can be got with Eq. 11.

Fig. 11
figure 11

The plane π passes through the point E

$$ {\left|\overrightarrow{E{P}_i}\right|}^2={\left|\overrightarrow{P_{i,j}{F}_i}\right|}^2+{\left|\overrightarrow{E{F}_i}\right|}^2 $$
(15)

If the point Pi makes Eq. 15 true, there must be a point Mi on the axis of cutter in the plane π that makes the cutter tangent to the machining surface at the point PM, as shown in b in Fig. 11. And the point Mi can be calculated with Eq. 16.

$$ \Big\{{\displaystyle \begin{array}{l}\overrightarrow{E{M}_i}\cdot \overrightarrow{F_i{M}_i}=0\\ {}\mid \overrightarrow{E{M}_i}\mid =R-r\\ {}\overrightarrow{E{M}_i}\cdot {\mathbf{n}}_i=0\\ {}\overrightarrow{E{M}_i}\cdot {\mathbf{n}}_{\mathrm{M}}\ge 0\end{array}} $$
(16)

3.4 Search critical point

In this part, a critical point will be searched around the point Pi if it is not a critical point. In fact, even if it is not on the profile, the deviation is small, which is obvious from the search in Section 3.2. And a new point can be searched by a local adjustment which can make it true. As shown in Fig. 12, it is obvious that, when the position of Pi is adjusted, the normal vector ni also changes accordingly. Then, the distance from the point E to the axis of cutter will change accordingly too. The method of searching the critical point is described as shown below.

  1. Step 1

    Calculate the average curvature at the point Pi on the checking surface SC(u,v) and the radius of curvature Rsp. Then, the center Ci of the curvature circle can be found.

  2. Step 2

    Select a point M0 on the line EMi which makes the distance between the points M0 and E is equal to R-r, where, if the solution from Eq. 12 is a > 0, the point M0 will be taken in the positive direction of the vector nM. Otherwise, it will be taken in the opposite direction.

  3. Step 3

    Connect the points Fi and M0 by the straight line FiM0. The vertical line to straight line FiM0 is made by passing the point Ci, and the foot is denoted by Bi+1. Then, the vertical line to the checking surface SC(u,v) is made by passing the point Bi+1, and the foot is denoted by Pi+1.

  4. Step 4

    Verify whether the point Pi+1 is a critical point. If not, let i = i + 1 and turn to step 1 until Pi+1 is a critical point.

Fig. 12
figure 12

Search critical point around the starting point

However, it is difficult in the search to make the distance between the point E and the axis of the cutter is definitely equal to R-r. Of course, this is not necessary. In order to increase the robustness of the algorithm and improve the efficiency by reducing the number of iterations, it can be slightly modified and replaced by Eq. 17. Here, the introduced parameter μ is called the deviation which is a small positive real number and d is the distance between the point E and the axis of the cutter.

$$ -\mu \le d-\left(R-r\right)\le \mu $$
(17)

Then, there will be a deviation ε between the cutter and the checking surface around the point Pi,j, which can be calculated with Eq. 18, where the angle between vectors ni,j and the line \( \overrightarrow{E{M}_i} \) is represented by\( \left\langle {\mathbf{n}}_{i,j},\overrightarrow{E{M}_i}\right\rangle \). And obviously, ε is not greater than μ. In order to avoid the cutter from interfering with the checking surface, the maximum deviation ε can be taken into account when designing the safety allowance ∆s.

$$ \varepsilon =\mu \cdot \cos \left\langle {\mathbf{n}}_i,\overrightarrow{E{M}_i}\right\rangle $$
(18)

In addition, for the convenience of data processing in Section 4, it is necessary to find a tool posture which must be in the subinterval collision-free region. This special tool posture is represented by the identification vector τi,t. It can be obtained in this way. First, a searched critical point roughly in the middle of the profile PLi is selected as the starting point. Then, a special critical point which can be searched with the safety allowance ∆s in Eq. 11 is replaced by a bigger one. And the corresponding critical vector is the right one.

4 Algorithm to solve collision-free regions

In this part, the searched sample critical points and corresponding vectors will be processed to construct the subinterval collision-free regions in two-dimensions. And the collision-free regions of the channel will be solved as the intersection of those subinterval regions.

4.1 Data processing

In order to describe the data processing process more clearly, the critical vector is uniformly expressed in terms of τi,j, whether the searched corresponding critical point is on the boundary or on the profile of checking surface. Those critical vectors are mapped into the polar coordinate system E(α,β). As shown in Fig. 13, α is the angle between the vector τi,j and the zm axis, and 0 ≤ α ≤ π/2. In addition, β is the angle between the projection of the vector τi,j in the plane xmym and the xm axis, and 0 ≤ β < 2π. Correspondingly, the critical vector τi,j in polar coordinate system E(α,β) becomes a point Pτi,j.

Fig. 13
figure 13

Critical vector mapped into two-dimensions

In the two-dimensions, the mapped points associated with the ith profile are connected into a curve PPLi in the order. And the subinterval collision-free region Ωi is the inner or outer region surrounded by the curve PPLi if it is closed. Otherwise, there will be a closed area which is surrounded by the curve PPLi together with the diameters at the two ends of the curve and the arc of α equal π/2, as shown in Fig. 14. The direction of counterclockwise walking along the boundaries of the region is defined as positive direction. Thus, the interior of the region is located to the left of the boundaries when walking along the positive direction.

Fig. 14
figure 14

Subinterval collision-free region in two-dimensions

However, any curve PPLi just splits the area inside the circle of α equals to π/2 into two disjoint parts, as shown in Fig. 14. It needs to be distinguished by the position relation between a point i,t and the curve PPLi. Here, the point i,t is called the identification point and it is mapped by the identification vector τi,t, which has been covered in Section 3.4.

Among all points of the curve PPLi, there are two points closest to the point i,t which are denoted as i,a and i,b, respectively. The region Ωi can be identified by the position of the point i,t relative to the points i,a and i,b, as shown in Fig. 14. The region is determined as long as the sequence of passing through the points i,a and i,b is determined.

Two vectors nab and nbt are constructed separately, as shown in Fig. 15, where the vector nab is going from point i,a to point i,b and vector nbt is going from point i,b to point i,t, assuming the sequence of the points i,a and i,b on the curve PPLi can be determined by distinguishing the positions of vectors nab and nbt. If the solution of Eq. 19 is Dt > 0, the three points are arranged counterclockwise, as shown in Fig. 15, and the sequence of passing through the points i,a and i,b is determined. Here, the vectors nab and nbt are represented as a matrix with one row and two columns, respectively.

$$ {D}_t={\left[{\mathbf{n}}_{ab},0\right]}^T\times {\left[{\mathbf{n}}_{bt},0\right]}^T\cdot {\left[0,0,1\right]}^T $$
(19)
Fig. 15
figure 15

The position relation between three points

4.2 Combine collision-free regions

The collision-free region of the channel can be solved with the intersection of the subinterval regions which have been constructed in section. The solution to the intersection is to add subinterval region Ωi on the basis of Ω1 one by one and update it.

First of all, calculate all the intersection points between the boundaries of regions Ω1 and Ωi. The ordered intersection is denoted by PCi, as shown in a in Fig. 16. Then, starting from any intersection point, the boundary of region Ωi can be pruned by intersection along the positive direction of the boundary of region Ω1. Judge whether the boundary of region Ωi between two intersections is inside the region Ω1. If not, it will be removed. Following the same procedure, the boundaries of region Ω1 will also be trimmed. Finally, the region of the remaining curve is the common region of Ω1 and Ωi, as shown in b in Fig. 16. Where, Ω represents the intersection of two subinterval regions.

Fig. 16
figure 16

The intersection of two subinterval collision-free regions

There are two keys to finding the intersection of two regions. First, calculate the intersection of the boundaries of two regions. This can be done with mature commercial software, which is not described here. Second, determine whether the boundary between the two intersections needs to be deleted. This part gives a brief account of that.

On the boundary of region Ω1, there are two points adjacent to the intersection PCi denoted as PA1 and PA2 respectively, as shown in Fig. 17. And on the boundary of region Ωi, the two points adjacent to the intersection PCi are denoted as PB1 and PB2 respectively. If the point PB1 is to the left of the points PA1 and PCi or to the left of the points PA2 and PCi, the boundary of the region Ω1 that contains the point PB1 will be preserved. Otherwise, it should be removed. The judgment method has been introduced in detail in Section 4.1.

Fig. 17
figure 17

The position of adjacent points at the intersection

5 Algorithm verification

5.1 Applications

The proposed algorithm is applied to calculate the collision-free regions for one channel of closed blisk. The blisk is 95.5 mm high with 24 channels. The diameter of the outer hub is 585.5 mm, while the diameter of the inner hub varies from 290.3 to 370.6 mm. The cutter in applications is a filleted end mill with R = 8 mm and r = 2 mm. The suction surfaces, pressure surfaces, and part of hub surfaces are related to the channel of the blisk. The milling point PM is on the inner hub surface in the channel and is close to the side of pressure surface, where the constraint is more serious.

The safety allowance ∆s is set to be 0.5 mm. At the same time, the small positive quantity μ in Eq. 17 is set to be 0.01 mm in these applications. And the pre-set discrete accuracy θδ is set to be 0.02°. The searched critical points are imported into the CAD/CAM software UG/NX to show them in Fig. 18.

Fig. 18
figure 18

Searched critical points in applications

In this application verification, only part of the hub surfaces related to the channel is selected. The tangent plane at point PM is represented by πM, where the inner hub surface is below the plane πM at the milling point PM and there is no critical point. And part of pressure surface and suction surface are below the normal plane πM. The searched profiles are marked with notations PL1PL6 respectively.

The searched critical points are then mapped into PCL(α,β) polar coordinate system and drawn in a in Fig. 19. Here, profiles PL1PL6 in Fig. 18 are replaced by PPL1PPL6 in a in Fig. 19. The final collision-free regions solved with the proposed method are shown in b in Fig. 19. There are two collision-free regions for the closed blisk. This is due to the constraint of the outer hub surface on the vector.

Fig. 19
figure 19

Solved collision-free regions of closed blisk

A point, which is denoted by 2 is selected at the boundaries of the collision-free regions, as shown in b in Fig. 19, and its corresponding vector is taken as the direction of the cutter. Then, the cutting simulation is carried out in the CAD/CAM software UG/NX and the result is shown as Fig. 20. Here, the red part is the tool used for application verification. It can be seen that the cutter is very close to the boundary of pressure surface and there is no interference. And the position of the nearest point is the same as expected. Here, the distance between the cutter and the checking surface is safety allowance ∆s, which is set to be 0.5 mm.

Fig. 20
figure 20

Cutting simulation in UG/NX

5.2 Analysis

The proposed method is implemented in MATLAB R2014a in a 64-bit operating system with an Intel(R) Core(TM) i5-3320M CPU with 2.60-GHz processor. The total running time is 31.68 s, and the detailed results are shown in Table 1. The algorithm to search critical points is the key part in the proposed method. In the example, 15,458 points are searched in 4.23 s, which is about 13.35% of the total running time. From the results, the most time-consuming part is the algorithm to find and calculate intersection points for all segments. In general, the time taken to compute the intersections increases rapidly as the number of critical points increases. What need to be noticed is that it can be shortened because, by enlarging the distance accuracy μ. the frequencies in the process of searching are reduced. And there will be no interference.

Table 1 Results of the proposed method

The calculation errors are evaluated both in distance error and angle error. One thousand pairs of random points are selected to calculate the distance error and angle error. Firstly, the distance error means that the deviation between the distance from a critical point to the axis of the cutter and the theoretical distance. The mean error, maximum error, and standard deviation are 3.8 × 10−3, 9.5 × 10−3, and 1.2 × 10−3 mm, respectively. Secondly, the angle error means the angle between the adjacent critical vectors. The mean error, maximum error, and standard deviation are 0.19, 0.02, and 0.009°, respectively.

5.3 Comparisons

In this part, the method proposed in this paper will be compared with the algorithm in literature [4]. However, the latter is mainly applicable to ball-end mill and hard to deal with the filleted end mill. So, the ball-end cutter with the same diameter R = 8 is selected for comparison in the method proposed in the reference [4]. Under the condition of the roughly equal number of critical points, the results of the comparison are shown in Table 2. Here, the consistency is the ratio of the minimum and maximum angle between two adjacent critical vectors.

Table 2 Comparisons of two methods

From the comparison results, the efficiency of the two methods is basically equal. For the same checking surfaces, the number of critical points searched in unit time in this paper is about 87% of the algorithm in the literature [4]. However, the consistency of the proposed method is significantly better than that of the method in the reference.

The angle between the searched adjacent critical vectors is always checked and adjusted in the presented algorithm. And it is the reason for the better consistency. However, the constant step length is used to search the adjacent critical points on the boundaries and the profiles of checking surface in literature [4]. This saves some computing resources. But the price is relatively poor consistency, which will be more significant when the point PM is close to the critical points.

6 Conclusion and outlook

A detailed process of generating the collision-free regions of tool postures in five-axis milling of blisk is presented in this paper. To avoid the interference collision between the filleted end mill and checking surface, the geometric relationships between the cutter and the checking surface and the machining surface in the critical state are discussed. The main contributions of this work can be summarized as follows.

  1. (a)

    A tool-surface tangent model is established. With the model, the problem that the axis of the filleted end cutter does not rotate around a fixed point when search the critical point by adjusting the tool posture can be solved.

  2. (b)

    An algorithm to search critical points associated with the boundaries of collision-free regions with a self-adapting step length is proposed.

  3. (c)

    The angle between the adjacent critical vectors is taken to control the distribution of critical points. So that the consistency of mapping points in two-dimensional space can be improved.

The proposed method has been verified to be efficient and accurate. The future work will be dedicated to generalize the method to be applicable to the cutter of any shape.