Compound surface modelling and machining

Compound surface modelling and machining

Compound surface modelling and machining B K Choi, C S Lee, J S Hwang* and C S dun A method is presented for modelling and machining 'compound surface...

707KB Sizes 5 Downloads 77 Views

Compound surface modelling and machining B K Choi, C S Lee, J S Hwang* and C S dun A method is presented for modelling and machining 'compound surfaces' commonly found in die cavities and punches. A collection of topologically unrelated surface elements specified in a domain o f interest is termed as a compound surface. A constructive solid geometry scheme is employed to model compound surfaces that consist of planar surface elements, general quadratic surface elements, and composite parametric surfaces. Implementation strategies as well as computational details are presented. A prototype modelling system has been implemented on an IBM PC A 7-. It took less than five minutes to generate cutter location data for a compound surface of realistic complexity. surfaces, compound surfaces, NC machining, domain, primitives

A surface is the image of a sufficiently regular mapping of a set of points in a plane (domain) into a 3D space I and is expressed as

r (u, v) = (x (u, v), y (u, v), z (u, v))

(i)

where u and v are the parameters of the surface. If the surface is defined on a bounded domain, it is called a surface patch or simply a 'patch'. An assembly of patches with prescribed interpatch continuity conditions is called a 'composite surface '=. Usually there are implicit topologies among the constituent patches, as in Ferguson composite surfaces. In the literature 3 the term 'compound surface' has been used to describe a collection of topologically unrelated surface elements specified in a domain of interest. The same definition of compound surface is followed here with the interpretation that the 'surface elements' are composite surfaces. A composite surface may consist of a single patch. When the domain of a surface is the xy-plane of the given Cartesian coordinate system, the parametric surface equation given by equation (1) reduces to z =

f(x,y)

(2)

It is in an explicit function form and is called a nonparametric surface equation. Now consider an analytic function

g(x,y,z) : 0

(3)

then this gives an implicit surface equation. If g(x,y,z) is a linear function it becomes a plane equation; if g(x,y,z) is a polynomial of degree 2 then it gives a quadratic surface. It is a layman's convention that a surface represented by equation (3) is called an 'analytic surface', and one repreDepartment of Industrial Engineering, Korea Advanced Institute of Science and Technology, PO Box 150, Cheongryang, Seoul, Korea. *Currently at Hyundai Motor Co., Woolsan, Korea

volume 20 number 3 april 1988

sented by equation (1) is called a 'sculptured surface'. Note that equation (2) is a special case of equation (3) and that equation (3) can be changed to equation (2). A surface that consists of analytic surface elements (equation (2) or equation (3)) is called an 'analytic compound surface', and one that consists of sculptured surface elements (equation (1)) is called a 'parametric compound surface'. Examples of compound surfaces are shown in Figure 1. The analytic compound surface treated in this paper consists of a base surface and several clusters of analytic surface elements locally defined on the base surface. The base surface, however, is allowed to be a parametric composite surface. This paper presents a surface modelling method for numerical control (NC) machining of analytic compound surfaces. (Hereafter the term compound surface will be used to mean the analytic compound surface.) Solid modelling systems can be divided into two categories, depending on the datastructure used in defining objects 4,s. Constructive solid geometry (CSG) modellers represent the objects by a tree structure, whose leaves are volumetric primitives and whose nodes correspond to Boolean operations. Boundary representation modellers store topological and geometrical information about the boundary of the object. A CSG-like scheme is employed to model compound surfaces that consist of planar surfaces, general quadratic surfaces, and a composite parametric surface. The issue of machining compound surfaces was handled by Duncan and Mair 3. They partition the domain of a compound surface into a set of disjoint sections, and, for each section, explicit equations of surface elements belonging to the section are obtained. For a point on the domain (xy-plane), the equations are solved to obtain z values. Among the z values obtained for an xy point, the maximum one is selected. This approach is called the highest point method. One drawback of this approach is that the user has to define all the surface equations and explicitly solve the surface equations. Bobrow 6 describes a method of generating NC tool paths for CSG representations. A portion of a solid object to be machined is sectioned by a series of planes (using standard sectioning routines available in the solid modeller) to obtain cutter contact points. The cutter path generation method used in this paper is similar to the one used by Bobrow. To generate a cutter contact point, the intersection point between a vertical line (a point on the xyplane) and the compound surface is computed together with a surface normal vector at the point. One implication of the difference (i.e. plane intersection versus line intersection) is that cutter paths can be planned by following the isoparametric curves of the base surface. The issue of modelling compound surfaces is receiving increasing attention from solid modelling researchers. Some forms of sculptured surface techniques are being integrated into increasing numbers of solid modelling systems s .

