8
One-sided arc approximation of B-spline curves for interference-free offsetting S.-H. Frank Chuang * , C.Z. Kao Department of Mechanical Engineering, National Chung-Hsing University, Taichung 402, Taiwan Received 28 February 1998; received in revised form 22 September 1998; accepted 23 December 1998 Abstract An algorithm is presented to generate a piecewise curve with G 1 continuity using arcs, which approximates a B-spline curve without crossing the curve. Initially, the B-spline curve in database is decomposed into piecewise Bezier curves. Using convex hulls of the Bezier curves to protect the original curve from interference, the line segments are chosen all on the same side of the B-spline curve to give a one- sided approximating curve. Based on the obtained approximating line segments, biarc fitting and single arc fitting methods are applied to construct a smooth, G 1 continuous curve which does not cross the original curve. If the resulting curve is offset to generate tool paths for pocketing boundaries with B-spline curves, the over-cutting problem can be eliminated completely, and abrupt direction changes on tool paths can be greatly reduced. This method can also be applied to generate collision free paths for robot arms. q 1999 Elsevier Science Ltd. All rights reserved. Keywords: B-spline curve; Biarcs; Fitting; Cutter-path generation; Interference; Offsetting 1. Introduction The desire of sophisticated shapes in product design has raised the wide use of freeform curves, such as Bezier curves, B-spline curves or even NURB curves [4,6,16,18]. A path for machining or for a robot should be smooth for control stability and the path should not cause the machining tool or robot to interfere with the material side of a given curve. To plan a path requires offsetting of a given curve such that the path will ensure smooth moves without over- cutting in machining or no collision in robot movement. Nevertheless, offsetting curves with higher degrees such as B-spline curves causes computational difficulties in geometric processing [5,17,21]. A curve fitting method is thus proposed to approximate a B-spline curve to one side of the curve with arcs and lines, and non-interfering and G 1 continuous paths can be easily generated by offsetting. Such offset paths can be used as, for example, non-over-cutting tool paths or collision free robot paths. For roughing operation, it may not matter whether the resulting machined surface is adequately smooth or not, but smooth paths will improve motion control and allow higher speeds during a cutting process. For robotic path control, smoothness of motion is also important. Conven- tional direct biarc curve fitting cannot avoid collision completely when a B-spline curve is used. In order to achieve non-interfering and smooth path generation, lower degree curves of arcs and lines are used in this research to approximate a B-spline curve from one side with G 1 continuity. G 1 continuity means that two- joined curve segments have the same end point and the same tangent direction at the joining point. Most of the curve approximation methods for B-spline curves were investigated for solving the offsetting problem in machining tool path generation [9]. Pham uses a set of control knots of a uniform cubic B-spline to generate approximating offset curve segments [17]. The method requires solving equations with higher degrees, which is prone to numerical errors. Meek and Walton use arcs to fit and to approximate non-uniform rational B-spline curves with degree of two [12]. This method, limited to NURB curves of degree two, cannot generally be applied to curves with higher degrees. Several researchers have used the circular biarcs fitting method to approximate a composition of straight line segments [1,10,11,14,15,19,22], but they do not deal with one-sided arc approximation for higher degree curves. Ong et al. proposed an optimization approach that involves a bound that can be defined by a bidirectional tolerance about the defined B-spline curve [13]. Although the method is applicable to non-interference fitting with Computer-Aided Design 31 (1999) 111–118 COMPUTER-AIDED DESIGN 0010-4485/99/$ - see front matter q 1999 Elsevier Science Ltd. All rights reserved. PII: S0010-4485(99)00019-6 * Corresponding author. Tel.: 00 886 4 285 1368; fax: 00 886 4 287 7170. E-mail address: [email protected] (S.-H.F. Chuang)

One-sided arc approximation of B-spline curves for interference-free offsetting

Embed Size (px)

Citation preview

Page 1: One-sided arc approximation of B-spline curves for interference-free offsetting

One-sided arc approximation of B-spline curves for interference-freeoffsetting

S.-H. Frank Chuang*, C.Z. Kao

