【正文】
y a cylinder. Fig. 2. shows the flat endmill aligned with the direction of cutting. Assuming the tool is parallel to the zaxis, and the coordinate system is translated such that the center point is located at the origin. Thus, the implicit function of a flat endmill is: F ( X , Y , Z ) = max{abs ( Z ?L/2 ) ? L/2, X 2 + Y 2 ? R 2 } if Z≥ 0 This implicit function is used to determine whether a voxel is inside, outside, or intersected with the cutter without losing any accuracy. The judgment can be made by inserting the coordinates of the vertices of a voxel into the implicit function. Eqn. (2) describes the relationship between a vertex and the cutter, which is also illustrated in Fig. 3. 0 lie inside the surface = 0 lie on the surface ( 2) 0 lie outsid the surface where R : the cutter radius L : the distance measured from the center point along the cutter axis Fig. 2. Flat endmill and the associated coordinate system Fig. 3. Implicit function used to determine the interior or exterior of a cutter Ball endmills can be represented by the union of a cylinder and a sphere, as shown in Fig. 4. Assuming the tool is parallel to the zaxis, and the origin of the coordinate system is translated to the center of the sphere, the implicit function of a ball endmill can be described as: max{ abs ( Z ) ? L , X 2 + Y 2 ? R 2 } if Z ≥ 0 ( 3) X 2 + Y 2 + Z 2 ? R 2 otherwise where R : the cutter radius L : the distance measured from the center point along the cutter axis Fig. 4. Ball endmill and the associated coordinate system Fillet endmills can be represented by the union of two cylinders and a torus. Assuming the tool is parallel to the zaxis, and the coordinate system is translated to the center point as shown in Fig. 5., the implicit function of a fillet endmill can be derived as: max{ abs ( Z ) ? L , X 2 + Y 2 ?( R+r) 2 } if Z ≥ 0 F ( X , Y , Z )= max{ abs ( Z ) ? L , X 2 + Y 2 ? R 2 } else if abs( X) ≤R ( X 2 + Y 2 + Z 2 +R 2) ?4R2(X 2+ Z 2) otherwise Where R : the radial distance from the cutter axis to the cutter corner center r : the cutter corner radius L : the distance measured from the center point along the cutter axis Fig. 5. Fillet endmill and the associated coordinate system As simple as a flat endmill, or as plex as a fillet endmill, the implicit functions can be used to decide whether a point is inside or outside a cutter by a direct application of Eqn. (2). The use of implicit functions to represent a cutter is not only precise in geometry, simple in concept, and the programming of implicit functions is also very easy and straightforward. Thus, we can easily know the geometric relationship between the stock and the cutter by using the implicit functionF ( X , Y , Z). 4. SIMULATION OF THREEAXIS NC MACHINING After the implicit function of the cutting tool is formulated, an important task that needs to be performed is to determine which voxels need to subdivided or deleted during the milling process. Fig. 6. shows the flow chart of a threeaxis NC path simulation. Fig. 6. Flow chart of threeaxis machining simulation The process of a threeaxis NC path simulation is described as follows. (1) The first step is to read the NC codes. Then for each NC segment, we can get the start and end cutter location (CL) points of a tool motion. Thus, the threeaxis motion is modeled by a joint interpolation of CL points of the configuration of any two tool positions. (2) The bounding box of the cutter is used preliminarily to judge which part of a voxel model the cutter is in contact with. The purpose is to get rid of voxels not in contact with the cutter. If it is determined that a voxel is in contact with the cutter, the voxel vertices will be substituted into the implicit function of the cutter to decide if the voxel vertices lie inside or outside the cutter. (3) If all of the voxel vertices meet the conditions F ( X , Y , Z) 0, it is confirmed the voxels have been totally cut by the cutter。 a large number of voxels are not created all at once in the beginning. Fig. 7. shows that voxels in contact only with a ball endmill will be subdivided by the octree. Voxels not in contact with the cutter will not be subdivided. Thus, this approach greatly reduces the number of voxels and saves memory during simulation. Fig. 7. Threeaxis NC machining simulation. In parison with zmap model, NC simulation using voxel model can display multiaxis machining result. The dexel model has the restriction of being viewdependent, but the voxel model does not have this restriction. Thus, threeaxis, fiveside machining can utilize the threeaxis simulation method of this paper, as Fig. 8. shows. Fig. 8. Example of threeaxis and fiveside simulation 5. SIMULATION OF FIVEAXIS NC MACHINING In fiveaxis NC machining, in addition to the three translation movements, the tool axis can also be rotated. Therefore, our approach to fiveaxis simulation only revises the implicit function of the cutter. All other procedures are the same as the threeaxis simulation. Thus, the three kinds of cutters can be expressed as follows: Flat endmills can be represented by a cylinder. Fig. 9. shows that the tool axis is along{n?} and the center point islocated at{p} . Thus, the implicit function of a flat endmill is: F ( X , Y , Z ) = ? ({ x } ? { p }) T [ n ] 2 ({ x }?{ p }) ? R 2 If 0 ≤ { n } T ({ x } ? { p })≤L (5) Where R: the cutter rad