0 0 1 0 - 4 4 8 5 / 8 8 / 0 3 0 1 2 7 - I 0 $03.00 © ] 988 Butterworth & Co (Publishers) Lid

127

b a Figure 1. Analytic and parametric compound surfaces

In Figure 2, the z value of the compound surface for a point x = x l on the domain needs to be determined. zb, Ze, and Zr are intersection points for the base surface, the ellipse primitive, and the rectangle primitive, respectively. From the Boolean expression of equation (4), the following expression is defined to obtain the z value of the compound surface

Z

z s = min (Zr, max (Ze, Zb))

Xi

D-X

Figure 2. Boo/ean representation o f compound surface

(S)

Observe that the sum operator in equation (4) becomes the max operator in equation (5) and the difference operator becomes the min operator. If the vertical line does not intersect with a primitive, then the primitive is omitted from equation (4) and the expression of (5) is changed accordingly.

NC MACHINING OF COMPOUND SURFACES REPRESENTATION OF A N A L Y T I C COMPOUND SURFACES Figure 2 shows a 2D version of a compound surface. The compound surface consists of a base surface and a cluster of linear and elliptic surface elements. The compound surface S might have been constructed as follows: define the base surface B, add the ellipse E, and subtract the rectangle R. The expression of this construction sequence by using Boolean operators gives S = Base + Ellipse - Rectangle

(4)

Once a compound surface is specified by using a Boolean expression, it is easy to evaluate a point on the surface. Here the z value of the compound surface for a given point on the domain needs to be determined. First, a vertical line that passes through the point on the domain is constructed. The next step is to find intersection points between the vertical line and each of the CSG primitives. In Figure 2, the ellipse and the rectangle are CSG primitives. A CSG primitive is regarded as a closed surface instead of a solid. It is required that a CSG primitive be convex so that there are at most two intersection points between the vertical line and a primitive. When there are two intersection points, the upper one is taken to be an added(+) primitive and the lower one a subtracted(-) primitive. In Figure 2, the ellipse is an added primitive and the rectangle a subtracted primitive. The vertical line intersects with the base surface only once. The final step is to choose one intersection point based on the Boolean expression of the compound surface.

128

The term 'descriptive geometric model' (DGM) is used to designate the geometric shapes described in a drawing, and when the geometric information is stored in a computer it is called a 'computational geometric model' (CGM). It is still common practice to machine die cavities of compound surfaces by tracing out plaster templates. The problem with this mode of machining, which is called copy milling, is that physical models are expensive and time consuming to make. Dimensional tolerances are also less than satisfactory. As shown in Figure 3, the role of a CGM in NC milling

~

~escriptive~~

Figure 3. Methods of machining compound surfaces

computer-aided design

For a three axis NC machine, the cutter axis vector u = (0,0,1). Detailed discussions on tool path generation methods will be presented later.

AN IMPLEMENTATION EXAMPLE

