Keywords

1 Introduction

The surfaces that are not regular in their shape and are made by joining different patches together by defining some continuity at points of joining are called the free-form surfaces. Free-form surfaces are usually designed to meet or improve an aesthetic and/or functional requirement. Often, they are defined as surfaces containing one or more non-planar, non-quadratic surfaces generally represented by parametric and/or tessellated models free-form surface, or free-form surfacing, is used in CAD and other computer graphics software to describe the skin of a 3-D geometric element. Free-form surfaces do not have radial dimensions, unlike regular surfaces such as cylinders, cones and spheres. They are used to describe forms such as turbine blades, car bodies and boat hulls. Initially developed for the automotive and aerospace industries, free-form surfacing is now widely used in all engineering design disciplines from consumer goods products to ships.

These days CNC machines are mostly used for accurate machining of parts. The codes used on CNC machines are capable of machining only regular profiles. The free-form profiles cannot be machined using available preparatory codes on the CNC machines. Many researchers have worked on different algorithms to machine free-form surfaces on CNC machines. Some of the researchers have used parametric curves and surfaces for the development of their algorithms, given in the first part of the review.

Barnhill (1985) focused on the representation and design of surfaces in a computer graphics environment. The subject was approached from two points of view: The design of surfaces which included the interactive modification of geometric information and the representation of surfaces for which the geometric information was relatively fixed. Design takes place in 3-D space, whereas representation can be higher dimensional. Triangular patches were used to interpolate and approximate the arbitrarily located data and required the preprocessing steps of triangulation and derivative estimation. Chen and Shi (2008) presented a new method for tool path generation which was based on approximating free-form surfaces by triangular meshes. The vertices of triangular meshes were offset along surface normal. All offset vertices were then connected together to form offset triangular meshes sliced by a group of planes to obtain tool paths.

Ma and Peng (1995) presented a unified method for smoothing free-form surfaces with Bezier patches. A non-smooth surface consisting of bicubic patches was turned into a G1 surface. Using this method, solid objects bounded with bicubic Bezier patches were G1 smoothed with bicubic patches. Ge et al. (1997) presented a special class of rational Bezier curves that correspond to low-harmonic trajectory patterns. For given high-speed machinery, a significant source of the internally induced vibrational excitation was the presence of high-frequency harmonics in the trajectories that the system was forced to follow. Choi et al. (2007) presented the tool path generation method for multi-axis machining of free-form surfaces using Bezier curves and surfaces.

Konno and Chiyokura (1996) proposed a surface representation that enables the smooth interpolation of an irregular curve mesh with NURBS curves and surfaces. Designers required a means of designing complex free-form surfaces easily and intuitively. Nasri (1997) described an algorithm to generate recursive subdivision surfaces that interpolate B-spline curves. The control polygon of each curve is defined by a path of vertices of the polyhedral network describing the surface. Lartiguea et al. (2001) presented an accurate and efficient method to generate a tool path for a smooth free-form surface using planar cubic B-spline. A three-axis CNC machine tool with a ball-end mill cutter was used. The break points were generated by computing the offset surface driving plane intersection curve reflecting the curvature by a planar cubic B-spline curve. Maximum scallop height was calculated by computing the stationary points of the distance function between the scallop curve and the design surface. Narayanaswami and Pang (2003) investigated the applicability of multi-resolution analysis using B-spline wavelets to NC machining of contoured 2-D objects. A complex curve was decomposed using wavelet theory into lower-resolution curves. The low-resolution (coarse) curves were similar to rough-cuts and high-resolution (fine) curves to finish cuts in NC machining.

