Region based five-axis tool path generation for freeform surface machining via image representation

Region based five-axis tool path generation for freeform surface machining via image representation

Robotics and Computer Integrated Manufacturing 57 (2019) 230–240 Contents lists available at ScienceDirect Robotics and Computer Integrated Manufact...

4MB Sizes 0 Downloads 64 Views

Robotics and Computer Integrated Manufacturing 57 (2019) 230–240

Contents lists available at ScienceDirect

Robotics and Computer Integrated Manufacturing journal homepage: www.elsevier.com/locate/rcim

Region based five-axis tool path generation for freeform surface machining via image representation Ke Xu, Yingguang Li

T



Nanjing University of Aeronautics and Astronautics, Nanjing, China

A R T I C LE I N FO

A B S T R A C T

Keywords: Digital image Machining process Five-axis tool path Freeform surface machining

This paper inaugurates a brand new five-axis tool path generation method for freeform surface machining, which is solely based on digital image processing. By utilizing image representation, a freeform surface can be digitized into a uniform grayscale image. With this novel representation, we come up with a region based five-axis tool path scheme with remarkably enhanced utility towards freeform surface machining process. The image representation possesses sufficient geometric data for us to evaluate the surface normal distribution and split the surface area accordingly via image processing algorithms. Since each partitioned region contains a limited surface inclination range, one rotary axis is locked with a certain angle during the processing of this region. In addition, by further exploiting the potential of the image representation, the cutter contact (CC) curves are extracted purely from the image of each partitioned region. Preliminary results show that this method is more than adequate for the tool path computation. The computed tool path outperforms the benchmarks by reducing the machining time for as much as 40%, as verified in the physical cutting test.

1. Introduction Path planning is a long-term research hotspot in robotic and computer-integrated manufacturing. Aspects such as additive manufacturing [1], Numerical Controlled (NC) machining [2], computeraided inspection [3] and robotic manufacturing [4] all demand a specific tool trajectory to facilitate the automation of precise control and operations. Regarding the numerical controlled machining, five-axis configuration is a preferable choice for freeform surface machining for its higher flexibility and accessibility to prevent global and local interference. There are a variety of successful applications taking advantages of the five-axis capability, including but not limited to the manufacturing of spiral bevel gears [5, 6] and turbine blisks/impellers [7, 8]. Compared to conventional three-axis machine, five-axis machine is equipped with two additional rotary axes such that with different combination of rotary angles, the cutter is able to approach to the workpiece with different postures to accommodate rigorous machining requirements. Fig. 1 demonstrates the three common types of five-axis machine configuration, the two rotary axes are either attached to the table side or to the spindle side. Among these configurations, the tabletilting type takes up a large portion in lightweight machining tasks, for its higher cost-effectiveness and easy upgrade from a three-axis machine. However, the kinematic performance of the rotary axes is highly



restricted due to the huge moment of inertia of the machine table, dragging down the overall machining efficiency to a great extent. The two most prevalent five-axis machining options for freeform surface are flank milling [9, 10] and end milling. While flank milling is more concentrated to the applications regarding turbine blisks/impellers, end milling is more versatile towards various types of surface due to its point contact feature. During the planning of five-axis end milling path, both the cutter contact (CC) curves and the tool orientations need to be properly determined w.r.t the workpiece coordinate system (WCS). Regarding the CC curve generation, there has been a rich development in the literature, such as the isoparametric method [11, 12], the isoplanner method [13-15] and the isoscallop height method [16-20]. Some advanced strategies such as the machining potential field method [21] and the double scalar field method [22] strive to find the optimal feed direction with the largest cutting width, so as to theoretically increase the machining rate. All these methods provide abundant possibilities to fill the surface with distinctive patterns of CC curves. While for the later stage of tool orientation determination, many existing strategies are devoted to the avoidance of local gouging and global interference between the tool and workpiece [23-28], as well as to the smoothness of the tool orientation sequence along the path [2931]. Regarding the aforementioned efficiency issue of five-axis

Corresponding author. E-mail address: [email protected] (Y. Li).

https://doi.org/10.1016/j.rcim.2018.12.006 Received 8 November 2018; Received in revised form 10 December 2018; Accepted 11 December 2018 0736-5845/ © 2018 Elsevier Ltd. All rights reserved.

Robotics and Computer Integrated Manufacturing 57 (2019) 230–240

K. Xu, Y. Li

Fig. 1. Three types of five-axis machine configuration.

All these methods deliver valuable insights for us to develop more effective and general approach. However, despite the fact that some of these methods are not truly effective, one common issue they share is the lack of versatility towards different surface representations. For example, some methods exclusive for parametric surfaces cannot deal with triangular mesh surfaces, and vice versa. Consequently, these methods can hardly apply to a real case, where the surface could be represented indefinitely as a trimmed, compound, or a mesh surface, etc. Although some dedicated pre-processing approaches, such as the harmonic mapping [39], are available to convert one surface representation to another, they are not systematically devised for the tool path optimization purpose, the accuracy and computing efficiency are thus unsatisfactory. Motivated by this issue and aiming at a truly efficiency-enhanced five-axis machining, we in this work propose a universal tool path generation scheme, which takes whatever surface representation as an input and converts to a grayscale image. The surface partitioning and tool path generation processes are solely based on this image, which encapsulates the geometric information of the surface in a user-specified resolution. In the following content, we will first illustrate how a surface is represented as an image, followed by the analysis of the machine kinematics and how the surface embedded image is partitioned accordingly. We will further utilize the image processing idea to generate the time-efficient tool paths for each partitioned region, whose effectiveness will be verified by typical examples.