rL/(I

I I I

¢

,////////

-

y

/x< "/,////// X

Figure 4. CL-data for compound surface machining

Pl

P3 Pa

piV - ~

P2

P2

Vl

I

V~

Pi Figure 5. CSG primitives for compound surface modelling is similar to that of physical models in copy milling. As the role of the CGM is to produce NC codes for the machining of compound surfaces represented as a DGM, the structure of the CGM should be designed such that the CGM of compound surfaces is easily obtained from the DGM and cutter location data (CL-data) is easily generated from the CGM. A CL-data item consists of a position vector that represents the location of the tip (bottom centre) of a cutter and its axis vector. In compound surface machining, cutter paths are planned on the domain (xy-plane) of the surface. As shown in Figure 4, a point P on the xy-plane is selected, and then a vertical line is defined at P. If the vertical line intersects with the surface at re, this point becomes a cutter contact point. The surface normal vector n at the cutter contact point also needs to be calculated. The (re, n) pair will be called cutter contact data (CC-data). For a ballendmill cutter with a radius R, CL-data is related to CC-data as follows (see Figure 4):

rL + RU = rc + Rn (rE, u): CL-data (re,

n):

CC-data

volume 20 number 3 april 1988

(6)

A compound surface modelling system has been implemented. The program is written in Fortran 77 to be run on an IBM PC AT. There are 11 CSG primitives in the modelling system, as shown in Figure 5. The top four primitives are polyhedron types and are named tetrahedron, triangular prism (or truncated tetrahedron), pyramid, and rectangular prism (or truncated pyramid). A polyhedron type primitive is specified by its vertex points. Simplified inputting options are also available. For example, a prism may be defined by its base polygon and height. The rest of the primitives in Figure 5 are quadratic surface types. The four primitives in the middle are regular cone, regular cylinder, elliptic cone, and elliptic cylinder, respectively. The last three are sphere, ellipsoid, and paraboloid. The base surface is a composite surface of parametric bicubic patches (i.e. a Ferguson surface 2). More primitives may be added, if necessary, as long as they are convex. As discussed earlier, the primitives are treated here as closed surfaces which a vertical line intersects no more than twice. Another requirement is that the computation of the z value and the surface normal vector for a given (x,y) value be efficient. The following sections describe how the computations (of CC-data) are carried out. The input text file that defines the analytic compound surface given earlier in Figure l(a) is listed in Figure 6(a). As shown in Figure 6(b), there are six solid primitives (two polyhedron types and four quadratic types) and a base surface, which is a composite parametric surface that consists of 10 x 10 bicubic patches. The primitive S2, for example, is a regular cylinder (R-CYLI) as defined at the beginning of Figure 6(a). The regular cylinder in this case is defined by the reference point P1 (see Figure 5), the axis vector NOR, and the radius (RAD) and length (LEN) of the cylinder. Ss and S7 are rectangular prisms (4-PRIS) and are defined by vertex points. A display of the defined surface is shown in Figure 6(c). In the example, the machining area (MACHI-DEF) is limited to 1 ~< x ~< 39 and 1 ~
CALCULATION OF C C - D A T A ON POLYHEDRON PRIMITIVES All the polyhedron primitives are internally stored as a boundary file. Figure 7 shows the datastructure and topological information for a tetrahedron primitive. The coordinate values of vertex points are stored in the array Vertex. An edge is a directed line that connects two vertices. This topological information is stored in the first two columns

129

SOLID-DEF S2,R-CYLI,2 PI,20,20, -I NOR,O,O,I RAD,15 LEN,6 P1,20,20,0 RAD,12 $5,4-PR IS, 1 P1,15,5,7 P2,15,13,7 P3,25,13,7 P4,25,5,7 P5,15,2,0 P6, 15,13, 0 P7,25,13, 0 P8,25,2,0

S7,4-PRIS, 1 P1,15,35,9 P2, 25,35,9 P3, 25,28,9 P4,15,28,9 P5,15,35,0 P6,25,35,0 P7,25,28,0 PS, 15,28,0 $8, E-CONE,1 PI, 20,20,9 P2,20,20,30 LVE,I,O,O L-R,8 S-R,4

BSURF-DEF II,]I O, O, 4, O, 8 O, 12 O,

0.0 0.8 1.4 I. 9

24 28 32 36 40 0 4, 8, 12, 16, 20,

2.2 1.9 1.4 0.8 0.0 0.5 1.3 1.9 2.4 2.7 3.0

0:

0, O, O, 0, 0, 4, 4, 4, 4, 4, 4,

BOOLE-DEF B+S2+$3+S5-S7+$8-$9 ~CHI-BEF X-RBG,I, 39 Y-RBG,I, 39 X-INT, .8 Y- IBT,.8 TOLER,.02

b

S9,RCYL,1 PI,20,20,14 P2,20,20,15 RAD,6 a

Figure 6. A n implementation example

of the array Edge. Also stored are the coefficients of edge equations of the form ax + by + c = O

(7)

Observe that if a 2D point (x,y) is located on the left side of the edge then (ax + by + c) > 0. The edge equation represents the projected image of the edge. The Appendix gives more details. A face is bounded by an anticlockwise sequence of edges El, E2, • • . , which are stored in the first four columns of the array Face. In our case, a face can have up to four edges. A face is defined by an implicit equation dx + ey + fz + g = O

(8)

The normal vector n = (de f) must be a unit vector and its direction points outward from the polyhedron. It is trivial to determine the coefficients of equation (8) from three