Huang and Oliver (1994) presented an algorithm for three-axis NC tool path generation on sculptured surfaces. Non-constant parameter tool contact curves were defined on the part by intersecting parallel planes with the part model surface. Wang (1996) presented a method to calculate intersection curves of offsets of two parametric surfaces. The method was based on the concept of normal projection. Lin and Koren (1996) presented an analytical method for planning an efficient tool path in machining free-form surfaces on 3-axis milling machines. The approach used a non-constant offset of the previous tool path which guaranteed that the cutter moving in an un-machined area of the part surface and without redundant machining. Ding et al. (2003) presented an algorithm that overcomes the disadvantage of iso-planar method while keeping its advantage of robustness and simplicity. The isophote concept was used for the partition of different regions of the surface. As compared with the conventional iso-planar tool path generation algorithm, the presented algorithm improved machining efficiency by reducing total tool path length needed to machine a free-form surface. Wei and Lin (2005) established a systematic general analytical method for CNC machining of the free-form surfaces and developed the postprocessor to obtain the NC code. Choi and Banerjee (2006) focused on generating tool path for free-form surfaces based on accuracy of desired manufactured part. The mathematical curves and surfaces used to represent a specific manufactured part were used to generate near optimal tool paths and cutter location files.

The second part of the review is based on algorithms given by researchers using some miscellaneous techniques.

Loney and Ozsoy (1987) discussed the development of an interactive computer-aided design and manufacturing system used in defining and machining of free-form surfaces. The system used a menu-driven front end with graphical feedback to guide a user through curve and free-form surface definition resulting in a mathematical model which was used to generate NC machine cutter location source file. Choi et al. (1988) presented a method for modelling and machining compound surfaces commonly found in die cavities and punches. A constructive solid geometry scheme was employed to model a compound surface that consists of planar surface elements, general quadratic surface elements and composite parametric surfaces. Suh and Lee (1990) presented a procedure to machine a pocket with a convex or concave free surface bounded by lines, circular arcs and free curves. The cutter location data were computed directly with better computational efficiency than normal, without using an iterative method. Leon and Trompette (1995) described a method to provide deformation methods involving simultaneous movements of control vertices. Deformation of free-form surfaces encounters difficulties because more than one control point must be moved to achieve satisfying results. The method used an analogy between the control polyhedron of a surface and the mechanical equilibrium of a bar network. Surface deformation was then carried out through changes of mechanical parameters. Yang and Han (1999) presented a systematic tool path generation methodology which incorporates interference detection and optimal tool selection for machining free-form surfaces on 3-axis CNC machines using ball-end cutters. Feng and Li (2002) presented a new approach for determination of efficient tool paths in the machining of sculptured surfaces using three-axis ball-end milling. The objective was to keep the scallop height constant across the machined surface so that the redundant tool paths were reduced. Yin (2004) proposed progressive fitting and multi-resolution tool path generating techniques, by which multi-level models fitting for different subsets of sampled points were obtained, and then multi-resolution rough-cut and finish-cut tool paths were generated based on the models.

Pham (1992), Dragomatz and Mann (1997), Lo (1998), Maekawa (1999) and Lasemi et al. (2010) provided a state-of-the-art review on research development in CNC machining of free-form surfaces.

As per the literature review, a large number of algorithms represent the free-form surface in the form of Bezier and B-spline surface. One such algorithm given by Choi et al. (2007) uses the Bezier surface for representing the free-form surface. This algorithm generates tool path based on the accuracy of a desired manufactured part. The purpose of the study is to implement the algorithm given by Choi et al. (2007) using the B-spline surface representation.

2 Mathematical Formulation

2.1 B-Spline Curve and Surface

The main advantage of B-Spline over Bezier is that it provides local control, which means that if we change the location of one point it cannot change the shape of whole curve, it will only effect the area of the curve corresponding to that point. The mathematical representation of the B-Spline curve (Ibrahim 2010) is given by (1).

$$ p\left( u \right) = \sum\limits_{i = 0}^{n} { p_{i} N_{i}^{k} \left( u \right), \, 0 \le u \le u_{ \hbox{max} } } $$
(1)

where, \( n + 1 \) are the number of control points, N k i is the B-Spline function, \( k \) is the parameter which defines the degree of the curve.

The B-spline function is given by,