Fig. 2. The singularity issue of a typical table-tilting machine.

machining, two most prominent deficiencies exist in these classic works. Primarily, none of these methods incorporate machine configuration into the tool path planning scheme. A plausible path could turn out interior in real machining execution. Specifically for the tool orientation, after the nonlinear inverse kinematic transformation (IKT), even a tiny change near the singularity pole can lead to a drastic motion of the rotary axes on the machine table [32] (see Fig. 2), not to mention a large and unsmooth orientation change in WCS. The nonlinear IKT plus the weak kinematic capacity of the rotary axes sometimes lead to a highly reduced productivity. Secondly, these CC curve generation methods are indifferent to the surface geometric profile, making the effectiveness case-sensitive. To address these deficiencies for achieving higher five-axis machining efficiency, various approaches were proposed in recent years. Castagnetti et al. [33] established a restricted tool orientation domain to ensure the surface quality, and transformed such domain into the machine coordinate for tool orientation smoothing, which was among the first attempts to incorporate machine kinematics into the tool path generation stage. Wang and Tang [34] utilized the isoconic curves to partition the surface as well as to form the CC curves for a flat-end cutter, in this way to avoid abrupt change of tool orientations. This divide-and-conquer idea was illuminating, but the resultant tool path was not practically usable due to the irregular step distance. A similar idea was adopted by Liu et al. [35], who developed a surface embedded tensor field to facilitate the surface partitioning. The resultant path following the streamline of the field were expected to reach the maximum cutting width. The tool orientations were however not properly assigned to accommodate the machine. Hu and Tang [36] improved the machining dynamics by adaptively adjusting the tool orientation within a geometric constraint domain. They further [37] came up with a machine-dependent potential field to generate time-efficient tool path. Xu et al. [38] established an energy vector field incorporating the limited machine kinematics, based on which the isoscallop height path is generated following the flow line of the field.

2. Digital image representation of freeform surfaces The fundamental of the proposed region based five-axis tool path scheme stems from the digital image representation of freeform surface, which was originally presented in our earlier work [40]. Let us briefly summarize the image representation here to make this paper self-contained. A surface Ω is a 2D manifold embedded in 3D Euclidean space. In surface machining, every surface patch (either a 2D pocket or a sculptured surface) can be viewed as a 2D manifold. Technically, a general 2D manifold is not necessarily projectable to a reference plane, thinking of a sphere as one example. However, in order to successfully convert a surface into a digital image, the surface needs to be projectable to the image plane without ambiguity, as shown in Fig. 3. This establishes a one-one mapping between the surface and the image domain. Given a reference image plane whose normal nI is pointing upwards, Ω is projectable to this plane if and only if the following condition is satisfied:

nI ·np > 0, ∀ p ∈ Ω

(1)

The surface satisfying Eq. (1) is called projectable surface, which is the primary assumption in this paper. Fortunately, a large percentage of existing parts such as die/mold, are composed of projectable surfaces. On the other hand, a digital image I is essentially a matrix of pixels, with each pixel Ii, j being a scalar or vector indicating the grayscale level 231

Robotics and Computer Integrated Manufacturing 57 (2019) 230–240

K. Xu, Y. Li

plane of the machine coordinate system, while the surface posture w.r.t the image plane is technically defined by the workpiece setup, which is assumed a determined factor in this work. 2.2. Image resolution The digital image is technically a numerical representation. The image resolution quantifies how dense the image plane is digitized into a digital image. Referring back to Fig. 3, suppose the resolution is σ, then the size of the digital image I should be σ (h + 2Δ) × σ (w + 2Δ) . Higher resolution of the digital image leads to a more faithful and detailed recovery of the surface, but at the cost of storage as well as low computational efficiency. Thanks to the dedicated computing architectures that offering excessive power for image processing tasks, high resolution image, e.g. with over 10 megapixels, is now acceptable to describe the surface profile in high fidelity, while the computing efficiency still maintains in a very high level.

Fig. 3. Image coordinate system.

2.3. Projecting point Pi,

or the RGB intensity. As long as the manifold is projectable to the reference plane, it can be uniquely discretized into a digital image. Needless to say, there are countless ways to associate the pixel values of the image to the surface metric, depending on which geometric property is concerned. For instance, the brightness of each pixel can represent the height of the corresponding point on the surface, the RGB value of each pixel can represent the surface normal vector at the matching point, etc. In this study, the simplest and most intuitive image representation is adopted, that a grayscale image whose pixel value indicates the Z-depth height is associated with the freeform surface. Because this image is more or less similar to the Z-buffer technology in computer graphics, we deliberately call it the Z-map image. A few definitions along with the Z-map image are to be introduced as follows.

j