Department of Mechanical Engineering, National Chung-Hsing University, Taichung 402, Taiwan

Received 28 February 1998; received in revised form 22 September 1998; accepted 23 December 1998

Abstract

An algorithm is presented to generate a piecewise curve withG1 continuity using arcs, which approximates a B-spline curve withoutcrossing the curve. Initially, the B-spline curve in database is decomposed into piecewise Bezier curves. Using convex hulls of the Beziercurves to protect the original curve from interference, the line segments are chosen all on the same side of the B-spline curve to give a one-sided approximating curve. Based on the obtained approximating line segments, biarc fitting and single arc fitting methods are applied toconstruct a smooth,G1 continuous curve which does not cross the original curve. If the resulting curve is offset to generate tool paths forpocketing boundaries with B-spline curves, the over-cutting problem can be eliminated completely, and abrupt direction changes on toolpaths can be greatly reduced. This method can also be applied to generate collision free paths for robot arms.q 1999 Elsevier Science Ltd.All rights reserved.

Keywords:B-spline curve; Biarcs; Fitting; Cutter-path generation; Interference; Offsetting

1. Introduction

The desire of sophisticated shapes in product design hasraised the wide use of freeform curves, such as Beziercurves, B-spline curves or even NURB curves [4,6,16,18].A path for machining or for a robot should be smooth forcontrol stability and the path should not cause the machiningtool or robot to interfere with the material side of a givencurve. To plan a path requires offsetting of a given curvesuch that the path will ensure smooth moves without over-cutting in machining or no collision in robot movement.Nevertheless, offsetting curves with higher degrees suchas B-spline curves causes computational difficulties ingeometric processing [5,17,21]. A curve fitting method isthus proposed to approximate a B-spline curve to one side ofthe curve with arcs and lines, and non-interfering andG1

continuous paths can be easily generated by offsetting. Suchoffset paths can be used as, for example, non-over-cuttingtool paths or collision free robot paths.

For roughing operation, it may not matter whether theresulting machined surface is adequately smooth or not,but smooth paths will improve motion control and allowhigher speeds during a cutting process. For robotic path

control, smoothness of motion is also important. Conven-tional direct biarc curve fitting cannot avoid collisioncompletely when a B-spline curve is used.

In order to achieve non-interfering and smooth pathgeneration, lower degree curves of arcs and lines are usedin this research to approximate a B-spline curve from oneside with G1 continuity. G1 continuity means that two-joined curve segments have the same end point and thesame tangent direction at the joining point.

Most of the curve approximation methods for B-splinecurves were investigated for solving the offsetting problemin machining tool path generation [9]. Pham uses a set ofcontrol knots of a uniform cubic B-spline to generateapproximating offset curve segments [17]. The methodrequires solving equations with higher degrees, which isprone to numerical errors. Meek and Walton use arcs to fitand to approximate non-uniform rational B-spline curveswith degree of two [12]. This method, limited to NURBcurves of degree two, cannot generally be applied to curveswith higher degrees. Several researchers have used thecircular biarcs fitting method to approximate a compositionof straight line segments [1,10,11,14,15,19,22], but they donot deal with one-sided arc approximation for higher degreecurves. Ong et al. proposed an optimization approach thatinvolves a bound that can be defined by a bidirectionaltolerance about the defined B-spline curve [13]. Althoughthe method is applicable to non-interference fitting with

Computer-Aided Design 31 (1999) 111–118

COMPUTER-AIDEDDESIGN

0010-4485/99/$ - see front matterq 1999 Elsevier Science Ltd. All rights reserved.PII: S0010-4485(99)00019-6

* Corresponding author. Tel.: 00 886 4 285 1368; fax: 00 886 4 2877170.

E-mail address:[email protected] (S.-H.F. Chuang)

Page 2: One-sided arc approximation of B-spline curves for interference-free offsetting

optimal number of biarcs, the formulation of the optimiza-tion method with constraints is very complex and finding thesolution is very computation intensive and prone to numer-ical errors. Therefore, a simple robust method withoutexhausting numerical computation is presented to achieveone-sided arc approximation for general B-spline curveswith G1 continuity.