$$ N_{i}^{1} = \left\{ {\begin{array}{*{20}l} {1, \quad t_{i} \le u \le t_{i + 1} } \\ {0, \quad {\text{otherwise}}} \\ \end{array} } \right. $$
(2)
$$ N_{i}^{k} = \left( {u - t_{i} } \right)\frac{{N_{i}^{k - 1} }}{{t_{i + k - 1} - t_{i} }} + (t_{i + k} - u)\frac{{N_{i + 1}^{k - 1} }}{{t_{i + k} - t_{i + 1} }} $$
(3)

In (2) and (3), t i are the knot values given by

$$ t_{i} = \left\{ {\begin{array}{*{20}l} {0,\quad i < k} \\{i - k + 1,\quad k \le i \le n} \\ {n - k + 2,\quad i > n} \\\end{array}}\right. $$

with \( 0 \le i \le n + k,{\text{ and }}u_{ \hbox{max} } = n - k + 2. \)

The mathematical representation of B-Spline surface is the extension of (1), given by (4)

$$ p\left( {u, v} \right) = \sum_{i = 0}^{n} \sum_{j = 0}^{m} p_{i,j} N_{i}^{k} \left( u \right)N_{j}^{l} \left( v \right),\quad 0 \le u \le u_{ \hbox{max} } \quad {\text{and}}\quad 0 \le v \le v_{ \hbox{max} } $$
(4)

where, \( n + 1 {\text{ and }}m + 1 \) are the number of control points in u and v directions, respectively, \( k \) and l are the parameters to define the degree of the surface in the u and v directions, respectively, \( N_{i}^{k}\, {\text{and }}N_{j}^{l} \) are the B-Spline functions, \( u_{ \hbox{max} } = n - k + 2 {\text{ and }}v_{ \hbox{max} } = m - l + 2. \)

2.2 First and Second Fundamental Form of a Surface

Given an embedded curve \( p\left( {u\left( t \right), v\left( t \right)} \right), \) the quadratic form

$$ {\text{I }} = p^{t} \cdot p^{t} = E\frac{{{\text{d}}u}}{{{\text{d}}t}}\frac{{{\text{d}}u}}{{{\text{d}}t}} + { 2}F\frac{{{\text{d}}u}}{{{\text{d}}t}}\frac{{{\text{d}}v}}{{{\text{d}}t}} + G\frac{{{\text{d}}v}}{{{\text{d}}t}}\frac{{{\text{d}}v}}{{{\text{d}}t}} $$

is known as the first fundamental form with t as the independent variable along the path and,

$$ \begin{aligned} E & = p^{u} \cdot p^{u} \hfill \\ F &= p^{u} \cdot p^{v} \hfill \\ G & = p^{v} \cdot p^{v} . \hfill \\ \end{aligned} $$

These are the coefficients of the first fundamental form, and \( p^{u}\; {\text{and}}\;p^{v} \) are the partial derivatives along the \( u\;{\text{and}}\; v \) direction at point p on the surface.

The quadratic,

$$ {\text{II}} = L\frac{{{\text{d}}u}}{{{\text{d}}t}}\frac{{{\text{d}}u}}{{{\text{d}}t}} + { 2}M\frac{{{\text{d}}u}}{{{\text{d}}t}}\frac{{{\text{d}}v}}{{{\text{d}}t}} + N\frac{{{\text{d}}v}}{{{\text{d}}t}}\frac{{{\text{d}}v}}{{{\text{d}}t}} $$

is referred as second fundamental form where,

$$ L = p^{\text{uu}} \cdot n;\quad M = p^{\text{uv}} \cdot n;\quad N = p^{\text{vv}} \cdot n $$

are the coefficients of the second fundamental form.

3 Proposed Approach

The accuracy of the machined surface depends greatly on the tool path. In order to have good accuracy, the tool path generation should be accurate and proper. In tool path generation, the main job is to calculate the cutter location points by specifying forward step and side step, the basic movements of the tool to reach the next cutter location point.

3.1 Cutter Contact and Cutter Location Point

The cutter location (CL) point is a reference point on the cutter, with which the machine tool moves linearly along the tool path. The cutter contact (CC) point is the point on the cutter that touches the work piece surface. Ideally, it is desired that the CC point lies on the work piece surface and is an addressable point which is a point along the axis at which the tool can be placed so as to minimize the manufacturing error. The CC and CL points are shown in Fig. 1. The surface normal n at an arbitrary point p(uv) on the surface is expressed as:

$$ n \, = \frac{{p^{u} \times p^{v} }}{{\left| {p^{u} \times p^{v} } \right|}} $$

where \( p^{u}\, {\text{and }}p^{v} \) are the partial derivatives along \( u\;{\text{and}}\;v \) direction at a point p on the surface.

Fig. 1
figure 1

CC and CL point (Choi et al. 2007)

3.2 Calculation of Forward Step

Each tool path is approximated by a series of line segments. The accuracy of tool path is controlled by deviation. Each segment amounts is a forward step and the maximum deviation is called tolerance. To calculate forward step, first and second derivatives are used. Therefore, this function is independent of the surface type and is applicable to all continuous parametric surfaces that are twice differentiable. The mathematical formula for forward step is derived from iso-parametric curve on the surface given in Choi et al. (2007).

The forward-step size, s, is calculated using Eq. (5)

$$ s^{2} = \frac{{k_{2} }}{e \times 8} $$
(5)

where, e is the given tolerance and k 2 be the maximum second derivative of current curve.

3.3 Calculation of Side Step

The side step, g, is a function of the scallop height h, tool-radius r, and the local radius of the curvature, R. The designed part’s surface can be classified into convex, concave and flat surface. The curvatures of convex, concave and flat surfaces are positive, negative and zero, respectively. Therefore, these three different cases are considered to calculate side-step size.

For a flat surface, shown in Fig. 2, the scallop height h is given by (6)

$$ h = r - \sqrt {r^{2} - \left( \frac{g}{2} \right)^{2} } $$
(6)

where r the radius of the tool and g is the side step. The value of the side step is given by (7).

$$ g = { 2}\sqrt {r^{2} - (r - h)^{2} } . $$
(7)
Fig. 2
figure 2

Flat surface

Secondly, a convex curvature shown in Fig. 3 is considered. To find the side step for a convex surface, the difference between a designed curve and a linear tool path, δ, is found.

Fig. 3
figure 3

Convex surface

From Fig. 3, \( \delta = {\text{ OB}} - {\text{OA}} . \)

To find OA, we first calculate step size, g, using (7). As the step size is very small, we can use p = g/2 as the initial value. From the Fig. 3.

$$ {\text{OA }} = \sqrt {r^{2} - p^{2} } ;\quad {\text{OB }} = \, R $$

So the scallop height h and side step g is given by (8) and (9), respectively,

$$ h = r - \sqrt {r^{2} - p^{2} } + \delta $$
(8)
$$ g = { 2}\sqrt {r^{2} - \left( {r + \delta - h} \right)^{2} } . $$
(9)

In the similar manner, we can calculate the side step for a concave surface, as shown in Fig. 4.

Fig. 4
figure 4

Concave surface

From Fig. 4,

$$ \delta = {\text{OB}} - {\text{OA,}} $$
$${\text{OA}} = \sqrt {r^{2} - p^{2}}, $$
$${\text{OB}} =\, R, $$

where R is the local radius of the curvature of the surface.

The scallop height, h, and side step, g, for a concave curvature are given by (10) and (11), respectively,

$$ h = r - \sqrt {r^{2} - p^{2} } - \delta $$
(10)
$$ g = { 2}\sqrt {r^{2} - \left( {r - \delta - h} \right)^{2} } $$
(11)

Hence, the value of side step can be calculated for any type of the surface using the discussed equations.

4 Implementation and Results

To verify the algorithm, the cutter contact points are generated for a surface. The surface is then machined over a wax part using a 3-axis milling machine. After machining, the surface is compared with the desired one.

The proposed algorithm as discussed in the previous section for the generation of tool path is coded in MATLAB. The bicubic B-spline surface is defined by 4 × 4 control matrix, i.e.,

$$ \begin{array}{*{20}l} {\left( {0.0\,0.0\,1.5} \right)} & {\left( {0.0\,1.0\,1.2} \right)} & {\left( {0.0\,2.0\,1.2} \right)} & {\left( {0.0\,3.0\,1.5} \right)} \\ {\left( {0.7\,0.0\,1.2} \right)} & {\left( {0.7\,1.0\,0.9} \right)} & {\left( {0.7\,2.0\,0.9} \right)} & {\left( {0.7\,3.0\,1.2} \right)} \\ {\left( {1.4\,0.0\,1.5} \right)} & {\left( {1.4\,1.0\,1.2} \right)} & {\left( {1.4\,2.0\,1.2} \right)} & {\left( {1.4\,3.0\,1.5} \right)} \\ {\left( {2.0\,0.0\,1.2} \right)} & {\left( {2.0\,1.0\,0.9} \right)} & {\left( {2.0\,2.0\,0.9} \right)} & {\left( {2.0\,3.0\,1.2} \right)} \\ \end{array} $$

The B-spline surface generated by coding its algorithm in MATLAB is shown in Fig. 5.

Fig. 5
figure 5

Generated B-spline surface

4.1 Generation of Cutter Contact Points

The forward and side steps are calculated as per the equations discussed in previous section. The x, y and z coordinates of all the cutter contact points are stored to generate the CNC program. The generated cutter contact points on B-spline surface are shown in Fig. 6.

Fig. 6
figure 6

Cutter contact points on B-spline surface

4.2 Modelling of Desired Surface from Generated Points

The cutter contact points generated in MATLAB are used to model the desired surface in RHINOCEROS 4.0, a surface modelling software. Figure 7 shows the generated B-spline surfaces.

Fig. 7
figure 7

B-spline surface generated using RHINOCEROS

4.3 Machining

The CNC program is generated using calculated cutter contact points using word address manual part programming (Koren 2010). The program is simulated on a vertical milling centre shown in Fig. 8. The written code is transferred on to the milling centre by using a flash card.

Fig. 8
figure 8

Vertical milling centre

The wax piece is used to machine the generated surface on the milling machine. The machining is done using a ball-end milling tool of 4 mm diameter with speed of 200 rpm, feed of 800 mm/min and coolant in mild flow. The work piece and the tool setup are shown in Fig. 9.

Fig. 9
figure 9

Work piece and tool setup

After machining the wax piece using the CNC machine, the generated B-spline surface is shown in Fig. 10.

Fig. 10
figure 10

Generated B-spline surface

Thereafter, the coordinate measuring machine (CMM) with point probe is used to make a point cloud of the machined B-spline surface. This point cloud is used to model the surface in RHINOCEROS 4.0. The surfaces generated from the point cloud of machined B-spline surface are shown in Fig. 11.

Fig. 11
figure 11

Surface from point cloud for B-spline surface

4.4 Comparison of Desired and Machined Surface

To check the accuracy of the machined surface, the desired and the machined surfaces are overlapped to observe the regions of the surfaces which are merging within one another. Thin overlapping will clearly show the difference between machined surface and desired surface. The surfaces are shown in different colours to make a more effective view. In the Fig. 12, the green and blue colour shows the desired and the machined surface, respectively. It can be seen from the figure that the two surfaces overlap each other.

Fig. 12
figure 12

Overlapping of B-spline machined and desired surface

4.5 Comparison on Scallop Height Basis

The comparison between desired surface and machined surface is also done by measuring the scallop height of the machined surface. The scallop height of the machined surface should be within range of the assumed scallop height. The assumed minimum and maximum scallop heights are 0.254 and 1.27 mm, respectively. Table 1 shows the maximum scallop height of machined B-spline surface, number of cutter location points and average scallop height of the machined B-spline surface for assumed scallop height.

Table 1 Scallop height for B-spline surface

Thus, the Table 1 shows that the maximum scallop height and average scallop height of the machined surface lie within the limits of the assumed scallop height for B-spline surface. In case of B-spline surface, the number of cutter location points corresponding to 0.254 mm is 130. If the scallop height is increased to 1.27 mm, the number of cutter location points reduces to 40.

5 Conclusion

The algorithm using the B-spline surface is implemented successfully through the integration of mathematical modelling used for calculating the forward-step and side-step size into the core of the algorithm. As the algorithm is successfully implemented using B-spline surface, the algorithm is applicable to the continuous parametric surfaces that are twice differentiable. Therefore, it can be used for machining of sculptured and analytic surfaces.

Thereafter, the verification of machining errors is done by comparing the desired and the machined surface.

The present work is being further extended by developing a canned cycle that can be used directly by the part programmer on a CNC machine for free-form surfaces.