Now assume the image plane is constructed and digitized into pixels. For each pixel Ii, j we shoot a ray from its center point towards the surface (see Fig. 4(a)), the intersecting point on the surface is defined as the projecting point Pi, j. For those external pixels locating outside the projection area, the ray never intersects the surface. Therefore, their corresponding projecting points are the center points of themselves. Classic ray casting algorithm [41] can be utilized to calculate the projecting point. In this way, the pixels and the projecting points effectively establish the correlation between the digital image and the surface. 2.4. Z-map image (Ω → IZ)

2.1. Image coordinate system (ICS)

As the name implies, the Z-map image is the most intuitive image representation which stores the Z-depth value Di, j between each pixel IiZ, j on the image plane and its projecting point on the surface, as depicted in Fig. 4(a). By definition, the Di, j for those external pixels are zero, resulting a pure black display. Fig. 4(b) demonstrates a Z-map image of a human face, the brighter pixels indicate larger vertical distance to the original surface, and vice versa. Since the Z-map image encapsulates the depth information of the surface profile, it is capable of recovering the surface profile, simulating the cutting results to facilitate gouging/scallop check. Once applied with differential kernels, this image is also able to extract information such as the surface gradient, etc. as to be elaborated in the next section.

The origin of the ICS is fixed on the left bottom corner of the image plane. As shown in Fig. 3, the image plane should be large enough to embrace the projection of the surface. In Fig. 3, ZI is exactly the plane normal while − ZI indicates the projecting direction. It should be stressed that the image plane is not infinitely large. Suppose the height and width of the projection is h × w w.r.t the ICS, then the size of the image plane is (h + 2Δ) × (w + 2Δ) , where Δ is a small positive value. Conceivably, different posture of the input surface with respect to the ICS would lead to different outcome of the projected image. In the later context, we will realize that the image plane is exactly the working

Fig. 4. (a) Definition and (b) one example of the Z-map image. 232

Robotics and Computer Integrated Manufacturing 57 (2019) 230–240

K. Xu, Y. Li

Fig. 5. (a) Original Z-map image; (b) gradient distribution; (c) mean curvature distribution.

Let us put the image representation aside for a while and now focus on the machine tool. A general representation of tool orientation defined in WCS is a unit 3-tuple vector in 3 , i.e. T = (Tx , Ty, Tz ) and ∥T∥ = 1. Once inversely transformed back to the machine coordinates, the tool orientation is interpreted as two rotational angles of the rotary axes. Specifically for the B-C table tilting configuration shown in Fig. 6, its two rotational angles β and γ assigned to the rotary table can be computed by solving the following equation,

machine inclination angle, while γ is assigned to C axis and named machine tilt angle. Apparently, the B axis exhibits the worst kinematic performance due to its largest moment of inertia. Keeping the associated inclination angle to a constant value seems to be an effective mean to enhance the machining efficiency, but not practically feasible owing to the complexity of the input freeform surfaces. That said, the tool orientation needs to be adaptively adjusted according to the variation of surface normal to maintain a proper engagement and reduce the plunge motion, as shown in Fig. 7(b), which is detrimental to the tool life. Although a constant inclination angle over the entire surface is desired to achieve better machine kinematic performance, it can hardly satisfy this requirement since the surface is arbitrarily shaped. A natural and plausible solution is to partition the surface into multiple patches, each of which contains a restricted surface normal variation inside a prescribed range, in this way to assign a constant machine inclination angle inside each patch. To evaluate the surface normal variation, a metric is defined to identify the angle θ between the surface normal n and a fixed reference vector, which is selected to be Zw of the WCS, as shown in Fig. 8. This angular metric is called surface inclination angle. Apparently, this metric value equals to zero when the surface normal aligns with Zw. Based on the fact that the surface normal n is always perpendicular to the surface gradient g, which lies in the tangent plane of the same point, the surface inclination angle can be paraphrased as the angle between g and the horizontal plane (see Fig. 8 for better understanding). As the surface is now represented as a grayscale Z-map image I, the discretized gradient distribution can be calculated via a standard convolution process, i.e.:

(Tx , Ty, Tz , 0)T = Rot (Z , −γ )·Rot (Y , −β )·(0, 0, 1, 0)T

IG =

This Z-map image encapsulates the surface geometric information into a general form, whose first derivative (gradient) and second derivative (curvature) distribution can be numerically computed via standard image convolution process. Typically, the Sobel kernel and the Laplacian kernel is responsible for recovering the magnitude of gradient and mean curvature, respectively. Fig. 5 demonstrates the calculated results of the normalized differential distribution. The differential information play a vital role to facilitate the tool path generation task. The image representation of the surface geometry not only provides a perceptible visualization of such information, but simplifies the computation as well. Other than that, when a surface geometry is regarded as a grayscale image, all the raised geometric problems can now get resolved from a brand new perspective, i.e. via certain image processing methods, which are abundant and available for decades. These are the primary reasons why we adopted a digital image to represent a freeform surface. By fully exploiting the capability, we will explain in the following sections how a spatial five-axis tool path is derived purely from this scalar matrix. 3. Iso-machine-inclination partitioning of surface region

(2)

where Rot(X, φ) is the standard 4 × 4 transformation matrix to rotate a point about X for a certain angle φ. Note that there are multiple solutions to this equation, we choose the one whose β ∈ [0, π] and γ ∈ [−π , π ] to be the practical solution with respect to the working range of a standard rotary table. Therefore, any tool orientation can now be directly and uniquely defined by the two rotational angles accordingly. In particular, β is associated with B axis and thus named

