1、 1 中文 3587 字 SOME ALGORITHMS FOR NC MACHINING SIMULATION AND VERIFICATION Abstract: This paper presents an approximation method to display realistic pictures of numerical control ( NC )machining simulation very quickly. The tool movement envelope is divided into many small regions and the normal to
2、these small reg ions is calculated. The system saves the calculated result in a file before starting animation display. When the system st arts displaying machining animation, it does not need to calculate small triangular facet s normal to the workpiece surface. It only needs to find out what part
3、of the cutter cuts the workpiece surface and to read the normal from t he file. A highly efficient NC code verification method is also presented in this paper.The metho d first detects the error in z direction. If some points are reported to be out of the tolerance, the system divides neighborhood o
4、f these points into smaller grids and calculates the normal surface at each grid intersection and the error in the normal vector direction. Key words: numerical control machining; simulation; verification; realistic picture NC program validation has often been classified into two important part simu
5、lation and verification. The simulation mainly displays material removal, cutter movement and modification of a geometric model of the workpiece to keep track o f the material removal process. The verification process requires a comparison between the final workpiece model and the geometric model of
6、 the part. This paper proposes some essential algorithms about simulation and verification. Solid geometry modeling systems offer the possibility of doing both simulation and verification 1j4. Simulation is achieved by Boolean subtraction of the tool movement volume from the workpiece model. The ver
7、ification is achieved by Boo lean differences between models of the workpiece and the desired part. But on a microcomputer, solid model Boolean subtraction is too slow to show animation of material removal. Some other methods are presented to increase efficiency of the simulational system. Van Hook
8、5 has developed a real time shaded display of a solid model being milled by a cutting tool which follows an NC path. This approach utilizes a dexel (depth element) 2 representation of the workpiece and the cutter geometries. The data structure is a run length encoded version of a volumetric data rep
9、resentation. An updating rate of ten cutting operations per second is attained by using Boolean set operations on the one-dimensional dexels. The viewpoint of dependency of this approach is overcomed by an extension of the method by Huang6, who has introduced the possibility of error assessment to H
10、ooks method. Takafumi has also used an extension of the z-buffer method (called G-buffer ) to simulate NC milling7. Some people have used a surface model rather than solid model8. Their methods divide the surface of geometric model along u and v directions into many grids. The normal vector is then
11、calculated at intersections of each grid. During simulating the length of vector is reduced if it intersects the tool movement envelope. An analogy can be made with mowing a field of grass. Each vector in simulation corresponds to a blade of grass o growing p from the desired object. As the simulati
12、on progresses, the blades are i mowed down o. The final length of the vector corresponds to the amount of excess material (above the surface) or the depth of gouge (below the surface) at the point. In 1993, P- L Hsu and W-T Yang 9 presented a method for real-time 3D simulation of 3- axis milling mac
13、hining . They first divided stock and toot into array of many small cubes (voxel cell). For displaying realistic picture of the process of machining, it is necessary to determine which of these small cubes would be cut and need not be displayed. Their method not only avoids the Boolean subtraction o
14、peration, but also does not need to calculate the normal vector. So this method can display the simulation picture and the cutter movement at very high speed. But because the smallest display unit is a small cube (voxel cell), it is impossible to create good realistic pictures of the simulation proc
15、ess. Furthermore, it cannot detect small machining errors (less than one voxel cell) .In this paper a rapid method to display the animation of material removing process of NC machining is presented. And a method is also proposed to simplify the calculation of NC verification process. 1 DISCRETIZATIO
16、N OF RAW STOCK AND REALISTIC PICTURE DISPLAY In 3-axis milling processes, only data on the z axis (parallel cutter axis ) change when 3 the cutting tools are swept over the workpiece. So we discrete stock as an array of triangular prisms as shown in Fig. 1. This discrete method is somewhat structure
17、 of Z-map presented by P-L Hsu and W- T Yang in 1993. Z-map structure is an array of quadrangular pillar - shaped elements. When the cutter moves and cuts this pillar, each pillar has four intersections with the cutter that are actually not in the same plane. This will bring many troubles in the dis
18、play of realistic pictures. Improvement is made in this research , we use triangular prisms rather than quadrangular pillar-shaped elements done by P- L Hsu and W- T Yang. Each pillar contains three intersections and these three points construct a small facet. All these facets construct the cutting
19、surface that is modified. For creating a high quality realistic picture, it is necessary to get the information about the normal vector of each facet. If the system calculates the normal vector to all facets with an ordinary method, it is difficult to display a smooth animation with high quality realistic pictures of the material removing process on microcomputer.