The aim of the proposed method is to first transform a B-spline curve into a non-interfering line composition to oneside of the B-spline. The line composition may coincidewith the curve at one or more points but must not cross tothe other side. Using a combination of biarcs fitting andsingle arc fitting methods, a non-interferingG1 continuouscurve is generated to redefine a B-spline curve on the sameside as the line approximation. As the fitting curve iscomposed of only arcs and lines, it is easy to offset the fittingcurve to generate smooth tool paths for cutter center pathswithout over-cutting in CNC machining [8].

2. One-sided straight line approximation

Before fitting a B-spline curve with arcs, one-sided curveapproximation with straight line segments is introduced [5].The knot insertion method is used to decompose a B-splinecurve into piecewise Bezier curves [2,3]. The side lines of

Bezier convex hulls on the chosen side of the B-spline curveare collected to generate a one-sided approximating curve.

A Bezier curve is defined by a control polygon. Thevertices of the control polygon are the controlling points,also called Bezier points [6,7]. The convex hull property ofa Bezier curve states that the curve is completely containedin the convex hull of its Bezier points and the convex hull isthe minimum convex polygon of those control points[16,20]. If a cutter does not cross the boundary of the convexhull, it guarantees that the cutter will not interfere with thedefined Bezier curve. As shown in Fig. 1, the Bezier curve isdefined by control points,b0, b1, b2 andb3. The entire curveis completely contained in the inside of the convex hull,b0,b1, b3, b2, b0. Parts of the line segments of this convex hull,eitherb0, b1, b3 on the left orb0, b2, b3 on the right in thisexample, will be used for non-interfering curve fitting [5].

To bring the approximation curve closer to a Beziercurve, it is resorted to repeated subdivisions of a Beziercurve [6]. The more of the subdivisions, the smaller ofconvex hulls will be generated and the closer of the approx-imation curve is resulted. A Bezier curve defined byb0, b1,b2, b3 is shown in Fig. 2, one time subdivision appliedgenerates two sets of Bezier control points,b0;b

10;b

20; b

30;

andb30;b

21;b

12; b3:

Therefore, smaller convex hullsb0;b10;b

30; b

20;b0; and

b30;b

21;b

12;b3; b

30; approximate the original Bezier curve

closer than the original convex hull,b0; b1;b3;b2;b0:

If the segments on the left side and on the right side of theBezier curve are taken for approximation, then the fittingsegments areb0;b

10;b

30 and b3 and b0;b

20;b

30; b

21; b

12 and b3,

respectively.In order to simplify the line representation in database,

two adjacent segments with the same tangent direction aremerged into one segment. As shown in Fig. 2,b2

0b30 andb3

0b21

are merged into just one segmentb20b2

1:

3. Producing G1 approximating curve

The method using convex hulls to approximate a B-splinecurve is able to generate non-interfering approximating curvewith line segments [5]. The line approximating curvecan only achieveG0 continuity. G0 continuity meansthat the joining ends of two segments have joined atthe same position, but not with the same tangent direc-tion or geometric continuity in higher order whichaffects curve smoothness. If the fitting curve is offsetfor path generation on NC machining, the machiningpaths cause discontinuity and sharp corners at jointsof line segments to line segments. The arc fitting meth-ods in various conditions, of which the details will begiven in the Section 4, are used to fit again on the lineapproximating curve to the same side as the lineapproximating curve. The new arc fitting curve isG1

continuous and it does not interfere with the lineapproximating curve, and thus, neither with the original

S.-H.F. Chuang, C.Z. Kao / Computer-Aided Design 31 (1999) 111–118112

Fig. 1. Convex hull of Bezier curve.

Fig. 2. Subdivision of Bezier curve.

Page 3: One-sided arc approximation of B-spline curves for interference-free offsetting

B-spline curve. The new approximating curve iscomposed of only arcs and straight lines, which areeasily offset to generate non-interfering paths and avail-able NC commands can be directly used to guide andtrace the smooth path [8].