(I *Sx )2 + (I *S y )2

(3)

⎡− 1 0 1 ⎤ ⎡ − 1 − 2 − 1⎤ where Sx = ⎢− 2 0 2 ⎥ and S y = ⎢ 0 0 0 ⎥ are the Sobel kernel 2 1 ⎦ ⎣ 1 ⎣ 1 0 1⎦ to calculate the approximated derivatives of the original image. The combined magnitude of two directional derivatives yields the gradient distribution GI, which is also a grayscale image whose pixel represents the gradient value at the corresponding surface point. Referring back to Fig. 8, the gradient value of point p is essentially the slope of g, i.e. tan θ. Therefore, another grayscale image which directly represent the surface inclination angle can be simply derived from IG, I θ = tan−1 I G

(4)

We call this image the surface inclination image, as shown in Fig. 9(c), where the darker area indicates the existence of smaller surface inclination angles w.r.t the reference Z-axis, and the brighter area reveals larger inclination angles. Now with the presence of this informative image, instead of directly partitioning the original surface, we partition this image into multiple segments according to the distribution of pixel brightness. Ideally, it is expected that within each partitioned region, the variation of surface inclination angle can be manually controlled such that a fixed machine inclination angle is assigned for this specific region. Most feature-detection based image segmentation algorithms will

Fig. 6. Inverse kinematic transformation of a unit vector. 233

Robotics and Computer Integrated Manufacturing 57 (2019) 230–240

K. Xu, Y. Li

Fig. 7. (a) Variable inclination angle; (b) fixed inclination angle along a CC curve.

transformed into a single chain, partitioned into two segments, and projected back to the original position of the image to finalize the image partitioning. Note that the width of each window is chosen based on the spanning range of pixel values it covers, rather than the size of the pixels, so as to maintain a constant variation of θ within each partitioned region. Fig. 11(b) demonstrates the partitioning result of the example in Fig. 9. The image is partitioned into three segments, each of which is assigned with a specific grayscale value expressing the average surface inclination angle avg vj . It is worth noting that each group of segment vj ∈ Si

may contain multiple isolated regions, as can be observed from the outmost group in Fig. 11(b). These islands will be regarded as individual machining regions but assigned with the same machine inclination angle, since they come from the same level. Now the surface inclination image Iθ is partitioned into {I1θ , I2θ, …, Ikθ} , with each segment upholding a restricted variation of surface inclination angle. The next step is to assign proper tool path to each set region. Since the surface inclination angle θ within each region Iiθ is highly constrained, the machine inclination angle βi is readily defined as a fixed value βi = avg θ , regardless of the machining path. Next section

Fig. 8. Definition of the surface normal variation.

not succeed in this particular task since the surface inclination image is highly blurred without distinctive features/boundaries. Therefore, the well-known K-means clustering algorithm is implemented to facilitate the partitioning task. In particular, the number of sets k to be partitioned is calculated via

k=

max(I θ ) − min(I θ ) ɛ

θ ∈ Iiθ

(5)

will elaborate the generation of tool path for each segmented image region, and how the tool orientation is finalized.

where ɛ is the prescribed upper bound of surface inclination angle variation within each partitioned region, i.e. max(Iiθ ) − min(Iiθ ) ≤ ɛ . Note that the irrelevant pixels locating outside the surface domain, e.g. the ambient pure black pixels in Fig. 9(c), need to be distinguished and filtered out when calculating the minimum of Iθ, since these pixel values are constantly zero and may be falsely marked as the minimum. The K-means clustering strives to partition a set of vectors{v1, v2, …, vn} into k sets {S1, S2, …, Sk } in order to minimize the sum of deviations of each set, i.e.: k

min∑



i = 1 vj ∈ Si

vj − avg vj vj ∈ Si

4. Image based five-axis tool path generation A five-axis tool path is composed of a CC curve and the tool orientations at each CC point. Conventional tool path schemes generate the CC curves via sophisticated computational algorithms, which are usually sensitive to the surface representation format. In this work, we fully exploit the advantage of image representation and come up with a universal strategy for the five-axis tool path generation. We start with the CC curve generation for each partitioned region. From the image perspective, each region can be sufficiently described as a binary image (see Fig. 12), whose white pixels represents the interior, and black pixels represents the exterior of the partitioned region. Now for each binary image, our task is clearly identified, that the white area of the binary image needs to be filled with embedded planar curves which comply with certain machining requirements. These curves are later to be lifted via the depth information provided by the Z-map

2

(6)

In our case, since the set of vectors to be partitioned is purely the 1D grayscale values of the image pixels, we sequentially line up all the pixels in Iθ based on their values into a long chain and equally partition this chain using k windows. An example of 16 pixels is illustrated in Fig. 10. In this example, the tiny image consisting of 16 pixels is

Fig. 9. (a) Surface profile in 3 ; (b) its corresponding Z-map image and (c) surface inclination image. 234

Robotics and Computer Integrated Manufacturing 57 (2019) 230–240

K. Xu, Y. Li

Fig. 10. Illustration of the single chain line-up and partitioning.

