Professional Documents
Culture Documents
By K.P. Karunakaran, R. Shringi and Amit Kumar Singh Computer Graphics Laboratory, Department of Mechanical Engineering Indian Institute of technology Bombay, Powai, Mumbai 400076, INDIA Verification of NC programs through trial machining is risky, slow and costly. Virtual machining using software tools can overcome this difficulty. Optimization of cutting parameters achieved through this cuts down machining time and improves quality and tool life. But existing virtual machining methods are all inexact. More
1. Introduction
The sources of errors in NC programs are many and varied. They range from relatively trivial syntax errors to subtle interactions with work-holding fixtures. Debugging NC programs on the shop floor is expensive, time consuming and sometimes dangerous. Hence, NC users and developers have sought computational aids for program development and verification from the earliest days of NC. CAD/CAM/CAE packages available today offer total solutions to the users by incorporating modules for modeling, visualization, analysis and manufacturing. Almost all CAM modules can generate efficient NC cutter paths with minimal user interactions. Some of them are even able to generate the cutter paths automatically for simple geometries of rotary or prismatic nature. However, the correctness of the NC programs generated by these packages cannot be guaranteed until a component is produced on a CNC machine using these programs and inspected. An unproved NC program may have movements that may cause collisions with the fixture elements, dig into the component, create undercuts, gouge the component or leave excess material. An erroneous NC program may also produce out of tolerance dimensions, poor surface finish or have wasteful movements. The task of ascertaining the correctness of the NC programs of a component is called NC Verification or Tape Proving. The physical tape proving methods have the following drawbacks: :: They are slow and tedious. :: The machine tool is utilized less efficiently during tape proving. :: The programmer and operator are underutilized and fatigued. :: These methods may be dangerous for the operator and can cause damage to the machine and cutting tools. Efforts have been going on for a long time on two fronts to eliminate or minimize the time and money spent in tape proving. Researchers in the area of Computer Automated Part Programming (CAPP) have been trying to develop intelligent cutter path generation systems that can produce error-free NC programs thus
alleviating the need for verification altogether. Such a system would require vast knowledgebase (KB) and database (DB) related to machining and fantastic computing power to scan through these in order to obtain a 'zero-defect' NC program of a practical component. Furthermore, these knowledge and data bases themselves need to be updated to keep pace with technological growth such as the development of new cutter materials, high speed machining etc.. It appears too optimistic to expect such software to be available in the near future. This prompted people to work in the development of software that would simulate the machining process virtually on a computer screen. These Virtual Machining (VM) systems emulate the CNC machines. While the graphic simulation available in most CAM packages show only motions, the VM systems can depict the material removal as well. In a VM system, one starts with the virtual model of the work piece and as machining progresses, the geometry of the work piece gets updated by subtracting the volume swept by the cutter during each motion. It is possible to model even the machine tool and fixture elements so that even collisions can be detected. Since the user gets a realistic visual feel of the machining process in a VM system, it helps in predicting errors on the computer screen itself. This system can automatically do the verification both to ascertain the safety of machining (detection of collision etc.) and geometric conformance to design. It is also possible to optimize the technological parameters (spindle speed and feed rate) from the geometric characteristics of the material removal process.
Table 1 Classification of NC Verification Methods On-line Z-neglect machining Scaled-down machining Dry-run machining Alternate-material machining Off-line
Physical
Desk-top manufacture
Virtual
A PC workstation costs as low as Rs. 25,000 whereas even a small 3 axis CNC machining center (of about 450mm traverse on the longest axis) from a reputed builder costs about Rs. 25,00,000, a factor of over 100. When such a CNC machine is engaged for graphic simulation, it is used at less that 1% efficiency. This is apart from the fact that the quality of graphic simulation on the CNC is inferior to that of an offline PC due to its high resolution and computing resources. Therefore, it makes more sense to do NC verification virtually on an offline PC. Graphics-based or virtual NC simulation can be grouped into the following 2 categories: i. Kinematic NC Simulation (KinSim) ii. Volumetric NC Simulation (VolSim) KinSim is very popular among CAM packages because of its low computational complexity. As the cutter moves, it is drawn at the end of each position. The cutter may be depicted simply by its tip or axis or it may be drawn fully in 2D or 3D. Some of these kinematic displays are shown in Figure 1. KinSim can depict only motions and not material removal. Therefore, physical NC verification may be necessary before releasing the NC program for regular production.
Features Image-space
Representation Scheme
BRep
HSD (+) remains constant (significantly less than voxelrep) (+) remains constant
Model size as simulation proceeds Simulation time per NC block as simulation proceeds
(-) The required resolution (+) The required (+) The required value cannot be directly resolution value Resolution selection resolution value can be specified; it is decided by can be directly directly specified. the viewing conditions. specified. (-) Poorer in directions (+) Same in all (+) Same in all Accuracy other than the simulation directions. directions. direction Isotropy (-) not isotrpic (+) not isotrpic (+) not isotrpic
Image-space Virtual Machining
As discussed earlier, image-space VM is only 2.5D simulation. In this a direction of simulation is chosen and the blank is split into sticks called voxels of equal cross-section with their lengths along the chosen direction. The cross-section of these voxels could be square, cylindrical etc. This is shown in Figure 4 in which the simulation direction is Z axis and the voxels are cuboids. The cross-sectional size of these voxels decides the resolution of simulation. The length of the voxel will also be represented in discrete domain but to a coarser resolution. Whenever a cutter makes a movement, the volume it sweeps will be calculated as shown in Figure 4 and then converted into voxels. Note that the discrete domains of the blank and cutter will have to match. Therefore, one can easily subtract the voxels of the cutter from the corresponding voxels of the blank to update the blank geometry due to machining. As the voxels are of uniform cross-section, it is enough to store its corner or center and its Z values. The Z values of a voxel will always occur in pairs; a voxel may have more than one pair of Z value as it may be split into more pieces during machining. A voxel of a blank or cutter can be referred by its corner (int x, int y)and (int *z). From the bounding square of the object and the resolution perpendicular to the simulation direction, one can calculate the number of voxels, say m and n, along X and Y directions. Although there will be m x n voxels, all need not be considered since some of them may lie outside the blank. In this method, the user can choose a resolution to trade between the quality of simulation and the speed. Visual Mill is a software that makes use of this method of NC simulation. This is not just a simulator but a CAM package too.
Figure 5: Bit Planes in a Frame Buffer Pixel-based VM is a special case of voxel-based NC simulation in which the size of the voxel is same as that of the pixel of the display screen. Choosing pixel size as voxel size has very interesting effects on space and time complexity since the geometric information of the voxels no longer require to be stored explicit memory as it can make use of the video memory of the computer called frame buffer. This is organized in the form of bit-planes such that it has one bit for each pixel (see Figure 5). For instance, if the frame buffer contains 8 bits, it can store any number from 0 to 255 (28-1) for each pixel. Frame buffers of PCs today have as much as 32 bit-planes. This memory location is normally used to store the color of the pixel. Instead, in a pixel-based system, it stores the Z values of the sticks associated with the pixel. Therefore, in the context of image-space representation, the frame buffer is called Z-buffer. When machining proceeds, the lengths of these sticks are modified by changing the Z values in Z-buffer. As the geometric data is stored in the frame buffer itself and generation of display from the Z-buffer is trivial, pixel-based VMs are the fastest till date. Due to this, pixelbased VMs are the most popular one among the commercial VolSim packages. Among them, VeriCut is the most mature package incorporating functions for automatic verification, machine simulation and optimization of NC programs. Unigraphics has recently introduced this type of VolSim in its latest release. Often pixel-based VM itself is referred as image-space VM due to its popularity. The machining of a mold simulated using VeriCut is shown in Figure 6. Some of its limitations are:
:: Only the part of the object visible on the screen can be simulated. :: The resolution of simulation depends on the screen resolution, size of the visible part of the object and its current viewing transformation (zoom, pan and rotation). It cannot be arbitrarily specified. :: The resolution of simulation along Z direction is different from
that in XY plane; in other words, the simulation exhibits anisotropy.It is essentially 2.5D in which the simulation is carried out on a given direction of projection.
Rough milling
Finish milling
Finished mold
Figure 6: Volumetric NC Simulation of a Mold Using VeriCut BRep-based VM Boundary Representation (BRep) is a solid representation in which an object is represented in terms of the surface patches defining its boundary. Most CAD/CAM packages such as Pro/E, UG and CATIA make use of Non-Uniform Rational BSpline (NURBS) - based BRep. When BRep is used For NC Simulation, one uses its inexact form called triangular polyhedral BRep. In other words, the object boundary will be a collection of triangles rather than NURBS patches. It is possible to choose the tessellation resolution to match the required speed. Virtual NC is a popular BRep-based VM package. Incidentally it has its roots in India. However, when BRep is used, the memory required to store the blank increases as simulation progresses. Therefore, it is useful only for few thousand motions. Machining of huge components and dies with freeform surfaces may involve millions of NC blocks. An example of a this type of model is shown in Figure 7.
inside and partially outside then it is marked PARTIAL. The FULL and EMPTY octants are not subdivided further and become leaf nodes; all PARTIAL octants are further subdivided into eight octants. This subdivision continues till the size of the PARTIAL octant equals the required resolution; at this time, the PARTIAL octant is declared as FULL or EMPTY. The collection of all FULL octants represent the solid of interest. The total number of octants to be stored in an octree is much less than that of USD representation, because the octants marked FULL or EMPTY do not take part in the subdivision. It was found that in case of octree the number of octants needed is nearly proportional to surface area of the object. The other desirable features of octree are: |::| All computations are based on integer arithmetic, which means that the analysis algorithms are fast |::| Octree algorithms are readily parallel-processes. |::| Memory required by Octree representation is independent of the number of primitives and operations. For a given resolution, memory required depends only on the surface area of the object. |::| Boolean operations, rendering display in isometric view, scaling up/down in powers of 2, orthogonal rotations etc. are trivially simple since these operations require only tree traversal with simple exchange of terms. |::| User is free to choose any desired accuracy (at the cost of speed and memory). |::| Coarse modeling is a facility unique to HSD. A coarse model of a solid can be produced and processed quickly to get an order of magnitude estimate of the results. If these are found favorable, a more accurate model can be produced. |::| All octree representations of solids are always valid and unambiguous. |::| Octrees can inherently handle non-manifold and self-intersecting objects. The limitations of Octree are: :: Octree is an approximate representation. :: Memory requirement increases exponentially with increase in resolution. :: Feature details are irretrievably lost. The block diagram of octree-based VM system under development in IIT Bombay is given in Figure 10. Architecture of other VM systems also will be similar to this;
they will differ only in the representation scheme. Most VM systems accept cutter path in the form of NC code specific to the CNC machine or in the form of a generic format called Cutter Location data (CL data). If the input is NC code specific to a CNC machine, one would additionally require a machine tool data file that provides its process, kinematic and syntactic details and cutter data file. A NC inverse processor synthesizes them to generate the corresponding CL file. Note that all the other algorithms further use only this CL file. VM systems provide a simple modeler using which work piece shapes such as block or cylinder can be modeled; if it is complex such as a casting or WIP, it is possible to import from other modelers using data transfer protocols such as STL, IGES etc. In some VM systems, it is possible to include other elements such as machine table, fixtures, clamps and tool holders (see Figure 11). These are required for collision detection. In some packages like VeriCut, the entire machine also can be simulated to visualize the kinematics; this will be particularly very useful during 5 axis machining. Generally the representation schemes for simulating the entire machine motions will be triangular polyhedral BRep. Furthermore, simulation of material removal on the blank and simulation of machine kinematics are done in different sessions. Figure 12 shows the virtual machining of an impeller. Figure 12a is its blank, Figure 12b and 12c are respectively the simulation results obtained from VeriCuts image-space VM and IIT Bombays octree-based VM.
Simulation System
Figure 11: Simulation of machine table, fixtures, clamps, tool holder or even the entire machine
Blank of Impeller
Vericut Output
of NC procedures and documentation and careful customization of VM system will improve its effectiveness