In order to ensure the arc fitting curve is completelylocated at one side of a line fitting curve, each portion ofthe line fitting curve may apply different kinds of arc fittingmethods depending on convexity conditions and dependingon whether the curve is to be to the left or the right. A linefitting curve is subdivided and classified into convex regions

and concave regions depending on whether the curve is to beto the left or the right. As shown in Fig. 3(a), when an arcfitting curve is located at the left-hand side of the line fittingcurve, the line segments advancing clockwise is defined as aconvex region and the line segments advancing counter-clockwise as a concave region. It is noted that a joiningregion between two convex regions, even just a singleconcave point as shown in Fig. 4, gives rise to a concaveregion. Similar classification applies for an arc fitting curvelocated at the right-hand side of the line fitting curve. Asshown in Fig. 3(b), the line segments advancing clockwise isa concave region and the line segments advancing counter-clockwise is a convex region.

To define a point as convex or concave depending on thechosen side and the direction of turn of the line segments,the rules are explained as follows. For an arc fitting curvelocated at the left-hand side of a line fitting curve, a point,e.g.P2 in Fig. 3(a), is defined as convex if the segmentP2P 3

rotates at a negative angle with respect to the previoussegmentP1P 2. However, for a segment rotating at a positiveangle, the point, e.g.,P5 in Fig. 3(a), is designated asconcave. Similarly, to fit an arc fitting curve located at theright-hand side of a line fitting curve, the pointP2 in Fig.3(b) is defined as concave if the segmentP2P3 rotates at anegative angle with respect to the previous segmentP1P2.However, for a segment rotating at a positive angle, thepoint, e.g.,P5 in Fig. 3(b), is designated as convex. A regionconsisting of several consecutive segments is convex if allpoints except the end points are convex. Similarly for aconcave region, a region consisting of several consecutivesegments is concave if all points except the end points areconcave.

After a line fitting curve is classified and divided intoconvex and concave regions, arc fitting proceeds as follows.If there are convex regions, then for each convex region, thebeginning and end segments are first replaced by single arcsof line approximation, and then the segments between endsegments are replaced by biarcs. For segments in a concaveregion, either an arc is inserted between line and arc when asegment is adjacent to a convex region or else each line/linepair is inserted with a single arc between line segments.Although for a convex region with a single convex point,the aforementioned rules are followed without exceptionhowever, for a concave region with a single concavepoint, as shown in Fig. 4, an arc is inserted between twoarcs.

3.1. Curve fitting for convex regions

For line segments in a convex region as shown in the firstpart of Fig. 5, the beginning and the end segments are fittedby the single arc line approximation method and thesegments in the middle are fitted by the biarcs fittingmethod.

The tangent of the joining point of two successivesegments, which is a required given condition for both

S.-H.F. Chuang, C.Z. Kao / Computer-Aided Design 31 (1999) 111–118 113

Fig. 3. Concave and convex regions. (a) Arc fitting curve located at the left-hand side. (b) Arc fitting curve located at the right-hand side.

Fig. 4. Arc fitting on left-hand side for concave region with a singleconcave point.

Page 4: One-sided arc approximation of B-spline curves for interference-free offsetting

biarc and single arc fitting, is calculated by the followingequation:

Ti � Pi 2 Pi21

iPi 2 Pi21i1

Pi11 2 Pi

iPi11 2 Pii;

wherePi is the joining point,Pi21 the point before the join-ing point, andPi11 the point after the joining point.

3.2. Curve fitting for concave regions

For the segments in a concave region, as shown in thesecond part of Fig. 5, when a segment is adjacent to aconvex region, the segment is fitted by single arc fittingbetween line and arc method, and the other line segmentsare fitted by fittings between line and line segments. For aconcave region with a single concave point, as shown in Fig.6, single arc fitting between two arcs is used.

From the aforementioned description of obtaining aG1