130

vertex points belonging to the face. The above definition of a face ensures that (dx + ey + fz + g) < 0 if a point (x,y, z) is inside the convex polyhedron. Also stored are the limiting values o f x andy in an array Limit to define a majorizing area for the projected image of a polyhedron. The topological information in the arrays Edge and Face are predetermined for each polyhedron primitive. Now the procedure of calculating CC-data can be described. The first step is to check if the input point (x,y) is inside the majorizing area. If it is outside the majorizing area, the vertical line that passes through the input point does not intersect with the polyhedron. When the majorizing area test is positive the next step is to find the intersection point. If the polyhedron is an 'added primitive' then only the faces that are visible from above are tested. The sign of ' f ' (see Face in Figure 7) is positive for a visible face. If the polyhedron is a 'subtracted primitive' then only the invisible faces are tested. For simplicity

computer-aided design

4

Vertex I

x

y

Foce

Edge

a

b

c

I

-I

5

-3

4

2

I

4

-8

2

3

3

3

6

-4

2

4

4

2

-6

-5

I

3

6 3

4

z

I

2

2

I

3 4

d

e

f

g

3 5

I

2

Figure 7. Topological information for a tetrahedron

I

/_

P



Cone (a = b for regular cone) o side: (x/a) = + (ylb)2 = (1 - z l h ) 2 ; O < ~ z < h o bottom: -z = 0; (x/a) 2 + (y/b): <~ 1 • Cylinder (a = b for regular cylinder) o side: (x/a)2 + (y/b): = 1; O<~z<~h o t o p : z - h = 0; (x/a) = + (.v/b): <~ 1 o bottom: - z = 0; (x/a) = + (y/b) = <~ 1 • Ellipsoid (a = b = c for sphere)

o (x/a): + (y/b) 2 + (z/c) 2 = 1 •

--

t--

--~

~-I -

a

Figure 8. Grid array and edge detection a Pascal-like procedure is introduced: Procedure CC-Data (x, y, sign, z, n,j, Found);

//x,y : input coordinate values// //sign: +1 for an added primitive, -1 for a subtracted one// Found := False; if (x,y) falls outside of LIMITs then return; for all FACEsj do begin if (sign * f ) > 0 then begin for all EDGEs of F A C E j do if f * ( a x + b y + c ) < 0 then goto Skip; Found := True; z := - (dx+ey+g)lf; n := (d,e,f); return; end;//if// Skip://a jump location// end;//for// The above procedure returns the z value, unit normal vector n, and index of the face j (this information is used later) where the intersection point was found.

COMPUTATION

OF CC-DATA

ON QUADRATIC

PRIMITIVES

As shown in Figure 5, there are seven primitives of quadratic type. They are regular and elliptic cones, regular and elliptic cylinders, sphere, ellipsoid, and paraboloid. Some of the primitives are defined by cutting off the quadratic surfaces with planes perpendicular to the axis. If 'h' is the height of the truncated primitives, then the following equations define the primitives at their zero positions. The equations at zero position are sometimes called 'standard equations 'I .

volume 20 number 3 april 1988

Paraboloid of revolution (as = 4 f and f is the z value at the focus) o side: (x/a) 2 + (y/a): = z ; O<~z<~h o top: z - h = 0; (x/a) 2 + (y/a) 2 <~h

Note that up to three parameters are needed to define a primitive. The primitives are in fact located in 3D space, and up to three vectors are needed to specify the position and orientation of a quadratic primitive. The quadratic equations in 3D space are obtained from the standard equations by using homogeneous transformations 7. From the results in the Appendix it is easy to derive quadratic equations in 3D for each of the primitives from the standard equations. For example, the standard equation of an ellipsoid is (u/a) = + (v/b) = + (wlc) = = 1

(9)

and a quadratic equation of the ellipsoid in 3D becomes

(x.nx +y.ny +z.nz + tx)2/a 2 + (x. ox + y . o y

+Z. Oz + t y ) = l b 2

(10)

+ (x.a x + y . a y + Z . a z + tz)=/c = = 1

