|
|
|
| |
|
|
| |
||
VIRTUAL MACHINING || |
|
| |
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. |
|
| |
|
|
|
|
2. |
Classification
of NC Verification Systems |
|
| |
NC verification is the process
of ascertaining the correctness of cutter movements
before performing the actual machining. Table
1 presents the various methods used for NC verification.
Any of these methods can be either an online or
an offline method depending on whether the activity
is carried out on the actual CNC machine or on
an offline computer or a desktop CNC machine.
Methods such as Z-neglect machining, scaled-down
machining, dry-run machining and alternate-material
machining come under this category. On the other
hand, scaled-down machining, dry-run machining
and alternate-material machining can be carried
out offline on a separate cheaper machine. Virtual
machining is obviously preferable to physical
machining. |
|
| |
| Table
1 Classification of NC Verification Methods |
| |
On-line |
Off-line |
| Physical |
Z-neglect
machining
Scaled-down machining
Dry-run machining
Alternate-material machining |
Desk-top
manufacture |
| Virtual |
Kinematic
NC simulation
Volumetric NC simulation |
Kinematic
NC simulation
Volumetric NC simulation |
|
|
| |
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. |
|
| |
|
|
|
(a) Depiction of cutter by its tip |
|
|
|
(b) Depiction of cutter as a circle |
(c)
Depiction of cutter in 3D in 5 axis machining |
|
Figure
1: Cutter Depiction in Kinematic NC Simulation |
|
|
| |
VolSim,
in addition to motions, depicts material removal.
Therefore, it helps in better visualization of
machining. As the current shape of the work piece
at any time is available in VolSim, the NC programmer
will know the regions yet to be machined; he can
also evaluate alternate machining strategies.
As he can see the scallops on the machined surfaces,
this helps in arriving at an optimal step over
increment during area clearing or pocket milling
(see Figure 2). The programmer can also correct
for undercuts, gouging, collisions etc. which
are not easy to visualize in KinSim. The intermediate
shapes of blank geometry can be preserved as part
of the NC documentation for use in the shop floor.
In other words, VolSim is a software that emulates
the CNC machine. Therefore, we shall refer to
VolSim as Virtual Machining (VM).
The primary uses of VM are:
i. NC Verification
ii. Optimization of NC program.
|
|
| |
|
|
Figure 2: Programming
Errors Revealed by Volumetric NC Simulation |
|
|
3. |
Virtual Machining Systems |
|
| |
Virtual
machining is nothing but the subtraction of the
swept volume of the cutter from the instantaneous
shape of the blank. Any CAD package with functions
for (i) solid representation of the entities in
the machining environment such as cutter, work
piece, tool holder, fixture and machine elements,
(ii) calculating the swept volume of the cutter,
(iii) Boolean subtraction operation and (iv) appropriate
API is good enough to develop a VM system. However,
such a system will be computationally intensive
in space and time. Therefore, successful VM systems
carry out simulation in discrete domain only.
Note that this is not a major limitation since
NC simulation is hardly required beyond a resolution
of 0.01mm. The classification of virtual machining
systems based on the method of solid representation
is presented in Figure 3. 3D NC simulation is
also known as object-space volumetric NC simulation
and 2.5D NC simulation is known as image-space
volumetric NC simulation. In 3D NC simulation,
the display resolution is same in all directions
whereas in 2.5D NC simulation, it is the best
in only the chosen direction. Obviously 3D simulation
is better but costs more in space and time. A
comparison of VM systems based different representation
schemes in presented in Table 2. |
|
| |
|
|
Figure
3: Classification of Virtual Machining System |
| |
| Table
2: Comparison of Representation Schemes for
Virtual Machining |
|
|
| |
Features |
Representation
Scheme |
| Image-space
|
BRep |
HSD |
| Model
size as simulation proceeds |
(+)
remains constant |
(-)
linearly increases |
(+)
remains constant (significantly less than
voxel-rep) |
| Simulation
time per NC block as simulation proceeds |
(+)
remains constant |
(-)
factorially increases |
(+)
remains constant |
| Resolution
selection |
(-)
The required resolution value cannot be directly
specified; it is decided by the viewing conditions.
|
(+)
The required resolution value can be directly
specified. |
(+)
The required resolution value can be directly
specified. |
| Accuracy |
(-)
Poorer in directions other than the simulation
direction. |
(+)
Same in all directions. |
(+)
Same in all directions. |
| Isotropy |
(-)
not isotrpic |
(+)
isotropic |
(+)
isotropic |
|
|
| |
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
4: Voxel-Based Virtual Machining |
| |
|
|
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, pixel-based 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 B-Spline (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. |
|
| |
|
|
|
Figure 7: Triangular Polyhedral
BRep of an Object |
|
|
| |
HSD-based
VM |
|
| |
Instead
of representing the blank as a collection of sticks
in 2.5D NC simulation, it is possible to represent
it as a collection of cubes or spheres or any
such cell of same size. This is called Uniform
Space Decomposition (USD). Figure 8 shows a torus
in USD representation. However, this is a very
expensive way of representing solids and is limited
to a few applications such as medical imaging.
Assuming that a bit is required to denote a cell
in this method, for representing an object of
size 1,000mm with a resolution of 0.01mm, we will
require 105 x 105 x 105 bits or more than 105
GB. Obviously this is not practicable. Therefore,
methods to represent an object as a collection
of cells of varying sizes were developed. These
are called Hierarchical Space Decomposition (HSD)
representations. |
|
| |
|
|
|
Figure
8: Uniform Space Decomposition of a Torus |
|
|
|
|
|
|
|
|
Figure 9: Octree Representation
of an Object |
|
|
| |
Octree is a HSD representation in which an object
is represented by a set of cubes of varying sizes.
This reduces the memory requirement considerably.
Bintree and Polytree also are HSD models. In an
Octree representation the universe (a cube that
contains the object) is subdivided into 8 parts
by introducing mid planes along width, depth,
and height respectively. Each cube is one-eighth
of its parent cube in size and is called an octant.
All the octants can be visualized as the nodes
of a tree in which every node has eight branches
(Figure 9). This tree is called Octree. The spatial
relation of each octant with respect to the solid
is investigated. If an octant is completely inside
the solid, it is marked as FULL; if it is completely
outside, it is marked EMPTY; if it is partially
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
VeriCut’s image-space VM and IIT Bombay’s
octree-based VM. |
|
| |
|
|
|
Figure 10: Architecture
of Octree-Based Volumetric NC Simulation
System |
| |
|
|
|
|
|
|
|
(a)
Simulation with tool holder, fixture and
clamps |
(b)
Machine simulation |
|
Figure 11: Simulation
of machine table, fixtures, clamps, tool
holder or even the entire machine |
| |
|
|
|
|
|
|
|
Blank
of Impeller |
Vericut
Output |
Machined
Impeller Octree |
|
Figure 12: Impeller Blades:
Example of 5-Axis Simulation |
|
|
|
4. |
Conclusions |
|
| |
After
verifying the NC programs using a Virtual Machining
system, the NC programmer can confidently hand
them over to the operator for machining. This
also makes global manufacturing possible –
model in one place, prepare cutter path in another
place and machine it in yet another place. VM
systems are too few compared to the CAM packages
due to its high computational complexity. However,
with the availability of powerful low cost computer
hardware and software, VM systems are emerging.
VM can also be used for machine tool simulation
as well as optimization of spindle speed and feed
rate. Standardization of NC procedures and documentation
and careful customization of VM system will improve
its effectiveness. |
|
| |
Courtesy:
MODERN MACHINE TOOLS, July 2004 Issue |
|
|
| |
|
 |
| |
|
|
|
|
 |
 |
 |
|
|