Boundary extraction algorithm for cutting area detection
Introduction
NC-data generation for sculptured surface machining is usually handled by NC-programmers with commercial CAM systems. Generally, NC-data generation involves three steps: (1) process planning by NC-programmers, splitting the sculptured surface into several cutting areas according to the machining features and assigning cutting parameters (tool, tool-path topology) to each cutting area; (2) modeling boundary curves to represent the cutting areas in terms of a boundary representation and (3) NC-data generation from a CAM system with the boundary curves and the cutting parameters. Many researchers have studied CAPP (computer-automated process planning) to replace the first and second steps of the NC-data generation; however, there remain many obstacles to be overcome for the implementation of a practical CAPP system [3]. Especially, the second step, modeling boundary curves, has rarely been brought into focus even though it is essential for the implementation of a CAPP system. The fact that no proper solution has been found for the boundary curve modeling serves as a motivation of this paper.
Direct extraction of cutting areas from a sculptured surface is extremely difficult, because of two major difficulties: (1) numerical search operations, computationally expensive and unstable, are required to extract feature curves (wall, floor, fillet, etc.) from a parametric surface and (2) the feature curves have to be merged for the boundary curves by finding sets of connected feature curves, because a sculptured surface may consist of thousands of parametric surfaces.
To avoid the mentioned difficulties, we employ a regular grid model called a Z-map [3] model. This paper presents a procedure extracting cutting areas from a Z-map model, a special form of discrete non-parametric surface model. A Z-map is a 2D-array of real numbers in which Z-values of the surface, sampled at the regular grid-points, are stored. The detailed procedure obtaining a Z-map from a sculptured surface can be found in Choi and Jerard [3]. Owing to its simplicity, a Z-map model is used widely in three-axis NC machining applications [1], [2], [3], [4], [5].
We describe the suggested procedure informally with the input and output of the procedure (Fig. 1). The input includes a Z-map and a value range defining a machining feature, cutting areas. With the input, boundary curves enclosing the cutting areas and the inclusion relationships among the boundary curves are extracted. The machining feature, we can find, depends on what the Z-map stores, such as curvatures, slopes and Z-values. Curvatures and slopes can be calculated by pre-processing each of the grid-points in a Z-map storing Z-values. Consequently, we can obtain cutting areas corresponding to a specific slope range (wall, floor) or curvature range (fillet, uncut area), which may be considered as machining features. If the Z-map represents a CL-surface [1], [3], Z-constant contouring tool-path can be obtained by specifying the height with the value-range (VLow=height, VHigh=infinite).
Most of the prior results [6], [7], [8] are found in computer vision and several algorithms have been suggested for the boundary extraction problem from a binary image. Although those algorithms are not designed to extract cutting areas from a Z-map, they can be applied to the problem, because a Z-map can be easily transformed to a binary image with a value-range. Fig. 2 shows an example of a binary image obtained from a Z-map. If a grid-point belongs to the value-range (VLow, VHigh), then the grid-point is classified as an object-point (black), otherwise a background-point (white).
Freeman [6] proposed the concept of a chain code which is a data structure representing the boundaries by means of eight direction vectors (Fig. 3a). The basic idea of the conventional chain-coding algorithm is to trace the boundary pixels counterclockwise or clockwise and to sequentially generate codes considering the neighborhood relationship between adjacent boundary pixels. Kim et al. [7] proposed a two-step algorithm to compute chain codes from a particular run-length coded representation (Fig. 3b) that preserves connectivity information between runs. They also suggested an algorithm to detect the inclusion relationships between external and internal boundaries. More recently, Zingaretti et al. [8] presented an algorithm to extract boundaries from multi-valued images.
We propose a procedure to extract cutting areas from a Z-map for sculptured surface machining, and the core of the procedure is a ‘boundary extraction algorithm’ to extract boundaries and identify the inclusion relationships among the boundaries from a run-length coded binary image. The main features of the proposed algorithm are as follows: (1) a connectivity-net is devised to store the connectivity information between runs; (2) a recursive function is designed for the efficient construction of the connectivity-net; and (3) a hierarchical boundary extraction scheme is employed to identify inclusion relationships among the boundaries from the connectivity-net. The time complexity of the boundary extraction algorithm is O(n), where n is the number of runs.
The overall structure of the ‘boundary extraction algorithm’ is given in Section 2, followed by the connectivity-net construction in Section 3. Empirical performance tests are given in Section 4. Finally, concluding remarks are given in Section 5.
Section snippets
Outline of the boundary extraction algorithm
This section gives an outline of the suggested boundary extraction algorithm, together with some preliminary definitions. The boundary extraction algorithm can be informally specified as follows:
Boundary extraction algorithm
- •
Input: A run-length coded binary image.
- •
Output: Boundaries and the inclusion relationships among the boundaries.
The proposed algorithm consists of three steps: (1) initialize a connectivity-net with a run-length coded binary image; (2) complete the connectivity-net by
Connectivity-net construction
This section gives a detailed explanation of the algorithm completing an initial connectivity-net by extracting the connectivity information (N.link) of all the nodes. Before the formal description of the algorithm, some definitions are addressed. Definition 1 Connectivity relation between two nodes Let two nodes, N1 and N2, belong to two different runs, R1 and R2, respectively. Then, the connectivity relation between the two nodes becomes CONNECTED (Fig. 8a) if there is a sharing column-index between R1 and R2. Otherwise N2 may be BEFORE N1 (Fig.
Empirical performance tests
The proposed algorithm was implemented in C language and test runs were made on an engineering workstation. Fig. 12a shows an injection molding-die for the front mask of a TV monitor. The boundary curves of the wall areas are extracted from the model as shown in Fig. 12b.
Another example shown in Fig. 13a is a stamping-die for the fuel tank of a passenger car. At 10 different heights, contour curves are extracted from the model as shown in Fig. 13b.
Fig. 14 shows the execution times plotted
Discussion and conclusions
This paper presents a procedure to extract cutting areas from a Z-map for sculptured surface machining. Cutting areas, corresponding to machining features (fillet/uncut area, wall/floor, contour curve), can be extracted from a Z-map storing a specific attribute of a sculptured surface, such as curvature, slope and Z-values. The core of the procedure is a ‘boundary extraction algorithm’ to extract boundaries and identify the inclusion relationships among the boundaries from a run-length coded
Acknowledgements
This research was supported by the Ministry of Science and Technology of Korea, through a ‘National Research Lab Project’ grant to KAIST VMS Laboratory.
Sang C. Park is a PhD student in the Department of Industrial Engineering at KAIST. He received his BS and MS degrees from KAIST in 1994 and 1996, respectively. His research interests include geometric algorithms in CAD/CAM, sculptured surface NC machining, simulation, and virtual manufacturing system.
References (8)
- et al.
C-space approach to tool-path generation for die and mould machining
Computer Aided Design
(1997) - et al.
Die-cavity pocketing via cutting simulation
Computer Aided Design
(1997) - et al.
Automatic generation of NC cutter path from massive data points
Computer Aided Design
(1998) - et al.
A new chain-coding algorithm for binary images using run-length codes
Computer Vision Graphics and Image Processing
(1988)
Cited by (0)
Sang C. Park is a PhD student in the Department of Industrial Engineering at KAIST. He received his BS and MS degrees from KAIST in 1994 and 1996, respectively. His research interests include geometric algorithms in CAD/CAM, sculptured surface NC machining, simulation, and virtual manufacturing system.
Byoung K. Choi is a professor of manufacturing systems engineering in the Department of Industrial Engineering at KAIST, which he joined in 1983. He received a BS from Seoul National University, an MS from KAIST, and a PhD from Purdue University, all in Industrial Engineering. His research interests are in the area of sculptured-surface modeling and machining, CAPP for die-cavity machining, discrete event system modeling and simulation, and virtual manufacturing system.