To determine the z values on the ellipsoid for a given (x,y) point, equation (10) is rearranged to become a quadratic equation of z and then the roots are computed. If two real roots are obtained, the maximum of the two is selected for an added primitive. When the primitive is a subtracted one, the minimum is selected as the z value. Once the (x,y,z) value is determined in this way, the surface normal vector at the point is obtained by taking partial differentiations of equation (10) with respect to x, y, and z. The CC-data for other primitives are also obtained by following the same steps. As indicated in Figure 5, an ellipsoid, for example, is defined by three scalars (a, b, c) and three vectors (PI, V l , V=). This information is stored in an array Indata. The transformation matrix to be stored in an array Transform is obtained as follows a=V=/IV=l;

o=V1/IV11;

n:oxa;

P:PI

t = -(n.p, o-p, a.p)

131

nI

n2

t surfece z = f (x, y) Tool pofh on surfeee

I I

I I

I I

I I

I

I

I

I

Tool path planned on xy- plane X

Figure 9. Cartesian tool path planning As the computation of CC-data is time consuming, the projected image of each primitive is majorized by four lines whose equations are stored in an array Limit. If a candidate point falls outside the majorizing area, the CC-data is not computed.

C O M P U T A T I O N OF C C - D A T A ON T H E P A R A M E T R IC BASE SUR F A C E A parametric surface is represented by a vector equation of two parameters r(u,v) = ( x ( u , v ; , y ( u , v ) , z ( u , v ) ) To find the z value for a given point (Xo,Yo), the following simultaneous equations have to be solved first

x(u,v) =Xo ; y ( u , , , ) : y o An iterative Newton-Raphson employed as follows:

search method may be

u = u o , v = Vo (initial values) • Solve the simultaneous linear equations for du, dv •

Xo = x ( u , v ) + du xu(U,V) + dv xv(u,v) Yo = y ( u , v) + du yu(u, v) + dv yv(u, v) • u=u+du; v=v+dv • If (xo - x ( u ~ v ) ) 2 + ~v o - y ( u , v ) ) ~ < e then stop

obtain CC-data on the base surface, obtain CC-data for each polyhedron primitive, obtain CC-data for each quadratic primitive, select a CC-data using equations (1) and (2) (see Table 1), o (v) store the CC-data in a grid array (see Figure 8). • (g) Detect edges of the compound surface (see Figure8). • (h) Convert each CC-data to CL-data using equation (3). o o o o

O) (ii) (iii) (iv)

In the above procedure, steps (e) through (g) need additional explanations. The compound surface defined in Figure 6, for example, consists of a base surface and six CSG primitives. The base surface is a Ferguson surface (Fergu), the primitives $2 and $9 are regular cylinders (Rcyli), S3 is a sphere (Spher), Ss and $7 are rectangular prisms (Rpris), and Ss is an elliptic cone (Econe). The compound surface was defined by the Boolean expression

B+S2 +S3 +Ss -$7 +$8 -$9 As shown in Table 1, a Boolean operation table is constructed to hold this information. If a rectangular domain is assumed, a regular grid is defined over the domain. In step (f), CC-data is obtained for each grid point, and then it is stored in a grid array (see Figure 8). Also stored in the grid array are the surface number, index (row number) of the Boolean operation table, and the face number for the CC-data. Step (g) is not essential but is very useful in rendering the modelled surface and checking possible cutter interferences during the machining of the surface. Figure 8 shows a portion of the grid array where a regular cylinder is protruded on a planar surface. The grid points inside the dashed circle of Figure 8(a) represent the CC-data on the regular cylinder, and the rest were sampled from the planar surface. By scanning through the ith row of the grid array, the change of face numbers between the points P and Q is detected. Figure 9(b) shows a cross-sectional view of the compound surface along the path i. Then a repeated midpoint sampling scheme is employed to obtain a pair of CC-data on the edges as indicated in the Figure. In Figure 8, the original grid points are indicated by small circles and the points on the edges by small squares.

else goto step (b). The above search procedure is in fact a special adaptation of the search method used by Scherer and Hillberry s and is very efficient for bicubic composite surfaces. Once the parameter values are determined the z value and the surface normal vector at the point are easily obtained by evaluating the surface equation and its derivatives.

O V E R A L L P R O C E D U R E OF T H E S U R F A C E MODELLING SYSTEM The overall procedure of our compound surface modelling system consists of the following steps (modules): • • •

(a) Interpret input part program (see Figure 6(a)). (b) Determine Q matrices 2 for basic surface. (c) Determine datastructure (see Figure 7) for polyhedron primitives. • (d) Determine datastructure for quadratic primitives. • (e) Set up a Boolean operation table (see Table 1). • (f) For each grid point P(x,y) on the domain do

