A robust 2D point-sequence curve offset algorithm with multiple islands for contour-parallel tool path
Highlights
► Islands are bridged to the outer profile in near linear time. ► The concept of a stuck circle is proposed. ► Two profile updating rules are proposed, the basic rule and the append rule. ► A tree analysis (TA) procedure is proposed to remove global invalid loops.
Introduction
The roughing process is usually conducted in three-axis machine tools. At the roughing stage excess material should be removed as quickly as possible [1]. The most common method for roughing free-form surfaces is the layer-by-layer machining approach [2], [3]. On each layer, the machine area, which is usually represented by a 2D PS-curve, can be obtained by intersecting the layer with the surface [4]. Generally, there are two most popular tool path patterns, direction-parallel and contour-parallel. The direction-parallel tool path suffers more cutting time and worse surface quality than that of the contour-parallel tool path in the case of complex shapes [5]. So for freeform surfaces, the contour-parallel tool path is always preferred. The main task of generating such a tool path is to offset the original profile successively. CAM software is always thirsty for a faster and more stable offset algorithm.
The literature on the 2D PS-curve offset algorithm can roughly be classified into four approaches: Voronoi diagram, level set, pair-wise and bisectors based. To understand the Voronoi diagram and level set method needs a good knowledge of mathematics. Persson [6] introduced a Voronoi diagram to generate a contour-parallel tool path bounded by segments without islands. Held et al. [7] further developed the Voronoi diagram to handle pockets with islands. But constructing a Voronoi diagram is a time consuming process and it also has numerical instability [4], [8]. Kimmel and Bruckstein [9] presented a level set method derived from fluid dynamics to handle pockets. However, the main drawback of this method is the initialization of , where is the propagation function [5].
Pair-wise offset can be done by offsetting the start and end points of the segment along the normal direction for an offset distance, while in bisector based offset, the offset point is picked up on the bisector of two adjacent segments. Kim and Jeong [10] proposed a procedure which is able to offset a B-spline curve with islands inside. Actually, their offset algorithm is not really free-form curve based. The B-spline is first converted to Bezier, and the Bezier curve is then subdivided into a PS-curve. The initial offset curve is obtained pair-wisely. But only two cases of local problems are discussed and fixed. Global invalid loops are removed by checking loop area. Positive area means that the loop is valid, otherwise invalid. In their algorithm, islands are bridged manually to the outer profile.
Wong and Wong [11] presented an algorithm which can automatically bridge islands to the outer profile by the nearest distance. But the total times of minimum distance calculation between two PS-curves would be , in which is the total number of curves, including the outer profile and islands. They use bisectors to generate the initial offset curve. If the two adjacent bisectors intersect, the segment containing these two bisectors is removed and a new bisector is constructed by the adjacent segments. Global invalid loops are removed by checking the direction of the loop. Unfortunately, the local loop removing algorithm is not given in detail. Frankly, the algorithm developed by us is inspired by the idea of bisector intersection.
Choi and Park [8], Park and Choi [12] and Park and Chung [13] proposed a PWID (pair-wise interference-detection) test based offset algorithm. In their work, they define three interfering segments, which are full-interfering segment, partial interfering segment and reverse-interfering segment; and three interfering relations, which are partial interfering relation, reverse-interfering relation and full-interfering relation. The PWID test includes two basic operations, which are replace-full-segment and replace-reverse-segment. With these definitions and operations, the algorithm can work in linear time. However, in their algorithm, islands are also bridged to the outer profile manually.
Lai et al. [14] proposed a FLTM (forward locus tracing method) based algorithm for invalid loops removal. In their work, all degenerate segments are eliminated by a Voronoi diagram method. Then the FLTM searches for all intervals split by intersections of complicated planar curves directly and transforms 2D transversal intersection problems into 1D interval identification. If the first interval has no interference with other objects, then the odd intervals group can form valid loops. The problem is the Voronoi diagram method they use could go wrong between two adjacent inner angles where when large offset is required, as in Fig. 1(a).
In the algorithm developed by Kim [4] and Kim et al. [15], the raw offset curve is calculated by bisectors. The offset edge which has a reverse direction compared to the corresponding original edge is defined as an invalid offset edge. Local problems are fixed by removing the invalid offset edge. Global loops are removed also by checking the direction of the loop. Islands are merged similarly to the global loops removing process. The algorithm is near time. However, their algorithm cannot handle cases like in Fig. 1(b).
Lee et al. [16] also use bisectors to generate the initial offset curve. Besides direction validity, they also check position validity. An offset edge is defined position invalid when its start and end points are both in the offset area, otherwise position valid. Local loops are removed by the proposed raw offset line algorithm, in which five different cases are included and then the raw offset curve is established. The global loops are removed by comparing the distance from the offset point to the original profile with the given offset distance. The problem is calculating all the distances from offset points to the original profile involves time if not optimized. The algorithm survives the case in Fig. 1(b), but it fails the cases in Fig. 2(a) and (b). The methods dealing with invalid position edge or invalid direction edge in their paper could have been improper. The fact might be, for an offset edge, it can be used even if it’s an invalid position edge (as in Fig. 2(a)), or an invalid direction edge (as in Fig. 2(b)).
Interesting as it is, the work performed by Liu et al. [17] is more for computer graphics science than for a CNC tool path generation process. The salient feature of their work is that it can deal with profile self-intersection, overlapping and small arc problems. The initial offset curve is also obtained pair-wisely, but more cases are covered to fix local problems. Due to its ability, more time is required to get the offset curves. It takes them on average 21 ms to calculate the offset of a polyline including only 8 segments on a 1.7 GHz Pentium IV CPU. With this performance, their algorithm might not be qualified to be applied in the CNC area where thousands of segments might be considered at one offset.
Earlier researches on a PS-curve offset or CNC pocketing algorithm which are not included above can be found in reviews [5], [18]. From the above literature, it can be learned there are three main problems in the PS-curve offsetting process: (1) dealing with islands, (2) fixing local problems and (3) removing global invalid loops. If islands exist, basically, there are two ways to deal with them. The first way is to bridge all the islands to the outer profile; and the second way is to offset the outer profile inwards and islands outwards and then trim and merge the offset curves if they intersect. In practice, we have observed from PowerMILL that islands are bridged to the outer profile. Although PowerMILL works very fast and stable, both of its bridging algorithms and offset algorithms remain unknown to the public. In this paper, we have developed a robot offset algorithm which can handle islands. The input of the offset algorithm is a set of PS-curves, in which one of them is the outer profile and others are islands; and the output is offset curves which can be used as a contour-parallel tool path in the roughing process.
The remainder of the paper is organized as follows. Section 2 bridges automatically all the islands to the outer profile with Delaunay triangulation, forming a single PS-curve. Section 3 firstly introduces local profile updating rules, the basic rule and the append rule. With these two rules, the raw offset PS-curve is obtained by updating the original profile. Based on this, Section 4 removes all global invalid loops with a procedure called tree analysis. In Section 5, the time complexity of the proposed algorithm is analyzed. Several examples including a cutting simulation are done to verify the proposed algorithm in Section 6. The last section closes this paper.
Section snippets
Bridging islands to the outer profile
The input of the bridging process is a PS-curve set, in which the 0th element is the outer profile (with counterclockwise direction) and the other elements are islands (with clockwise direction), as shown in Fig. 3; and the output is a single PS-curve which connects all the islands and the outer profile. The requirement for the bridging process is that the constructed bridges should not cross with any other bridges or any PS-curves. In this section, we propose a new bridging algorithm based on
Raw offset curve generation
In Section 2, the input PS-curve set, including the outer profile and islands, have been linked into one single PS-curve. This obtained PS-curve will be used as the input of this section. And the output of this section is the raw offset curve without any local problems, like local self-intersections. At first, some basic definitions that will be used in this section are given as follows.
Definition 4 Struct Bisector {Point ; Point ;}.
Global invalid loops removal
On the raw offset PS-curve obtained in Section 3, global invalid loops may exist. In this section, all the global invalid loops will be removed by a procedure called tree analysis (TA). To make it more understandable, a simple demonstration of the TA procedure is given below. Before that, two definitions used in this section are given as follows.
Definition 6 Valid point.
A point which is inside the PS-curve is defined valid if it is not in the offset region [16] of the PS-curve, otherwise invalid. To check
Time complexity analysis
The input of the algorithm is a set of PS-curves, in which one of them is the outer profile and the others are islands and the output is the offset curves. The whole algorithm is made up of three parts: (1) bridging islands to the outer profile, (2) raw offset curve generation and (3) global invalid loops removal.
In the first part, obviously, most of the time has been spent on the Delaunay triangulation process, so the time complexity for the bridging process is , in which is the
Experiments
The proposed offset algorithm has been programmed in the C++ language and run on a personal computer with Pentium (R) Dual-core CPU E6300 @ 2.80 GHz and 2.00 GB RAM. Our algorithm succeeds for many examples that have been tested.
It has been mentioned many times in the literature that traditional offset algorithms have numerical instability near the circular portion. However, our algorithm can deal well with such a problem both in theory (see Section 3) and in practice. Fig. 22(a) shows a
Conclusions and future work
A new PS-curve offset algorithm is proposed in this paper. The algorithm is able to deal with PS-curves with multiple islands. The input of the algorithm is a set of PS-curves, in which one is the outer profile and the others are islands. Firstly, the islands are automatically bridged to the outer profile with the Delaunay triangulation method, forming a single linked PS-curve. The profile of this curve is then updated with the profile updating rules, the basic rule and the append rule, so that
Acknowledgment
This work was financially supported by the National Natural Science Foundation of China (51175461).
References (24)
- et al.
Recent development in CNC machining of freeform surfaces: a state-of-the-art review
Computer-Aided Design
(2010) - et al.
Automated tool sequence selection for 3-axis machining of free-form pockets
Computer-Aided Design
(2004) - et al.
Automatic CNC milling of pockets: geometric and technological issues
Computer Integrated Manufacturing Systems
(1998) NC machining of arbitrarily shaped pockets
Computer-Aided Design
(1978)- et al.
Pocket machining based on contour-parallel tool paths generated by means of proximity maps
Computer-Aided Design
(1994) - et al.
A pair-wise offset algorithm for 2D point-sequence curve
Computer-Aided Design
(1999) - et al.
Shape offsets via level sets
Computer-Aided Design
(1993) - et al.
Tool path generation for machining free-form pockets with islands
Computers & Industrial Engineering
(1995) - et al.
Uncut free pocketing tool-paths generation using pair-wise offset algorithm
Computer-Aided Design
(2001) - et al.
Offset tool-path linking for pocket machining
Computer-Aided Design
(2002)
An offset algorithm for polyline curves
Computers in Industry
A classified bibliography of literature on NC milling path generation
Computer-Aided Design
Cited by (55)
A comprehensive review of process planning and trajectory optimization in arc-based directed energy deposition
2024, Journal of Manufacturing ProcessesContinuous contour-zigzag hybrid toolpath for large format additive manufacturing
2022, Additive ManufacturingStress-based tool-path planning methodology for fused filament fabrication
2020, Additive ManufacturingToolpath algorithm for free form irregular contoured walls/surfaces with internal deflecting connections
2019, Materials Today: ProceedingsA novel command generation paradigm for production machine systems
2018, Robotics and Computer-Integrated ManufacturingCitation Excerpt :The developed CG paradigm is tested on two cases involving different production systems: (i) 3-axis CNC Vertical Machining Center (subtractive manufacturing), (ii) Desktop Fused Filament Fabrication (FFF) 3D Printer (additive manufacturing). CAD model of the first test case (entitled “Rabbit”), which is adapted from [45], is given in Fig. 4(a). For this case, pocket milling is performed on an aluminum block (Al 7075-T6) to obtain the given topology containing ten islands.
Contour Offset Algorithm Based on Topological Relationship of Line Segments
2023, Zhongguo Jixie Gongcheng/China Mechanical Engineering