Fig. 13. (a) An input binary image of the partitioned region; (b) its extracted boundary edge; (c) the distance transformation image of the boundary edge. Fig. 11. (a) The surface inclination image; (b) its partitioning result.

image and become real CC curves once transformed back to the WCS. Without the loss of generality, we elaborate the strategy of curve generation using the second extracted binary image shown in Fig. 12. Since the input image I = Iiθ indicating the region of interest (ROI) is purely binary, its boundary edge is easily extracted via a gradientbased low pass filter, e.g. a Roberts operator, as demonstrated by Fig. 13(b). In this figure, the boundary edge is deliberately thickened to make it distinguishable. Technically, a low pass filter guarantees the extracted edge to be one pixel in width. Note that this boundary edge image is also binary and denoted as Ib. Afterwards, we apply a distance transformation to Ib such that the resultant image Id indicates a unified Euclidean distance field to the nearest white pixel of Ib. In order to eliminate all the external pixels which locate outside the region, I is employed as an image mask on Id to successfully turn the external pixels of Id into black, as depicted in Fig. 13(c). The distance transformation image, denoted as a grayscale image, exhibits some wonderful properties to facilitate the curve generation task. First, the grayscale value of each pixel indicates the shortest distance towards the boundary of the ROI, thus yields a scalar field over this region. Secondly, the induced isovalue curves never intersect with each other, due to the nature of distance field. These isocurves can be directly regarded as the planar CC curves, as long as a proper step distance is assigned. Now the final issue is narrowed down to the determination of such step distance in order to accommodate the scallop height constraint. As illustrated in Fig. 14, suppose the maximal allowed scallop height of the machined surface is h and the radius of the ball-end tool is R, then the step distance of two adjacent CC curve is approximated as

ds ≈

8hR

Fig. 14. Definition of step distance.

each partitioned region is negligible compared to the tool radius. Therefore, the step distance projected to the image plane should be

ds′ = σds cos θ

(8)

where σ is the specified image resolution depending on the size of the converted image, θ is the local surface inclination angle. Although the variation of surface inclination angle is highly restricted in each partitioned surface region, it still varies. Conservatively, in each partitioned region, the worst case, i.e. the largest θ is chosen for the calculation of ds′, in order to comply with the scallop height constraint. As soon as the step distance ds′ is specified on the image plane, the planar CC curves {ϱi}(x, y) can be immediately extracted from the distance transformation image Id as the level-set contours:

{ϱi} (x , y) = Lids′ (Id )

(9)

where Lids′ (Id ) is the level-set function which indicates the real-valued solution of the function Id (x , y ) = ids′, where i is an integer starting from 0.5ds′ and ends at max(Id ) . Fig. 15(b) shows the resultant level-set

(7)

This approximation is based on the fact that the surface curvature of

ds′

Fig. 12. Binary image representation of each partitioned region. 235

Robotics and Computer Integrated Manufacturing 57 (2019) 230–240

K. Xu, Y. Li

Fig. 15. (a) The distance transformation image; (b) the planar level-set contours in ICS; (c) the final CC curves in WCS. (Note that the image in (a) is deliberately flipped to comply with the convention of a coordinate system, i.e. origin resides on the left bottom).

contours in the ICS. Note that these level-set contours are still planar curves in the image plane, which are then associated with Z coordinates according to the corresponding pixel values in the Z-map image, and transformed back to the WCS to become real CC curves, as demonstrated in Fig. 15(c). Upon the settlement of the CC curves, the tool orientations need to be determined per CC point. Conventionally, tool orientation is defined in the local moving frame as the tool lead and tilt angle. In our setting, as already alluded in Section 3, we define the tool orientation depending on the machine inclination angle β and machine tilt angle γ. For each individual partitioned region, since the machine inclination angle β is fixed as constant, the assignment of the machine tilt angle γ per CC point eventually determines the tool orientation. Specifically as depicted in Fig. 16, the initial tilt angle γ is selected in a way that the deviation angle φ between the surface normal and the resultant tool orientation is minimized, i.e.:

γi = arg min cos−1 (n i ·Ti ) γ ∈ [0,2π )

Fig. 17. One example to demonstrate the proposed tool path.

(10)

enhancement regarding the machine kinematic performance as well as the machining efficiency is expected by utilizing the proposed tool path. Moreover, the incorporation of the image representation is compatible to various surface formats, while the image processing based algorithms are extremely fast as compared to conventional tool path generation algorithms. Though we did not consider the global collision issue in the whole process, it is not likely to occur since the tool posture at each local region approximately aligns with the surface normal to avoid interference. However, this issue is worth a thorough investigation in the future exploration of this image based framework. To further validate these advantages of our approach, apart from this example, we will demonstrate some more surface examples with both simulation and physical machining results.

where Ti = (sin βi cos γ , sin βi sin γ , cos βi ) is the tool orientation in WCS. Afterwards, to assure a smooth execution of the machining process, especially on the rotary axes, we apply a low-pass average filter to the initial γ along the path, in order to alleviate abrupt acceleration and jerk during machining, i.e.: 2

γi′ =

∑k =−2 γi + k (11)

5

For each partitioned surface region, we individually generate the five-axis tool path according to the aforementioned procedures and based on the dedicated image processing scheme. Fig. 17 demonstrates the tool path in different colors, each color represents a specific machine inclination angle for one partitioned region. A significant

