Journal of Materials Processing Technology 130–131 (2002) 608–617
Development of simulation system for machining process
using enhanced Z map model
Sang-Kyu Lee, Sung-Lim Ko*
Department of Mechanical Design and Production Engineering, Konkuk University,
1 Hwayang-dong, Kwangjin-gu, Seoul 143-701, South Korea
Abstract
To verify NC programs as well as to optimize the cutting conditions, the importance of machining process simulation system is increasing.
The paper discusses new approach for milling operation simulation using enhanced Z map algorithm. To extract the required geometric
information from NC code, suggested algorithm uses supersampling method to enhance the efficiency of a simulation. By executing
redundant Boolean operations in a grid cell and averaging down calculated data, presented algorithm can accurately represent material
removal volume though tool swept volume is negligibly small. Supersampling method is the most common form of antialiasing and usually
used with polygon mesh rendering in computer graphics. The key advantage of extended Z map is that the data structure is same with
conventional Z map, though it can acquire higher accuracy and reliability with same or lower computation time. By simulating machining
operation efficiently, this system can be used to improve the reliability and efficiency of NC machining process as well as the quality of the
final product.
# 2002 Elsevier Science B.V. All rights reserved.
Keywords: Computer-aided manufacturing; Z map model; Machining process simulation; NC code verification
1. Introduction suggested by several researches [4,5]. Because of its simple
data structure and fast computation time of conventional Z
Productivity and quality of machined parts highly depend map model, it is considered that Z map can be used to predict
on the NC program used in machining. Because of the need cutting force in ball end milling and generate tool path
for unattended machining and higher productivity, it is planning [6,7].
becoming more critical to simulate machining process more Due to the aliasing errors caused by discrete sampling of
precisely for the optimization of cutting condition including Boolean operation in conventional Z map model, it is hard to
chip load and material removal volume. By simulating acquire high accuracy using Z map method. To develop
machining process in three axes milling of sculptured sur- more precise simulation model, solid modeling method
faces prior to actual cutting operation, errors and ineffi- including CSG, B-rep and decomposition method, is sug-
ciency of tool path can be corrected at the programming gested by several researchers. Each solid modeling algo-
stage. rithm has its advantages and disadvantages relative to the
Geometric simulation of milling process using Z map others in terms of accuracy, robustness, data structure and
method is based on Z buffer algorithm which is developed computation time. Kondo [8] suggested DIMOS system
for making shaded images of solid models in computer which is composed of a decomposition method and a
graphics. Anderson [1] introduced Z map method to display B-rep method. Roy and Xu [9] proposed extended octree-
final shape of sculptured surfaces. Subsequent investigations based algorithm to represent Boolean operation of complex
were conducted by Hook [2] and Hsu and Yang [3] to object more accurately. The decomposition model can
enhance capability and simulation efficiency of Z map acquire relatively high accuracy, but there is several dis-
method. To verify NC program as well as to optimize the advantages like large memory consumption and complicate
cutting condition using Z map model, estimation of cutting data structure.
force and establishment of machining data base has been Construction solid geometry (CSG) method is most pop-
ular because this method can complete Boolean operation of
*
Corresponding author. Tel.: þ82-2-450-3465; fax: þ82-2-447-5886. any 3D part model relatively easily and accurately [10].
E-mail address: slko@[Link] (S.-L. Ko). Using CSG method, cutter-part immersion geometry can be
0924-0136/02/$ – see front matter # 2002 Elsevier Science B.V. All rights reserved.
PII: S 0 9 2 4 - 0 1 3 6 ( 0 2 ) 0 0 7 6 1 - 6
S.-K. Lee, S.-L. Ko / Journal of Materials Processing Technology 130–131 (2002) 608–617 609
accurately retrieved by Boolean operation between the part
model and the tool swept volume and it can be used to
optimize cutting condition by applying constant material
removal volume rate [11]. The problem in the CSG approach
is that it is computationally expensive to represent the parts
with irregular surfaces as in sculptured surface milling
[12,13]. Large data volume with complicate geometry is
another problem that makes the model not to be used
for general cutting simulation except for relatively simple
Boolean operation [14,15].
The simplicity in the data structure of conventional Z map
model makes it possible to generate and update a part model Fig. 1. Data structure of conventional Z map.
very fast. This advantage of Z map made most commercial
CAM program use Z map algorithm for NC code verification height value at a grid (xi, yi). If stored value is higher than
and optimization. However, to increase the accuracy of Z the surface of the tool movement swept volume, then Z map
map model, computation time and memory consumption model is updated to the surface generated by the cutter. The
increased quadratically. distance between the initial (before cutting) and the final
In this paper, new algorithm named enhanced Z map (after cutting) Z value can be used for describing the actual
algorithm is proposed to extract the required geometric chip removal volume.
information with complicated sculptured surfaces from Due to the discrete nature of the data structure in con-
NC program. The basic idea of enhanced Z map algorithm ventional Z map model, Boolean subtraction is executed
is based on antialiasing theory which is generally used with only at the center of each pixel. In conventional Z map, part
polygon mesh rendering in computer graphics [16,17]. model or cutter immersion geometry is detected at regular
Using modern VLSI technology, rendering hardware makes grid point as Fig. 2. As a tool envelope moves downward
it possible to increase computation efficiency dramatically continuously, removed volume is acquired by Boolean sub-
[18]. traction operation.
By executing redundant Boolean operations in a grid cell The accuracy of point sampling process in conventional Z
and averaging down acquired data, presented algorithm can map model is determined only by the grid size as Fig. 2. As a
accurately represent material removal volume though tool tool envelope moves downward continuously, removal
swept volume is negligibly small. The key advantage of volume in conventional Z map is detected only at each grid
suggested algorithm is that the data structure is same with center as solid line though exact removal volume is
conventional Z map, though it can acquire high accuracy and increased linearly as dotted line in Fig. 2(a). Smaller grid
reliability with same or lower computation time. By imple- size can increase the accuracy of simulation, but cannot
menting geometrical Boolean operation more accurately, eliminate them. When the grid size of Z map is decreased by
this system can be used to improve the reliability and half as shown in Fig. 2(b) and (c), the resolution of Boolean
efficiency of NC machining process as well as the quality operation is increased twice. And, consequently, computa-
of the final product. tion time and memory usage is quadrupled. By this excessive
cost in improving accuracy, it is hard to eliminate simulation
error in conventional Z map. In represents of final surface
2. Conventional Z map algorithm
The conventional Z map is a special form of decomposi-
tion model in which the heights at the grid center are stored
in 2D arrays. The process of obtaining Z map data can be
regarded as a ‘virtual’ digitizing process. The Z map
sampling process is carried out as follows. Let (x0, y0) be
the corner point (bottom-left corner) of a rectangular non-
parametric domain on which the regular grid is to be defined
in xy plane as Fig. 1. When r is the grid size, the grid point
(xi, yi) is determined by
xi ¼ x0 þ ri (1)
yi ¼ y0 þ rj (2)
The update of workpiece geometry, i.e. the simulation of Fig. 2. Relations between resolution of Boolean operation and grid size in
cutting process, merely consists of checking calculated conventional Z map model.
610 S.-K. Lee, S.-L. Ko / Journal of Materials Processing Technology 130–131 (2002) 608–617
with relatively flat geometry, the accuracy of conventional Z
map is sufficient. But, it is insufficient to detect material
removal volume with relatively small tool diameter or
narrowly aligned tool path where fine Boolean subtraction
is required.
3. Enhanced Z map algorithm using supersampling
method
Due to the similarity of data structure between Z map
model and raster graphic system, it is easy to adapt super-
sampling method as a antialiasing technique of conventional
Z map model. Many supersampling methods have been
developed to raise the sampling rate and increase the resolu-
tion of sampling operation [17]. In this paper, suggested
model uses inclined sampling method to increase the resolu-
tion of Z map model, because it is simple and easy to use
with relatively high accuracy. In NC code generated from
commercial CAM module, almost every tool path is con-
stituted with orthogonal movement in xy plane. Due to this
Fig. 4. Enhanced Z map model by adopting supersampling algorithm into
property, better sampling accuracy can be acquired with tool envelope boundary.
inclined sampling method.
The approximation accuracy of point sampling is deter-
mined only by the grid size as Fig. 3(a) and (b). To represent The disadvantage of this approach is relatively high com-
all the polygons that contribute to each pixel, sampling putation time in oversampling process. Basically there is no
process must take into account the areas of all the polygons. difference in computation cost between 16 points super-
In Fig. 3(c) and (d), more than one point samples are taken in sampling process as Fig. 4(a) and 4 by 4 pixels point
the region of each pixel and these samples are integrated to sampling method.
obtain the final pixel shading value. By increasing sampling To reduce unwanted overhead in oversampling process in
points per pixel, the resolution of sampling process can be each pixel, suggested algorithm detects the boundary grid
increased without any more memory usage. The resolution where the edge of tool envelope is crossing as shown in
of supersampling method is proportional to the number of Fig. 4(b). The supersampling algorithm is applied into the
sampling points per each pixel. If more sampling points cross hatched boundary area of tool envelope. And conven-
detect polygon, the intensity of pixel is increased as Fig. 3(d). tional point sampling is used inside of tool envelope as
Fig. 4(c). By reducing required oversampling process as
Fig. 4, computation time is 3–4 times faster than conven-
tional supersampling method.
4. Simulation of machining process
To verify the effectiveness of newly suggested algorithm,
computation time and accuracy of Boolean operation are
compared in parallel cut by flat end mill. Tool path of cutting
operation is shown in Fig. 5. To acquire the data for analysis
of efficiency between conventional Z map and enhanced Z
map model, pick feed of each tool path is arranged as shown
in Fig. 5(a) that regular pick feed is applied and Fig. 5(b) that
incremental pick feed is applied. By simulating milling
process in parallel cut, aliasing error can be easily analyzed
and the robustness of system can be also verified. The
geometrical parameter for simulation is as follows: pick
feed of regular tool path is 0.3 mm and 0.1–1.1 mm. Axial
Fig. 3. Increase of resolution at each pixel by supersampling algorithm. depth of cut is 6 mm for both simulations. Tool diameter is
Note that the square area represents one pixel (r ¼ grid size). 6 mm and grid size is increased from 0.05 to 1 mm. Though
S.-K. Lee, S.-L. Ko / Journal of Materials Processing Technology 130–131 (2002) 608–617 611
Fig. 5. Simulation of milling process using end mill (tool diameter ¼ 6 mm, axial depth of cut ¼ 6 mm).
it is too small compared to commercial system, computation pick feed is constant, simulated results show large deviation
time is still very fast using Pentium II 450 MHz personal between each tool path when grid size is 0.1 or conventional
computer. Because the length of tool path is not equal Z map is used. Due to aliasing effect of regular sampling
produced by general CAM module, represented system process in conventional Z map, it is hard to acquire steady
automatically splits each tool path into unit length as dots results except the case when grid size is 0.05 mm. As grid
regularly attached in tool path in Fig. 5. In this paper, unit size is decreased, simulation accuracy has a tendency to
length of each tool path is assigned as 2 mm. increase in each algorithm. But, it is hard to eliminate
Fig. 6 shows simulated material removal volume rate in aliasing error using conventional Z map. When grid size
equally spaced parallel cut using conventional Z map and is equal, simulated results using enhanced Z map is highly
enhanced Z map model. Exact solution acquired by analy- robust and accurate compared to the results acquired using
tical method is plotted as dotted line in each graph. Though conventional algorithm. Using conventional Z map, it is
612 S.-K. Lee, S.-L. Ko / Journal of Materials Processing Technology 130–131 (2002) 608–617
Fig. 6. Simulated material removal volume in end milling with incremental pick feed in according to unit length of tool movement with conventional Z map
model and enhanced Z map model.
impossible to utilize in simulation of physical process cost and accuracy of simulation must be properly analyzed.
including chip load and cutting force. When grid size is To verify simulation accuracy, maximum error and standard
decreased to 0.05 mm, both systems produced very exact deviation of error can be used as Fig. 7. By increasing grid
solutions. size from 0.05 to 1.0 mm with both Z map algorithms,
Though simulation accuracy is highly improved in simulation efficiency has been analyzed. Because cutting
enhanced Z map model with same grid size, computation tool can be damaged or broken instantly when simulation
S.-K. Lee, S.-L. Ko / Journal of Materials Processing Technology 130–131 (2002) 608–617 613
Fig. 6. (Continued ).
Fig. 7. The relationship between computation cost and accuracy between conventional Z map model and enhanced Z map model.
614 S.-K. Lee, S.-L. Ko / Journal of Materials Processing Technology 130–131 (2002) 608–617
Fig. 8. Simulated material removal volume in end milling with constant pick feed in according to unit length of tool movement with conventional Z map
model and enhanced Z map model.
error is too large, maximum error is considered to verify difference in maximum error between each algorithm. But,
simulation efficiency in according to computation time. in Fig. 7(b), standard deviation of error using enhanced Z
Standard deviation of error shows overall accuracy of simu- map algorithm is 2–4 times smaller than the results using
lation, too. As shown in Fig. 7(a), there is no significant conventional algorithm.
S.-K. Lee, S.-L. Ko / Journal of Materials Processing Technology 130–131 (2002) 608–617 615
Fig. 8. (Continued ).
Fig. 9. Relationships between computation cost and accuracy between conventional Z map model and enhanced Z map model.
616 S.-K. Lee, S.-L. Ko / Journal of Materials Processing Technology 130–131 (2002) 608–617
Due to the overhead in supersampling process, computa- grid size is varied from 1 to 0.05 mm. The results acquired
tion time of simulation using enhanced Z map is about two with 0.05 mm grid size is omitted because the results were
times longer when grid size is equal. But, dramatic increase almost exact solution as Fig. 8(h). When grid size is 1.0 mm in
of accuracy compromises its cons as shown in Fig. 7. This conventional Z map algorithm, there is only one step as shown
analysis is well coincident to the results of Fig. 6. in Fig. 8(a). It can be said that the aliasing effect of discrete
Fig. 8 shows simulated removal volume in linearly incre- sampling in regular point sampling process produces such
mental pick feed is applied. Using both simulation algorithms, results. If grid size is reduced to 0.5 mm, there are two steps as
Fig. 10. General rough machining process with ball end mill.
S.-K. Lee, S.-L. Ko / Journal of Materials Processing Technology 130–131 (2002) 608–617 617
Fig. 8(c). In conventional Z map, there is always aliasing error surfaces using developed simulation system. Further
when the grid size is larger than pick feed of tool path. On research is continuing to enhance suggested algorithm to
contrast, there is no regular step in the results acquired using implement into industrial environments.
enhanced Z map model. It is due to the antialiasing mechan-
ism of supersampling method.
Because pick feed of incremental tool path is relatively Acknowledgements
large compared to equally spaced tool path, the simulated
accuracy using enhanced Z map is highly increased as shown Financial support from the 2001 National Research
in Fig. 9. There is significant difference between the results Laboratory (NRL) program (M1010400288) by the Ministry
of each algorithm. Large maximum error and high standard of Science and Technology is gratefully acknowledged.
deviation means that it produces highly overestimated or
underestimated simulation results. When simulating
machining process regarding physical interaction between References
tool and workpiece, large error in simulation can produces
fatal damage to product or tool. In Fig. 9, it can be said that [1] R.O. Anderson, Detecting and eliminating collisions in NC
enhanced Z map produces 2–5 times more robust simulation machining, Comput. Aided Des. 10 (2) (1978) 231–237.
[2] T.V. Hook, Real-time shaded NC milling display, Proc. ACM 20 (4)
than conventional Z map algorithm.
(1986) 15–20.
A good simulation system is faster and more accurate. [3] P.L. Hsu, W.T. Yang, Realtime 3D simulation of 3-axis milling using
Because enhanced Z map model produces more accurate isometric projection, Comput. Aided Des. 25 (4) (1993) 215–224.
simulation with same or lower computation time and mem- [4] S. Takata, M.D. Tsai, M. Inui, T. Sata, A cutting simulation system
ory usage compared to conventional Z map model, new for machinability evaluation using a workpiece model, Ann. CIRP 38
(1) (1989) 417–420.
general simulation system based on enhanced Z map algo-
[5] Z. Yazar, K.F. Koch, T. Merrick, T. Altan, Feed rate optimization
rithm is developed. Using general NC program, developed based on cutting force calculations in 3-axis milling of dies and
system can simulate cutting operation with exact material molds with sculptured surfaces, Int. J. Mach. Tools Manuf. 34 (3)
removal volume estimation. Fig. 10 shows simulated results (1994) 365–377.
using ball end mill of 6 mm diameter. Not only geometrical [6] B.K. Choi, D.H. Kim, R.B. Jerard, C-space approach to tool-path
generation for die and mould machining, Comput. Aided Des. 29 (9)
interference between tool and workpiece, this system esti-
(1997) 657–669.
mates material removal volume with unit tool movement as [7] G.M. Kim, P.J. Cho, C.N. Chu, Cutting force prediction of sculptured
shown in Fig. 10(b). surface ball end milling using Z map, Int. J. Mach. Tools Manuf. 40
(2000) 277–291.
[8] M. Kondo, Decomposition of complex geometry for a manufacturing
application, Comput. Aided Des. 26 (3) (1994) 244–252.
5. Conclusions
[9] U. Roy, Y. Xu, Computation of a geometric model of a machined part
from its NC machining programs, Comput. Aided Des. 31 (1999)
In this paper, the development of simulation system in 401–411.
milling operation using enhanced Z map algorithm is pre- [10] W.P. Wang, K.K. Wang, Geometric modeling for swept volume of
sented to be used for verification and analysis of NC moving solids, IEEE CG A 6 (1986) 8–17.
[11] W.P. Wang, Solid modeling for optimizing metal removal of three-
program. The most significant benefits of suggested algo-
dimensional NC end milling, J. Manuf. Syst. 7 (1) (1988) 57–65.
rithm are its improved accuracy and reliability without any [12] Y.S. Tarng, W.S. Chang, Dynamic NC simulation of milling
change in data structure of conventional Z map model. operations, Comput. Aided Des. 25 (12) (1993) 769–775.
By analyzing simulated results, it is shown that suggested [13] A.D. Spence, Y. Altintas, A Solid modeller based milling process
simulation system with inclined supersampling method simulation and planning system, Trans. ASME 116 (1994) 61–69.
[14] H. El-Mounayri, M.A. Elbestawi, A.D. Spence, S. Bedi, General
produces 2–5 times more accurate results with same com-
geometric modeling approach for machining process simulation, Int.
putation time. When considering simulation efficiency of J. Adv. Manuf. Technol. 13 (1997) 237–247.
computation cost and simulation accuracy by comparing [15] A.D. Spence, F. Abrari, M.A. Elbestawi, Integrated solid modeler based
maximum error and standard deviation of error, suggested solutions for machining, Comput. Aided Des. 32 (2000) 553–568.
model can simulate NC program 2–3 times faster than [16] F.C. Crow, The aliasing problem in computer generated shaded
images, Comm. ACM 20 (11) (1977) 799–805.
conventional Z map model with better accuracy and better
[17] R.L. Cook, Stochastic sampling in computer graphics, ACM Trans.
robustness in material removal volume rate. Graphics 5 (1) (1986) 51–72.
It may be possible to develop cutting process optimization [18] A.C. Barkans, Hardware assisted polygon antialiasing, IEEE
algorithm for machining dies and molds with sculptured Comput. Graphics Appl. 11 (1991) 80–88.