continuous curve fitting without interference for a B-splinecurve, the method is summarized as follows. At first, theconvex hull property is used to obtain approximating linefitting. Depending on the chosen side and the direction ofrotation, a line fitting curve is subdivided into convexregions and concave regions. For segments in convexregions, biarcs fitting and line approximation of single arcfitting are used. For segments in concave regions, single arcfittings of fitting between line and arc, line and line, arc toarc are used to generate an arc fitting curve. Using the afore-mentioned methods, theG0 approximating curve can bereplaced by aG1 continuous approximating curve. The

new fitting curve is smoothly connected by arcs and linesneither crossing the line fitting curve nor the original B-spline curve.

4. Arc fitting

Replacing line segments with arcs for curve fitting, thedegree of smoothness can be elevated toG1 continuity fromG0 continuity. In order to fit arcs withG1 continuity andwithout crossing the composing line segments, circularbiarcs fitting and single arc fitting are applied dependingon the fitting conditions. Different fitting conditions requir-ing biarcs fitting and single arc fitting are described infollowing sections.

4.1. Biarcs fitting

For known positions and tangents at two ends of a curvesegment, two arcs are joined to match such given conditionsso that the two arcs approximate the given curve segment.The method is called biarcs fitting [1,10,11,22]. The aim ofthe biarcs fitting quoted in this research is to fit a curvesegment without inflection point so that the fitting arcsoccur only at one side of the given line segment, i.e., fittingwithout interference. As shown in Fig. 7, biarcs are used tosatisfy the given conditions of end positionsP1 andP2, andend tangentsT1 and T2. Six variables of two arcs, whichremain to be determined are restricted by five constraints.They are the two end positionsP1�X1;Y1�, P2�X2;Y2�, twoend tangents and the common tangent of the two arcs at thejoining point. An infinite set of pairs of arcs can satisfy suchconditions. Within all of these candidates, there is a pair ofarcs, which have the minimum difference of the two radii,R1

andR2. With this additional condition, the biarcs fitting canbe uniquely determined. The curve segment betweenP1 andP2 is thus fitted by two arcs: the arc with starting pointP1,end pointPt and the radiusR1, and the other arc with startingpoint Pt, end pointP2 and radiusR2.

Parkinson et al. and Schonherr explain that suitable arcscannot be found satisfying the condition of minimizing thechange in radius when one angle between the tangent andthe chord line is much larger than the other [14,19]. Schon-herr’s method to determine the radiir1 and r2 of a biarc

S.-H.F. Chuang, C.Z. Kao / Computer-Aided Design 31 (1999) 111–118114

Fig. 5. Arc fitting on left-hand side for convex regions and concave regions.

Fig. 6. Arc fitting on left-hand side including fitting between two arcs for aconcave region with single concave point.

Fig. 7. Biarcs fitting.

Page 5: One-sided arc approximation of B-spline curves for interference-free offsetting

curve by imposing the conditionr1 sinf1 � r2 sinf2,wheref1 andf2 are the angles subtended by the circulararcs at their centers, is adopted in this article. Schonherr’smethod, which suffices our need, results in two arcs ofnearly equal length and the result is close to the solutionof minimizing the strain energy [19].

4.2. Single arc fitting

For a given fitting with line segments, which isG0 contin-uous, each time a circular arc is inserted to replace and toapproximate all or part of one line segment to achieveG1

continuous without crossing the given curve. Depending onthe given objects (lines or arcs) in the neighborhood of thefitting segment, four types of single arc fitting proposed forthe fitting purpose are line approximation, fitting betweentwo arcs, fitting between a line and an arc and fittingbetween two line segments. They are further explained asfollows.

4.2.1. Line approximation (at the end of a convex region)For a given two end positions of a line segment and a

tangent at one end, line approximation is used to fit a singlearc to match such end conditions. The fitting arc approx-imates and replaces the line segment as a fitting segment.As shown in Fig. 8, the given line segment has end posi-tionsP1�X1;Y1� andP2�X2;Y2�, and tangentT1 given at endP1. The fitting arc has three unknowns: center (Xc, Yc) andradius R. The arc with radiusR, starting from P1 andending withP2, is thus fit to approximate the line segmentP1P2.

4.2.2. Fitting between two arcsFitting between two arcs is to insert an arc between two