5. Implementation and examples The proposed method was implemented in MATLAB 2016b with an ordinary PC (i7-7700 and 8GB ram). Some typical surface examples (see Fig. 18) including the one demonstrated before are created to validate the feasibility as well as to verify the effectiveness of the proposed tool path against the others. All example surfaces are originally represented in triangular mesh format and converted into digital image. Roughly speaking, for a surface profile consisting of 5000 facets, it takes around 10 seconds for the image conversion and 5 s for the tool path generation, which is computationally very efficient due to the advanced image processing algorithms we employed. Among the four surface examples, the last one is a compound surface with a joint ridge of C0 continuity. Special treatment is usually required for geometry based tool path methods to detect this C0 ridge and prevent the tool path from traveling across. As opposed to that, our method automatically bypassed this critical ridge and partitioned the whole surface area into three groups, each of which was assigned with smooth CC curves and tool orientations of different colors, as shown in

Fig. 16. Determination of the machine tilt angle. 236

Robotics and Computer Integrated Manufacturing 57 (2019) 230–240

K. Xu, Y. Li

Fig. 18. Four surface examples: (a) convex freeform surface; (b) concave freeform surface; (c) saddle freeform surface; (d) compound surface with C0 continuity.

Fig. 19. Results of the first example surface: (a) the surface inclination image; (b) the generated tool path.

Fig. 20. The surface inclination images and the partitioning results of the three examples.

Fig. 21. The generated CC curves and tool orientations of the three examples.

Under a prescribed scallop height constraint (set to h = 0.25), the final tool path for these three surfaces were successfully generated. Fig. 21 reveals the proposed tool path generated by the image based algorithm, where the CC curves are marked in different colors to identify the association with the partitioned regions. The representative tool postures in Fig. 21 indicate the tool orientation trend along the CC curve, from which it is clearly observed that tool persists a fixed inclination angle within the CC curves of the same color, implying a constant machine inclination angle during real cutting process. The effectiveness needs to be further testified by competing with some benchmarks. In this study, we employed the widely adopted

Fig. 19. This special case demonstrates strong robustness of the proposed method. The following three cases will further verify the effectiveness of this method. For the rest three examples, the surface inclination images derived from the Z-map image of the three surfaces are demonstrated in Fig. 20, based on which the surface partition was conducted, such that each partitioned region exhibited a constrained surface inclination angle (0.4 rad in our current setting). Based on the image partitioning results, the CC curves and the tool orientations were generated for each individual surface region. A ballend cutter with radius being 2 mm was employed in this experiment. 237

Robotics and Computer Integrated Manufacturing 57 (2019) 230–240

K. Xu, Y. Li

Fig. 22. Generated tool path and the simulation graph of rotary axes movement for Example 1.

Fig. 23. Generated tool path and the simulation graph of rotary axes movement for Example 2.

Fig. 24. Generated tool path and the simulation graph of rotary axes movement for Example 3.

Fig. 24 respectively for these three examples, alongside the proposed tool path. Sporadic cutter locations are superimposed on the tool path to roughly identify the tool orientations. To visualize the performance, we also conducted the simulation for the movement of two rotary axes

isoplanar tool path as the benchmarks, where a constant lead angle was assigned along the CC curve. With the same scallop height adopted, the isoplanar tool paths along two principal directions (X and Y direction in our setting) were created and demonstrated in Fig. 22, Fig. 23 and 238

Robotics and Computer Integrated Manufacturing 57 (2019) 230–240

K. Xu, Y. Li

machining process, such feed rate was hardly achieved due to the limited kinematic capacity of the machine. We individually machined the surface in Example 2 by the three tool paths, and meanwhile recorded the machining time as a direct assessment of the productivity. Results of the machined surface as well as the total machining time are depicted in Fig. 26 and Fig. 27. Clearly enough, even though the tool path by the proposed method is slightly elongated, it still outperforms the other two competitors by over 40% reduction of the total machining time, while preserving the same level of surface roughness as can be seen in Fig. 26. Moreover, the contour parallel fashion of our tool path turns out to be smoother for the three translational axes as well, which further contributes to a decreased machining time.

Table 1 Lengths of the tool trajectory in these examples. Length (mm)

Example 1

Example 2

Example 3

Benchmark 1 Benchmark 2 Proposed tool path

5220 4285 5119

2517 2490 2848

3099 3273 3738

6. Conclusion and discussion The machining efficiency of the five-axis machine is barely competitive to the three-axis machine due to the highly limited kinematic capacity of the rotary axes. On a different note, in most existing fiveaxis tool path generation methods, tool orientations are determined independently to the CC curves as well as to the machine configuration. As a consequence, a visually smoothed tool path may turn out to be inferior in terms of the efficiency in real execution. The fact that geometry based algorithms are sensitive to the surface representation format makes them hardly satisfactory to all cases. In this paper, we proposed an efficient five-axis machining path generation method via a universal and concisely defined representation: the digital image, which is easily convertible from any other surface formats as long as the surface is projectable. Based on this framework, we

Fig. 25. The JDGR200 five-axis machine center.