132

C U T T E R P A T H G E N E R A T I O N FOR C O M P O U N D SUR F A C E M A C H I N I N G In the previous sections the issues in cutter path generation for 3D surface machining were intentionally avoided. In machining sculptured surfaces in general the following issues should be addressed:

Table 1. Boolean operation table and CC-data Obtained CC-data

Primitives ID

Type

Boolean

Bsurf

Fergu

+

S2

Rcyli

+

$3

Spher

+

S5

Rpris

+

57

Rpris

-

$8

Econe

+

S9

Rcyli

-

Face

z

n

computer-aided design

is called the CC-Cartesian method (CC = cutter contact) and the latter the CL-Cartesian method (CL = cutter location). As given by equation (6), the offset surface for a ballendmill cutter with a radius R is expressed as ro = r + R

PIV P2 a

o

b

Figure I0. Estimation o f cutting error

• tool path planning • step lengths along the tool paths • path intervals (i.e. distance between adjacent paths) • gouging problem (i.e. anti-interference machining) This section shows how the above issues can be handled in our compound surface modelling system.

Tool path planning Tool path planning means determining methods of guiding (or driving) a cutting tool to generate the desired surface from a solid block or a preformed raw stock. Commonly used tool path planning methods are • to introduce explicitly tool guiding surfaces (drive surfaces) • to plan tool paths on the xy-plane of a Cartesian coordinate and • to plan tool paths on the parametric space The first approach is used in APT III 2 and is called the APT-based tool path generation method. In APT, the surface to be generated is called the part surface, and cutter passes are defined by means of a series of intermediate drive surfaces. The basic idea here is that the cutter is moved in one direction while maintaining contacts with both the part surface and drive surface. At each stepping point iterative numerical searches are made to locate the cutter position within a specified tolerance limit. The main disadvantage of this method is that the iterative computation is time consuming and unstable. This tool path planning method is not suitable for use in machining compound surfaces because there is no guarantee of convergence for irregularly curved sculptured surfaces ~ . The second approach is sometimes called the Cartesian machining method, and the third approach, the parametric machining method. The parametric tool path planning method can only be used for parametric surfaces of the form r = r(u, v). As the compound surface here is a nonparametric surface defined in the form of z = f(x,y), the Cartesian machining method is the only choice. In the Cartesian tool path planning method, it is common practice to plan the tool paths to be parallel straight lines on the xy-plane. By projecting the straight lines back to the surface, actual tool paths on the part surface are obtained, as depicted in Figure 9. It is equivalent to finding intersection curves between the part surface and vertical planes. In fact, the sectioning planes could be general planes (not necessarily vertical planes). This plane-sectioning method was used by Bobrow 6 in his so-called parametric tool contact curve approach. Two choices are possible in the Cartesian machining approach: the part surface can be intersected by vertical planes or an offset surface by vertical planes. The former

volume 20 number 3 april 1988

(n-u)

(11)

where r is the part surface, n is a unit normal vector, and u is a cutter axis vector. When the part surface is a smooth parametric surface such that it admits a continuous, differentiable field of unit surface normal vectors and that the cutter radius does not exceed the smallest concave principle radius of curvature, the offset surface is also a regular parametric surface 1°. However, as there is no accepted mathematical definition of normal offsetting (of the form given in equation (11)) for surfaces that are only piecewise smooth 11, the CL-Cartesian method cannot be used. Based on observations so far, the CC-Cartesian method seems to be the best choice for tool path planning in machining compound surfaces.

Step length determination The issue of determining step lengths along a cutter pass can now be discussed. If a straight line tool path on the x,v-plane is planned, the resulting tool contact curve is a plane curve, which is to be approximated by a sequence of linear segments. Note that the tool contact curve is only piecewise smooth. Initially, a sequence of evenly spaced points are sampled from the straight line on the xy-plane, and then the edge detection procedure (refer to Figure 8) is executed. The choice of the spacing interval ('d' in Figure 9) is subjective, but it is not important to have a best choice. The next step is to check if the deviation error at each step exceeds the prespecified tolerance value ~. A portion of the tool contact curve in Figure 9 is shown in Figure 10(a). The unit normal vectors n l , n 2 in Figure 10 are obtained by projecting the surface normal vectors in Figure 9 on the intersection plane. Figure 10(b) shows the geometric relationships among the radius p of the circular path, cutter radius R, angular displacement ~ between consecutive CC-points, and the overcutting error e. For a convex segment as in Figure 10, the cutting error is expressed as e = (p + R) (1 - cos(~/2))