connected arcs so that the fitting arc has the same tangentwith the given arc at each end. As shown in Fig. 9, there aretwo connected arcs. A length shorter than both the chordlengths of the two arcs is arbitrarily chosen as the radius ofthe fitting arc, which is tangential to the two connected arcsat its two ends. The two tangent points are used to redefine

the two connected arcs. Therefore, the new fitting arc andthe two redefined connected arcs are joined withG1 conti-nuity which replace the original two arcs that areG0

connected. As shown in Fig. 9, two arcs are connected atpoint theP2 with G0 continuity. A new arc with radiusr,which is a length shorter than bothP1P2 andP2P3, is fittedto produce two tangent pointsPt1 and Pt2. The newlyconstructed fitting curve withG1 continuity is thuscomposed of three arcsP1Pt1, Pt1Pt2 andPt2P3.

4.2.3. Fitting between line and arcFitting between an arc and a line segment is to insert an

arc so that the fitting arc is, at its two ends, tangent to thegiven arc and the line segment. As shown in Fig. 10, a linesegment and an arc of the connectedG0 continuous curve isreplaced by an arc and a line segment with an additionalfitting arc, so that the composition curve hasG1 continuity.An arc with radiusr, which is arbitrarily chosen as a lengthshorter thanP1P2 andP2P3, is fitted to produce two tangentpointsPt1 andPt2. The newly constructed fitting curve withG1 continuity is thus composed of two arcsP1Pt1, Pt1Pt2and a line segmentPt2P3.

4.2.4. Fitting between two line segmentsFitting between two line segments is to fit an arc between

two G0 continuously connected segments so that the fittingarc is tangent to the two given line segments at its two ends.As shown in Fig. 11, there are two line segmentsP1P2 andP2P3. An arc with radiusr, which is arbitrarily chosen as alength shorter thanP1P2 andP2P3, is fitted to produce twotangent pointsPt1 and Pt2. The newly constructed fittingcurve with G1 continuity is thus composed of one arcPt1Pt2 and two linesP1Pt1, Pt2P3.

For the cases discussed in Sections 4.2.2–4.2.4, smallerradii are used to find the inserting arcs when the joining arcs,using an arbitrarily chosen radius, do not exist.

S.-H.F. Chuang, C.Z. Kao / Computer-Aided Design 31 (1999) 111–118 115

Fig. 8. Line approximation.

Fig. 9. Fitting between two arcs.

Page 6: One-sided arc approximation of B-spline curves for interference-free offsetting

5. Achieving the required tolerance

If the error of the arc fitting curve cannot satisfy therequired tolerance, the Bezier curves are subdivided toobtain a more accurate approximating curve fitting ofline segments. Subsequently, a new arc fitting curve willapproximate the B-spline curve better. The criterion toestimate the fitting error of an arc fitting curve is describedas follows.

The error of an arc fitting curve is caused by the fittingerror of line segments plus the fitting error of arcs. EachBezier curve can be recursively subdivided to reduce theapproximation error. Subdivision continues until the errorsatisfies a designated tolerance. The line fitting error can beestimated by the size of the convex hulls of Bezier curves[5]. Two types of line fitting error are shown in Fig. 12.

The error is estimated from the base line of a Bezier curveto the farthest distance of points on the convex hull. A baseline is the straight line passing the two control points withthe largest and the smallest indices on a convex hull. Indicesof control points are the numbers used for recordingsequence order in constructing a Bezier curve. There aretwo types of relative positions of vertices with respect tobase lines in search of fitting errors. They are explained asfollows:

Type1: If all control points on a convex hull are on thesame side of the base line, as in Fig. 12(a), an upper boundfor the error is evaluated by finding the maximum distanceto the base line among the control points.

Type2: If control points are distributed on the two sidesof the base line, as in Fig. 12(b), an upper bound for the erroris obtained by the sum of the two maximum distances of thecontrol points on the two sides of the base line. Ifb1 andb2

are moved very close to each other inb0b3 direction, itbecomes obvious that the fitting error approaches the sumof the two maximum deviations between the control pointson the two sides of the base line.