and plotted in these figures. Erratic fluctuations on the movement of both axes were observed in the benchmarks, which would noticeably render a weakened kinematic performance. In contrast to that, when the tool moves along the proposed tool path, the B-axis of the machine maintains a constant inclination angle for the majority of time, and subtly adjusts to a new constant when jumping into a new partitioned region. Table 1 lists the total path lengths of each examples. It can be observed in the second and third example that the length of the optimized path is relatively longer than that of its contenders, which is mainly attributed to the conservative setting of the step distance as per Eq. (8). However, longer path does not necessarily lead to a longer processing time. To further prove this idea and validate the outstanding performance of the proposed tool path, we conducted a physical cutting test specifically for the second surface example. This cutting test was staged on a JDGR200 five-axis machine center equipped with a B-C rotary table (see Fig. 25). The nominal machining feed rate was equally set to 1000 mm/min for all three tool paths. However, during the real

• established the grayscale Z-map image to identify the surface profile; • computed the surface inclination angle distribution via Sobel kernel •

and partitioned the image accordingly to achieve smoother tool motions; produced the CC curves directly from the distance transformation of each partitioned image segment, and assigned proper machine tilt angle to each CC point to finalize the five-axis path.

Preliminary experiments conducted on four typical types of surface verify both the feasibility and effectiveness against some existing benchmarking tool paths. By incorporating image processing into a five-axis tool path generation task, the results are very promising not only in its extraordinary computing efficiency, but more significantly in its induced tool path, which takes less than 40% of the total machining time as compared to the benchmarks in our physical cutting tests.

Fig. 26. Physical cutting results by (a) benchmarking path 1; (b) benchmarking path 2; (c) the proposed tool path. 239

Robotics and Computer Integrated Manufacturing 57 (2019) 230–240

K. Xu, Y. Li

Fig. 27. Comparison of the total machining time and tool path length for Example 2.

Regarding the future work, we will further utilize this image based framework to investigate the effect of different surface postures to the final tool path, and solve more related issues that are unsatisfactory using existing methods.

[16] Y. Koren, R. Lin, Efficient tool-path planning for machining free-form surfaces, ASME Trans. J. Eng. Ind. (1996) 20–28. [17] H.Y. Feng, N. Su, Integrated tool path and feed rate optimization for the finishing machining of 3D plane surfaces, Int. J. Mach. Tool. Manuf. 40 (2000) 1557–1572. [18] C. Tournier, E. Duc, A surface based approach for constant scallop HeightTool-path generation, Int. J. Adv. Manuf. Technol. 19 (2002) 318–324. [19] C. Lo, Efficient cutter-path planning for five-axis surface machining with a flat-end cutter, Comput.-Aided Des. 31 (1999) 557–566. [20] K. Suresh, C. Yang, Constant scallop-height machining of free-form surfaces, J. Eng. Ind. (Transactions of the ASME)(USA) 116 (1994) 253–259. [21] C.-J. Chiou, Y.-S. Lee, A machining potential field approach to tool path generation for multi-axis sculptured surface machining, Comput.-Aided Des. 34 (2002) 357–371. [22] K. Zhang, K. Tang, Optimal five-axis tool path generation algorithm based on double scalar fields for freeform surfaces, Int. J. Adv. Manuf. Technol. 83 (2016) 1503–1514. [23] K. Morishige, K. Kase, Y. Takeuchi, Collision-free tool path generation using 2-dimensional C-space for 5-axis control machining, Int. J. Adv. Manuf. Technol. 13 (1997) 393–400. [24] M. Balasubramaniam, S.E. Sarma, K. Marciniak, Collision-free finishing toolpaths from visibility data, Comput.-Aided Des. 35 (2003) 359–374. [25] Y.-W. Hsueh, M.-H. Hsueh, H.-C. Lien, Automatic selection of cutter orientation for preventing the collision problem on a five-axis machining, Int. J. Adv. Manuf. Technol. 32 (2007) 66–77. [26] B. Lauwers, P. Dejonghe, J.-P. Kruth, Optimal and collision free tool posture in fiveaxis machining through the tight integration of tool path generation and machine simulation, Comput.-Aided Des. 35 (2003) 421–432. [27] Y.-S. Lee, Admissible tool orientation control of gouging avoidance for 5-axis complex surface machining, Comput.-Aided Des. 29 (1997) 507–521. [28] Y.-J. Kim, G. Elber, M. Bartoň, H. Pottmann, Precise gouging-free tool orientations for 5-axis CNC machining, Comput.-Aided Des. 58 (2015) 220–229. [29] L. Shan, T. Ming, L. Ming, Optimal tool orientation planning for five-axis machining of open blisk, in Intelligent Computation Technology and Automation (ICICTA), 2011 International Conference on, 2011, pp. 1138–1141. [30] S.S. Makhanov, M. Munlin, Optimal sequencing of rotation angles for five-axis machining, Int. J. Adv. Manuf. Technol. 35 (2007) 41–54. [31] M.-C. Ho, Y.-R. Hwang, C.-H. Hu, Five-axis tool orientation smoothing using quaternion interpolation algorithm, Int. J. Mach. Tool. Manuf. 43 (2003) 1259–1267. [32] K. Xu, K. Tang, Optimal workpiece setup for time-efficient and energy-saving fiveaxis machining of freeform surfaces, J. Manuf. Sci. Eng. 139 (2017) 051003. [33] C. Castagnetti, E. Duc, P. Ray, The domain of admissible orientation concept: a new method for five-axis tool path optimisation, Comput.-Aided Des. 40 (2008) 938–950. [34] N. Wang, K. Tang, Five-axis tool path generation for a flat-end tool based on isoconic partitioning, Comput.-Aided Des. 40 (2008) 1067–1079. [35] X. Liu, Y. Li, S. Ma, C.-h. Lee, A tool path generation method for freeform surface machining by introducing the tensor property of machining strip width, Comput.Aided Des. 66 (2015) 1–13. [36] P. Hu, K. Tang, Improving the dynamics of five-axis machining through optimization of workpiece setup and tool orientations, Comput.-Aided Des. 43 (2011) 1693–1706. [37] P. Hu, K. Tang, Five-axis tool path generation based on machine-dependent potential field, Int. J. Comput. Integr. Manuf. 29 (2016) 636–651. [38] K. Xu, M. Luo, K. Tang, Machine based energy-saving tool path generation for fiveaxis end milling of freeform surfaces, J. Cleaner Prod. 139 (2016) 1207–1223. [39] S. Yuwen, G. Dongming, W. Haixia, Iso-parametric tool path generation from triangular meshes for free-form surface machining, Int. J. Adv. Manuf. Technol. 28 (2006) 721–726. [40] K. Xu, Y. Li, Digital image approach to tool path generation for surface machining, Int. J. Adv. Manuf. Technol. (2018) 1–12. [41] M. Hadwiger, C. Sigg, H. Scharsach, K. Bühler, M. Gross, Real-time ray-casting and advanced shading of discrete isosurfaces, in Comput. Graph. Forum (2005) 303–312.