(12)

The curve segment in Figure 10(a) is not, in general, circular, but can be treated as a circular arc by using the following approximations

p

:

(p, + p~)12

o / : COS- I ( n , . n2)

(13) (14)

In Figure 10(a), 0 is the intersecting point of the two normal vector lines and Pl is the distance between 0 and r i. For a different method of estimating p, refer to Faux and Pratt 2 (p. 264). If a negative R value is used in equation (12), the equations (12) to (14) are also valid for a concave segment. The overall procedure for determining the step length is as follows: Step 1 Sample a sequence of evenly spaced points from the straight line path on the xy-plane (see Figure 9).

133

e z

~

~

~

~

Path interval (2p) . , f , Cutter path I'

~

/

urface

Cusp height (h)

I II I ,



j

I

I

I

=y

i I

I I I ,,

Itl

I

I

I

I

i

I

k=

iJr

14...._ ,

I

i/ ir

x

a

b

Figure 1 I. Determination of path interval

a

b

C

Figure 12. Cutter interference problem Step 2

Step 3

Execute the edge detection procedure (see Figure 8). For each segment, estimate the cutting error using equations (12) to (14). If the estimated error e exceeds the tolerance 6 then insert a midpoint and recursively execute Step 3.

In sculptured surface machining, it is common practice to specify inside tolerances (overcutting) and outside tolerances (undercutting) separately. More details about determining step lengths are discussed in the literature 2'9. Determination

of path intervals

Two adjacent tool paths leave a track of cusps as depicted in Figure ll(a). When the radius of curvature of the part surface to the direction perpendicular to the tangent of the cutter contact curve is p, the distance between paths on the part surface is related to the cutter radius R and cusp height h by the following equation 12

£=

lp I(4 (R + p)2 (h + p)2 _ (p~ + 2 R p + (h +p)2 )2 )i/2

(R + p) (h + p)

lim£ = 2 (h (2R - h ) ) 1/2

(16)

p..-+ oo

As cutter paths on the xy-plane are being planned, the distances between adjacent straight lines on the xy-plane need to be determined so that the maximum cusp height does not exceed the prespecified cusp tolerance h. In other words, the length £ in equation (16), which is the distance in 3D space, has to be projected on the xy-plane. The projected length £p is determined by (refer to Figure 11(b)) £p = £ l e - ( e . k ) k l

(17)

where k = (0,0, 1 ) , e = (n× t ) / I n x t l , t - - - ( n x ( t p x k ) ) / In x (tp x k) l, n is a surface unit normal vector, and tp is a unit direction vector on the &v-plane. To determine the location of the next path on the xyplane, equation (17) is evaluated at all the CC-points on the current path and then the minimum is taken.

(15)

where p > 0 for a convex surface and p < 0 for a concave surface. To use equation (15), the radius of curvature p has to be computed at each CC-point. A method of estimating the radius of curvature is introduced in Faux and Pratt 2

134

(p. 264). When p is large compared with R the following simplication is possible.

D e t e c t i o n and removal of cutter interferences Gouging is one of the most critical problems in NC machining of sculptured surfaces, Unfortunately, however, the gouging problem has not been thoroughly investigated.

computer-aided design

~x

a

b

C

d

Figure 13. Example of removing cutter interferences Currently, the authors are working on the problem. The structure of gouging problems depends on the methods of tool path planning. The APT-based tool path planning methods in principle do not have a gouging problem. Neither does the CL-Cartesian method. But, in these cases, the tool path planning itself becomes unstable when in fact gouging is inevitable due to the irregularities in the part surface. The gouging problem in the CC-Cartesian machining is depicted in Figure 12(a). The CL-point that corresponds to the current CC-point ('test point' in the Figure) interferes with the other side of the part surface. If the sequence of CL-points is connected, it forms a loop as shown in Figure 12(b). In this case, the CL-points inside the segment a - b have to be removed. Another type of gouging is depicted in Figure 12(c). In this case, a new CL-point ('C' in the Figure) has to be inserted. An initial result of the authors' research on the gouging problem is shown in Figure 13. Figure 13(a) represents a compound surface that consists of a base surface (composite bicubic surface) and three spheres. Figure 13(b) shows the cutter paths. Surface normal vectors at the CC-points are also indicated in the Figure. By connecting CL-points on the cutter paths, a considerable amount of gouging is found to be occurring, as shown in Figure 13(c). Figure 13(d) shows that all the cutter interferences have been successfully removed.