As a Bezier curve always passes through its two endcontrol points and the curve deviating from the base lineis confined by the convex hull, the distance the curvedeviates from the convex hull boundary will not bemore than the errors defined by Types 1 and 2. Thesetwo types of errors describe the maximum deviations ofconvex hulls from the corresponding Bezier curves. Atthis point, the accuracy of cut for generated paths is esti-mated based only on the curve approximation, and not ontool sizes.

The arc fitting curve further deviates from the B-splinecurve by an error between the fitting arcs and their corre-sponding line segments. The error caused by a fitting arc fora line segment is shown in Fig. 13(a). The error for the casesof arcs joining line/line, line/arc or arc/arc pairs is calculatedby measuring the distance from the joining point to thejoining arc. The errors for such cases are shown in Fig.13(b)–(d), respectively.

The total error is the sum of the line fitting error plus theerror resulting in the fitting of arcs replacing straight linesegments. Therefore, an upper bound for the total error is thesum of the upper bound for line fitting plus the arc fittingerror.

S.-H.F. Chuang, C.Z. Kao / Computer-Aided Design 31 (1999) 111–118116

Fig. 10. Fitting between line and arc.

Fig. 11. Fitting between two line segments.

Fig. 12. Estimation of line fitting error. (a) First type. (b) Second type.

Page 7: One-sided arc approximation of B-spline curves for interference-free offsetting

6. Implementation and examples

The method described earlier has been implemented tooffset the boundary curve of a pocket for tool path genera-tion. Non-interference offsetting usually is a requirement forapplications in tool path generation of rough cut and robotpath planning of collision avoidance. An arc fitting curvegenerated by this method isG1 continuous and non-interfer-ing and if the offsetting distance is smaller than all the radiiof the fitting arcs in the concave regions, then the offsetcurve is stillG1 continuous.

For the B-spline curve shown in Fig. 14, a one-sided linefitting curve which does not cross the B-spline curve isgenerated by the convex hull method [5]. ThisG0

continuous curve has abrupt direction changes, whichoccur at joints from segments to adjacent segments. Whenthe arc fitting method is used to produce the approximatingcurve for the B-spline curve, a smooth one sided curve withG1 continuity is produced. A practical example of offset toolpath generation for a mold of knife holders is shown in Fig.15. A very large tolerance relative to a cutter radius shownin Fig. 15, is used only for this purpose so that the charac-teristics of the B-spline curve, arc fitting and line fitting canbe distinguished visually. In practice, the tolerance can beassigned as small as it is required.

Subdivision is required for both the cases in Figs. 14 and15 because the initial Bezier convex hulls are larger than therequired tolerance. Regions of a B-spline curve with largeshape variations require many subdivision when controlpoints are located far away from the base line of a convexhull.

The main purpose of the non-interfering cutting is tomake cutting process as fast and smooth as possible forrough cutting. The rough cut will leave material for finish-ing process which is yet another issue. Thus, in practice, itwill not create a large number of very short arcs for therough-cut process.

For efficient rough-cut process, where accuracy is not theprimary concern, only limited number of line segments areused for approximation and line-segments sometimes meetat a very sharp angle. The smooth path, visually pleasantand smoothly controllable for tool machine controller isonly at the expense of few more arc segments than theconvex hull segments.

7. Conclusions and future work

A method is proposed in this article to approximate a linefitting curve or a B-spline curve by arc fitting. The fittingcurve does not interfere with the original B-spline curve and

S.-H.F. Chuang, C.Z. Kao / Computer-Aided Design 31 (1999) 111–118 117

Fig. 13. Arc fitting errors. (a) Arc fitting error for a line segment. (b) Arcfitting error for line/line pair. (c) Arc fitting error for line/arc pair. (d) Arcfitting error for arc/arc pair.

Fig. 14. One-sided arc fitting and line fitting for a B-spline curve(Tolerance� 60).

Page 8: One-sided arc approximation of B-spline curves for interference-free offsetting