Acknowledgements This work was supported by the National Natural Science Foundation of China (Grant no. 51805260), and the National Natural Science Foundation of China and China Aerospace Science and Technology Corporation (Grant No. U1537209). The authors are also grateful to Prof. Tang Kai and Dr. Chen Lufeng from HKUST for their valuable help on the physical cutting experiments. The five-axis machine located at HKUST is sponsored by Beijing Jing Diao Company. Reference [1] D. Ding, Z. Pan, D. Cuiuri, H. Li, A practical path planning methodology for wire and arc additive manufacturing of thin-walled structures, Robot. Comput.-Integr. Manuf. 34 (2015) 8–19. [2] L.T. Tunc, Smart tool path generation for 5-axis ball-end milling of sculptured surfaces using process models, Robot. Comput.-Integr. Manuf. 56 (2019) 212–221. [3] Y. Zhang, Z. Zhou, K. Tang, Sweep scan path planning for five-axis inspection of free-form surfaces, Robot. Comput.-Integr. Manuf. 49 (2018) 335–348. [4] H. Liu, X. Lai, W. Wu, Time-optimal and jerk-continuous trajectory planning for robot manipulators with kinematic constraints, Robot. Comput.-Integr. Manuf. 29 (2013) 309–317. [5] Á. Álvarez, A. Calleja, M. Arizmendi, H. González, L. Lopez de Lacalle, Spiral bevel gears face roughness prediction produced by CNC end milling centers, Materials 11 (2018) 1301. [6] Á. Álvarez, A. Calleja, N. Ortega, L.N.L. de Lacalle, Five-axis milling of large spiral bevel gears: toolpath definition, finishing, and shape errors, Metals 8 (2018) 353. [7] Y. Lu, Q. Bi, L. Zhu, Five-axis flank milling of impellers: Optimal geometry of a conical tool considering stiffness and geometric constraints, Proceedings of the Institution of Mechanical Engineers, Part B: Journal of Engineering Manufacture, 230 2016, pp. 38–52. [8] A. Calleja, M. Alonso, A. Fernández, I. Tabernero, I. Ayesta, A. Lamikiz, et al., Flank milling model for tool path programming of turbine blisks and compressors, Int. J. Prod. Res. 53 (2015) 3354–3369. [9] A. Calleja, P. Bo, H. González, M. Bartoň, L.N. López de Lacalle, Highly accurate 5axis flank CNC machining with conical tools, Int. J. Adv. Manuf. Technol. (2018) 1–11. [10] H.-T. Hsieh, C.-H. Chu, Improving optimization of tool path planning in 5-axis flank milling using advanced PSO algorithms, Robot. Comput.-Integr. Manuf. 29 (2013) 3–11. [11] Y. Wang, X. Tang, Five-axis NC machining of sculptured surfaces, Int. J. Adv. Manuf. Technol. 15 (1999) 7–14. [12] L. Chen, Y. Li, K. Tang, Variable-depth multi-pass tool path generation on mesh surfaces, Int. J. Adv. Manuf. Technol. 95 (2017) 1–15. [13] C. Au, A path interval generation algorithm in sculptured object machining, Int. J. Adv. Manuf. Technol. 17 (2001) 558–561. [14] S. Ding, M. Mannan, A. Poo, D. Yang, Z. Han, Adaptive iso-planar tool path generation for machining of free-form surfaces, Comput.-Aided Des. 35 (2003) 141–153. [15] P. Hu, L. Chen, K. Tang, Efficiency-optimal iso-planar tool path generation for fiveaxis finishing machining of freeform surfaces, Comput.-Aided Des. (2016).

240