virtually all types of surface elements as long as, for a given domain point (x,y), the z value can be found and a surface normal calculated at the point. Second, it is relatively easy to 'code' the compound surfaces described in an engineering drawing. The surface modelling software was found to be quite efficient in terms of execution times. The example given in Figure 6 took less than five minutes on an IBM PC AT (Model 5550). The proposed approach may easily be adopted to the development of an interactive surface design system. The proposed method has some inherent limitations though compared with solid modelling approaches: it requires a domain on which compound surfaces are to be defined, and it does not support the calculation of metrical properties. A research area that deserves immediate attention is the rounding (and filleting) of compound surfaces.

REFERENCES 1

Lipschutz, M M Schaums outline of theory and problems of differential geometry McGraw-Hill, New York, USA (1969)

2

Faux, I D and Pratt, M J Computational geometry for design and manufacture Ellis Horwood, Chichester, UK (1980) Duncan, J P and Mai L S G Sculptured surfaces in engineering and medicine Cambridge University Press, Cambridge, UK (1983)

CONCLUSIONS The compound surface modelling method presented has some definite advantages over solid modelling approaches. First, the method allows the compound surface to have

volume 20 number 3 april 1988

4

Requicha, A A G 'Representations for rigid solids: theory, method, and systems' Comput. Surv. Vol 12 No 4 (December 1980) pp 437-464

135

5

Varady, T and Pratt, M J 'Design techniques for the definition of solid objects and free-form geometry' Comput.-Aided Geometric Des. Vol 1 (1984) pp 207-225

P1 = ( x l , y l , 0 )

Then the coefficients of (7) are calculated as follows:

Bobrow, J E 'NC machine tool path generation from CSG part representation' CompuL-Aided Des. Vol 17 No 2 (March 1985) pp 69-76

r =(P2-P,);

7

Paul, R P Robot manipulators: mathematics, programming, and control M[T Press, USA (1981)

a =n x ; b = n y

8

Scherrer, P K and Hi[Iberry B M 'Determining distance to a surface represented in piecewise fashion with surface patches' Comput.-Aided Des. Vol 10 No 5 (1978) pp 320-324

6

9

J un, C S 'NC machining of sculptured surface from 3D measuring data' MS thesis Korea Advanced Institute of Science and Technology, Seoul, Korea (1985) (in Korean)

10 Farouki, R T 'The approximation of non-degenerate offset surfaces' Comput. Aided Geometric Des. Vol 3 No 1 (1986) pp 1 5 - 4 3 11 Rossignac, J R and Requicha, A A G 'Offsetting operations in solid modelling' Comput. Aided Geometric Des. Vol 3 No 2 (1986) pp 129-148 12 Kim, D H and Choi, B K 'Calculation of economic CL-data for sculptured surface machining' J. KllE Vol 9 No 2 (1983) pp 27-35 (in Korean)

and P2 = (X2,Y2,0)

k =(0,0,I);

n = k × r//vector product// n = n / I n l //normalize//

// x-,y-component of n//

c = - n . P/ //scalar product//

Homogeneous transformations to obtain general quadratic equations Let n, o, and a be the normal (x-axis), orientation (y-axis), and approach (z-axis) vectors of a coordinate frame H, respectively, and let p be the position vector of H. Let u = (u, v, w, 1 )T and r = (% y~ z~ I )T be two homogeneous coordinate vectors that represent the same point in 3D space such that r is defined in the base coordinate and u is defined with respect to H. Then u and r have the following relationships: r = Hu

or

u = H-Ir

In component forms, the above expression is equivalent to u =n.r-n.p v =o.r-o-p w = a-r -a-p

APPENDIX Determination of the coefficients of equation (7) Let P/ and P2 be the projected images of the vertices Vl and V2 such that

136

As the second terms in the above equations represent the translation terms in H -1, a vector t is defined such that t = (tx, ty, tz) = - ( n - p , o.p, a-p).

computer-aided design