is smoothly connected withG1 continuity. If an offsettingdistance is smaller than fitting arcs, an offsetting curve canalso beG1 continuous. Therefore, the results can be easilyapplied for NC tool path generation, where paths for arcs arethe basic NC command code. This method can also beapplied to generate realistic collision free paths for robotarms. For applications of such path planning, speed,smoothness and non-interfering are the dominating factorsover accuracy.

The method has improved path generation for a linefitting curve or a B-spline curve by providing a smooth,simple and non-interfering arc approximating curve. As anext step, it is worth investigating to reduce the numberof arcs for curve fitting. Applying the similar method on3D surfaces for approximation is another future direction.It is expected that non-interfering path generation of

freeform curves and surfaces can be smooth, simpleand efficient.

References

[1] Bolton KM. Biarc curves. Computer Aided Design 1975;7:89–92.[2] Boehm W. Inserting new knots into B-Spline curves. Computer Aided

Design 1980;12(4):199–201.[3] Boehm W. Generation the Bezier points of B-Spline curves and

surfaces. Computer Aided Design 1981;13:365–366.[4] Choi BK. Surface modeling for CAD/CAM. Amsterdam: Elsevier,

1991.[5] Chuang HS, Lin WS. Tool-path generation for pockets with freefrom

curves using Bezier convex hulls. Int. J. Advanced ManufacturingTechnology 1997:109–115.

[6] Farin G. Curves and surfaces for computer aided geometry design, apractical guide. 2. New York: Academic Press, 1990.

[7] Faux ID, Pratt MJ. Computational geometry for design and manufac-ture. Chinchester, UK: Ellis Horwood, 1979.

[8] Hansen A, Arbab F. An algorithm for generating NC tool paths forarbitrary shaped pockets with islands. ACM Transactions on Graphics1992;12(2):152–182.

[9] Hoscheck J. Offset spline approximation for plane cubic splines.Computer Aided Design 1983;15(5):297–299.

[10] Lee RS, Liang NJ. A study on the application of circular biarcs fittingto numerically controlled machining. J. of the Chinese Institute ofEngineers 1984;7(4):225–232.

[11] Meek DS, Walton DJ. Approximation of discrete data by G1 arcsplines. Computer Aided Design 1992;24:301–306.

[12] Meek DS, Walton DJ. Approximating quadratic NURBS curves byarc splines. Computer Aided Design 1993;25:371–376.

[13] Ong CJ, Wong S, Loh HT, Hong XG. An optimization approach forbiarc curve fitting of B-spline curves. Computer Aided Design1996;28(12):951–959.

[14] Parkinson DB, Moreton DN. Optimal biarc-curve fitting. ComputerAided Design 1991;23:411–419.

[15] Piegl L. Curve fitting algorithm for rough cutting. Computer AidedDesign 1986;18:76–82.

[16] Piegl L, Tiller W. Curve and surface construction using rational B-splines. Computer Aided Design 1987;19(9):485–498.

[17] Pham B. Offset approximation of uniform B-splines. Computer AidedDesign 1988;20(8):471–474.

[18] Rogers DF, Adams JA. Mathematical elements for computergraphics. New York: McGraw-Hill, 1990.

[19] Schonherr J. Smooth biarc curves. Computer Aided Design1993;25(6):365–370.

[20] Sedgewick R. Algorithms in C11. Reading, MA: Addison-Wesley,1992.

[21] Tiller W, Hansen E. Offset of two dimensional profiles. IEEE Compu-ter Graphics and Applications 1984;4(9):36–46.

[22] Yeung MK, Walton DJ. Curve fitting with arc splines for NC tool pathgeneration. Computer Aided Design 1994;26:845–849.

S.-H.F. Chuang, C.Z. Kao / Computer-Aided Design 31 (1999) 111–118118

Fig. 15. Tool paths for a mold of knife holders (The numbers indicate thesequences of tool engagements during machining process). (a) Offsettingcurves using line fitting (G0 continuous, tolerance� 10 mm, cutter radius�7 mm, cutter overlap� 20%). (b) Offsetting curves using arc fitting (G1

continuous, tolerance� 10 mm, cutter radius� 7mm, cutter overlap�20%).