Documentos de Académico
Documentos de Profesional
Documentos de Cultura
UNIT-1
INTRODUCTION
Learning Objectives:
Understand the various spheres of manufacturing activity where computers
are used
These are activities which normally use models developed using one or
more of the techniques mentioned above. These activities are often
included in other umbrellas like CAM or CAE. A term often used is
CAD to include this broad set of activities. They all use CAD models
and often the kind of application they have to be used ina determines the
kind of amodel to be developed. Hence, in this course I cover them
under the umbrella of CAD. In this course we will strive to give an
overview of modelling techniques followed by some applications,
specifically CAM.
Modeling
Display/ Visualization
Applications
MODELING
Modelling typically includes a set of activities like
Defining objects
Defining relation between objects
Defining properties of objects
Defining the orientations of the objects in suitable co-ordinate
systems
Modification of existing definition (editing).
The figure below explains what a typical CAD model would need to
define, what kind of entities need to be defined and what relationships
exist between them.
At the highest level we have the volume which is defined by (or
"delimited by") a set of surfaces. These surfaces can be either planar or
curved / warped. A planar surface can be bounded by a set of curves. A
curved surface can be seen as a net of curves. These curves are typically
a succession of curve segemnts which define the complete the curve.
The curve segment is defined using a set of end points / control points
which govern the nature of the curve. Thus a relationship is defined
between entities at each level.
Type of Production
1. Mass production - large lots e.g. automobiles
aircrafts, etc.
Increased productivity:
Shorter lead-time:
Improved reliability:
Reduced maintenance:
PRODUCT CYCLE
Let us consider the manufacturing environment of a given product.
How does the product idea originate?
Expertise on the part of the company estimates the likely demand and
probable profitability and decides on the best mode of designing and
manufacturing the desired product.
The details of such a design and the subsequent manufacturing process are depicted
in Fig. 1-2 for the traditional approach and in Fig. 1-3 for computer aided
manufacturing
Computer Aided Design (CAD)
Functional unit: -
A computer consists of five functionally independent main parts input,
memory, arithmetic logic unit (ALU), output and control unit.
Input ALU
Input device accepts the coded information as source program i.e. high level
language. This is either stored in the memory or immediately used by the processor
to perform the desired operations. The program stored in the memory determines the
processing steps. Basically the computer converts one source program to an object
program. i.e. into machine language.
Finally the results are sent to the outside world through output device. All of
these actions are coordinated by the control unit.
Input unit: -
The source program/high level language program/coded information/simply
data is fed to a computer through input devices keyboard is a most common type.
Whenever a key is pressed, one corresponding word or number is translated into its
equivalent binary code over a cable & fed either to memory or processor.
1. Primary memory
2. Secondary memory
1. Primary memory: - Is the one exclusively associated with the processor and
operates at the electronics speeds programs must be stored in this memory while
they are being executed. The memory contains a large number of semiconductors
storage cells. Each capable of storing one bit of information. These are processed in
a group of fixed site called word.
Memory in which any location can be reached in a short and fixed amount
of time after specifying its address is called random-access memory (RAM).
The time required to access one word in called memory access time.
Memory which is only readable by the user and contents of which cant be altered is
called read
only memory (ROM) it contains operating system.
Caches are the small fast RAM units, which are coupled with the processor
and are aften contained on the same IC chip to achieve high performance. Although
primary storage is essential it tends to be expensive.
2 Secondary memory: - Is used where large amounts of data & programs have to
be stored, particularly information that is accessed infrequently.
Examples: - Magnetic disks & tapes, optical disks (ie CD-ROMs), floppies etc.,
The control and the ALU are may times faster than other devices connected
to a computer system. This enables a single processor to control a number of
external devices such as key boards, displays, magnetic and optical disks, sensors
and other mechanical controllers.
Output unit:-
These actually are the counterparts of input unit. Its basic function is to send
the processed results to the outside world.
Control unit:-
It effectively is the nerve center that sends signals to other units and senses
their states. The actual timing signals that govern the transfer of data between input
unit, processor, memory and output unit are generated by the control unit.
1. First the instruction is fetched from the memory into the processor.
2. The operand at LOCA is fetched and added to the contents of R0
3. Finally the resulting sum is stored in the register R0
MAR MDR
CONTROL
PC R0
R1
ALU
IR
Rn-1
n- GPRs
The fig shows how memory & the processor can be connected. In addition
to the ALU & the control circuitry, the processor contains a number of registers used
for several different purposes.
The instruction register (IR):- Holds the instructions that is currently being
executed. Its output is available for the control circuits which generates the timing
signals that control the various processing elements in one execution of instruction.
The Diversion may change the internal stage of the processor its state must
be saved in the memory location before interruption. When the interrupt-routine
service is completed the state of the processor is restored so that the interrupted
program may continue.
Bus structure: -
The simplest and most common way of interconnecting various parts of the
computer.
To achieve a reasonable speed of operation, a computer must be organized
so that all its units can handle one full word of data at a given time
A group of lines that serve as a connecting port for several devices is called a
bus.
In addition to the lines that carry the data, the bus must have lines for
address and control purpose.
Since the bus can be used for only one transfer at a time, only two units can
actively use the bus at any given time. Bus control lines are used to arbitrate
multiple requests for use of one bus.
Single bus structure is
Low cost
Very flexible for attaching peripheral devices
Multiple bus structure certainly increases, the performance but also
increases the cost significantly.
All the interconnected devices are not of same speed & time, leads to a bit
of a problem. This is solved by using cache registers (ie buffer registers). These
buffers are electronic registers of small capacity when compared to the main
memory but of comparable speed.
The instructions from the processor at once are loaded into these buffers and
then the complete transfer of data at a fast rate will take place.
Performance: -
The most important measure of the performance of a computer is how
quickly it can execute programs. The speed with which a computer executes
program is affected by the design of its hardware. For best performance, it is
necessary to design the compiles, the machine instruction set, and the hardware in a
coordinated way.
The total time required to execute the program is elapsed time is a measure
of the performance of the entire computer system. It is affected by the speed of the
processor, the disk and the printer. The time needed to execute a instruction is called
the processor time.
Just as the elapsed time for the execution of a program depends on all units
in a computer system, the processor time depends on the hardware involved in the
execution of individual machine instructions. This hardware comprises the processor
and the memory which are usually connected by the bus as shown in the fig c.
Processor
Main Cache
Memory Memory
Bus
The pertinent parts of the fig. c is repeated in fig. d which includes the cache
memory as part of the processor unit.
Let us examine the flow of program instructions and data between the
memory and the processor. At the start of execution, all program instructions and the
required data are stored in the main memory. As the execution proceeds, instructions
are fetched one by one over the bus into the processor, and a copy is placed in the
cache later if the same instruction or data item is needed a second time, it is read
directly from the cache.
For example:- Suppose a number of instructions are executed repeatedly over a short
period of time as happens in a program loop. If these instructions are available in the
cache, they can be fetched quickly during the period of repeated use. The same
applies to the data that are used repeatedly.
Processor clock: -
Processor circuits are controlled by a timing signal called clock. The clock
designer the regular time intervals called clock cycles. To execute a machine
instruction the processor divides the action to be performed into a sequence of basic
steps that each step can be completed in one clock cycle. The length P of one clock
cycle is an important parameter that affects the processor performance.
Processor used in todays personal computer and work station have a clock
rates that range from a few hundred million to over a billion cycles per second.
Suppose that the average number of basic steps needed to execute one
machine
cycle instruction is S, where each basic step is completed in one clock cycle. If clock
rate is R cycles per second, the program execution time is given by
N *S
R
this is often referred to as the basic performance equation.
Consider Add R1 R2 R3
This adds the contents of R1 & R2 and places the sum into R3.
The contents of R1 & R2 are first transferred to the inputs of ALU. After the
addition operation is performed, the sum is transferred to R3. The processor can read
the next instruction from the memory, while the addition operation is being
performed. Then of that instruction also uses, the ALU, its operand can be
transferred to the ALU inputs at the same time that the add instructions is being
transferred to R3.
In the ideal case if all instructions are overlapped to the maximum degree
possible the execution proceeds at the rate of one instruction completed in each
clock cycle. Individual instructions still require several clock cycles to complete.
But for the purpose of computing T, effective value of S is 1.
Clock rate:- These are two possibilities for increasing the clock rate R.
1. Improving the IC technology makes logical circuit faster, which reduces the
time of execution of basic steps. This allows the clock period P, to be
reduced and the clock rate R to be increased.
2. Reducing the amount of processing done in one basic step also makes it
possible to reduce the clock period P. however if the actions that have to be
performed by an instructions remain the same, the number of basic steps
needed may increase.
Performance measurements:-
It is very important to be able to access the performance of a computer,
comp designers use performance estimates to evaluate the effectiveness of new
features.
The previous argument suggests that the performance of a computer is given
by the execution time T, for the program of interest.
The program selected range from game playing, compiler, and data base
applications to numerically intensive programs in astrophysics and quantum
chemistry. In each case, the program is compiled under test, and the running time on
a real computer is measured. The same program is also compiled and run on one
computer selected as
reference.
The SPEC rating is computed as follows.
Running time on the reference computer
SPEC rating =
Running time on the computer under test
Let SPECi be the rating for program i in the suite. The overall SPEC
rating for the computer is given by
1
n
n
SPEC rating = SPECi
i 1
Where n = number of programs in suite.
Since actual execution time is measured the SPEC rating is a measure of the
combined effect of all factors affecting performance, including the compiler, the OS,
the processor, the memory of comp being tested.
CPU
Desktop computers have a separate keyboard and mouse, but for laptops,
these are integrated into a computer system itself. In laptops, the mouse
is actually substituted with a touchpad or trackpad. This is a specialized
surface that follows the motion of your finger. You can still connect an
external mouse to a laptop if you prefer.
Flatbed scanner
Audio and video can be recorded using a microphone and video camera,
respectively. Due to the popularity of video conferencing using services like Skype,
these are now typically integrated in most laptops and monitor displays for
desktops; however, you can also connect an external webcam, which can record
both audio
and video.
DISPLAY DEVICES
A display device is an output device for presentation of information in visual
or tactile form (the latter used for example in tactile electronic displays for
blind people). When the input information is supplied as an electrical signal, the
display is called an electronicdisplay.
COLOR -- 3 different phosphors + 3 different gusns (e.g., red, green, and blue)
Phosphore
The electron beam causes the phosphors atoms to move into
higher energy state
The atoms give off energy as light when they return to their stable state
REFRESHMENT
Raster Display
SYSTEM COMPONENTS
Frame (refresh) buffer -- Block of memory used to store the screen pattern
HOW IT WORKS
The DISPLAY PROCESSOR produces the raster image in the frame buffer
from the commands
The VIDEO CONTROLLER moves the beam row wise across the pixels
setting it on and off according to the content of theframe buffer
The display must be refreshed to avoid flickering (raster image redisplayed
30 to 60 times pers second)
01 1 3 of full intensity
10 2 3 of full intensity
11 3 3 of full intensity
FRAME BUFFER
"
2-bit color level frame buffer with 24-bit LUT (e.g., RGB: red, green, blue)
Hard-Copy Devices
We can obtain hard-copy output for our images in several formats. For
presentations or archiving, we can send image files to devices or service bureaus that
will produce 35-mm slides or overhead transparencies. To put images on film, we
can simply photograph a scene displayed on a video monitor. And we can put our
pictures on paper by directing graphics output to a printer or plotter.
The quality of the pictures obtained from a device depends on dot size and the
number of dots per inch, or lines per inch, that can be displayed. To produce smooth
characters in printed text strings, higher-quality printers shift dot positions so that
adjacent dots overlap.
Printers produce output by either impact or nonimpact methods. Impact printers
press formed character faces against an inked ribbon onto the paper. A line printer is
an example of an impact device, with the typefaces mounted on bands, chains,
drums, or wheels. Nonimpact printers and plotters use laser techniques, ink-jet
sprays, xerographic processes (as used in photocopying machines), electrostatic
methods, and electrothermal methods to get images onto paper.
character impact printers often have a dot-matrix print head containing a
rectangular array of protruding wire pins, with the number of pins depending on the
quality of the printer. individual characters or graphics patterns are obtained by
retracting certain pins so that the remaining pins form the pattern to be printed.
figure 2-58 shows a picture printed on a dot-matrix printer.
Figure :1
A picture generated on a dot-
matrix printer showing how the
density of the dot patterns can
be varied to produce light and
dark areas. (Courtesy of Apple
Computer, Inc.)
In a laser device, a laser beam mates a charge distribution on a rotating drum coated with a
photoelectric material, such as selenium. Toner is applied to the drum and then transferred to
paper. Figure 2-59 shows examples of desktop laser printers with a resolution of 360 dots per
inch.
Figure :2
Small-footprint laser printers.
(Courtesy of Texas Instruments.)
Figure :3
A 360-dot-per-inch desktop ink-jet plotter.
(Courtesy of Summagraphics Corporation.)
Ink-jet methods produce output by squirting* ink in horizontal rows across a roll of paper
wrapped on a drum. The electrically charged ink stream is deflected by an electric field to
produce dot-matrix patterns. A desktop ink-jet plotter with a resolution of 360 dots per inch is
shown in Fig. 3, and examples of larger high-resolution ink-jet printer/plotters are shown in
Fig.4
Figure :4
Floor-model, ink-jet color printers that use variable dot size to achieve an
equivalent resolution of 1500 to 1800 dots per inch.
An electrostatic device places a negative charge on the paper, one complete row at a time
along the length of the paper. Then the paper is exposed to a toner. The toner is positively
charged and so is attracted to the negatively charged areas, where it adheres to produce the
specified output. A color electrostatic printer/plotter is shown in Fig. 2-62. Electrothermal
methods use heat in a dot-matrix print head to output patterns on heat-sensitive paper.
Figure :5
An electrostatic printer that can display 400
dots per inch.
We can get limited color output on an impact printer by using different-colored ribbons.
Nonimpact devices use various techniques to combine three color pigments (cyan, magenta, and
yellow) to produce a range of color patterns. Laser and xerographic* devices deposit the three
pigments* on separate passes; ink-jet methods shoot the three colors simultaneously on a single
pass along each print tine on the paper.
STORAGE DEVICES
What are Storage devices?
Storage Devices are the data storage devices that are used in the computers to store
the data. The computer has many types of data storage devices. Some of them can be
classified as the removable data Storage Devices and the others as the non removable
data Storage Devices.
The memory is of two types; one is the primary memory and the other one is
the secondary memory.
The primary memory is the volatile memory and the secondary memory is the non
volatile memory. The volatile memory is the kind of the memory that is erasable and
the non volatile memory is the one where in the contents cannot be erased. Basically
when we talk about the data storage devices it is generally assumed to be the
secondary memory.
The secondary memory is used to store the data permanently in the computer.
The secondary storage devices are usually as follows: hard disk drives this is the
most common type of storage device that is used in almost all the computer systems.
The other ones include the floppy disk drives, the CD ROM, and the DVD ROM.
The flash memory, the USB data card etc.
Find out more ... Navigate through the list of storage devices given on the right side.
Floppy discs:
A floppy disk is a data storage medium that is composed of a disk of thin, flexible
floppy)magnetic storagemedium encased in asquareor rectangularplasticshell. Floppy
disks are read and written by afloppy disk drive.
Application
Any use where small files such as word processing, small spreadsheets and databases
need to be moved from one computer to another.
Useful to backup small data files.
Fixed hard discs
A hard disk drive is the device used to store large amounts of digital information in
computers and related equipment like iPods and games consoles such as the Xbox
360 and PS3.
Hard disk drives are used to store operating systems, software and working data.
These are suitable for any application which requires very fast access to data for
both reading and writing to. However, Hard disk drives may not be suitable for
applications which need portability.
Almost all computers used a fixed hard disc. Used for on-line and real time processes
requiring direct access. Used in file servers for computer networks to store large
amount of data.
Advantages:
Greatly improved data cargo carrying capacity (relative to the 1.44 Mb floppy disc).
You don't need to worry about the other person having the same type of special
cartridge drive as yourself.
Disadvantages:
Hard drives have to be handled quite carefully, and when being transported should be
wrapped in something soft and put in a padded bag.
More expensive than other forms of removable media.
Application
Portable disc discs are used to store very large files which need transporting from
one computer to another and price is not an issue.
Magnetic tapes
Magnetic tape has been used for data storage for over 50 years. When storing large
amounts of data, tape can be substantially less expensive than disk or other data
storage options. Tape storage has always been used with large computer systems.
Modern usage is primarily as a high capacity medium for backups and archives.
Drawbacks
Writing and retrieving data is slow.
It uses serial access for reading and writing.
Application
Magnetic tapes are used for application which requires extremely large storage
capacity where speed of access is not an issue.
It is commonly used for backups of file servers for computer networks, in a variety
of batch processing applications such as reading of bank cheques, payroll processing
and general stock control.
USB flash drives are typically removable and rewritable, much smaller than a floppy disk.
Storage capacities typically range from 64 MB to 64 GB. USB flash drives
offer potential advantages over other portable storage devices, particularly the floppy
disk.
They have a more compact shape, operate faster, hold much more data, have a more durable
design, and operate more reliably due to their lack of moving parts. Flash drives are widely
used to transport files and backup data from computer to computer. Flash memory cards
A memory card or flash memory card is a solid-state electronic flash memory data
storage device used with digital cameras, handheld and Mobile computers,
telephones, music players, video game consoles, and other electronics.
Nowadays, most new PCs have built-in slots for a variety of memory cards; Memory Stick,
CompactFlash, SD, etc. Some digital gadgets support more than one memory card to ensure
compatibility.
CAD/CAM
UNIT-2
COMPUTER GRAPHICS
Since a cathode ray tube (CRT) raster display can be considered a matrix
of discrete cells (pixels) each of which can be made bright, it is not possible to
directly draw a straight line from one point to another. The process of determin-
ing which pixels will provide the best approximation to the desired line is prop-
erly known as rasterization. Combined with the process of rendering the picture
o
in scan line order it is known as scan conversion. For horizontal, vertical, and 45
lines the choice of raster elements is obvious. For any other orientation the choice
is more difficult. This is shown in Fig. 1.
In any case, the line drawing algorithm should light up only those pixels
that are close to the theoretical line. On the other hand, the requirements for con-
stant brightness, independent of the line slope could not be achieved on a single
black and white screen. A simple frame buffer will produce only horizontal, ver-
o
tical, and 45 lines with the brightness constant along the length. For all other
orientations the rasterization will yield uneven brightness. This is shown in Fig.
1. Even for the special cases, the brightness is orientation dependent; e.g., note
o
that the effective spacing between pixels for the 45 line is greater than for the
vertical and horizontal line. This will make the vertical and horizontal lines ap-
o
pear brighter than the 45 line. Providing equal brightness along lines of varying
length and orientation requires a frame buffer with additional bit-planes and cal-
culation of a square root.
There are number of line drawing algorithms developed. Most of them use
incremental methods to simplify the calculations.
BRESENHAMS ALGORITHM
Figure 3
(1,0) can be determined by adding the slope of the line to the error term: e = e +
m where m is the slope. In the case with e initialized to -1/2:
e = -1/2 + 3/8 = -1/8
Since e is negative, the line will pass below the middle of the pixel. Hence
the pixel at the same horizontal level better approximates the location of the line
so y is not incremented. Again incrementing the error term by the slope yields
2 D GEOMETRIC TRANSFORMATIONS
BASIC TRANSFORMATION
Animations are produced by moving the 'camera' or the objects in a scene along
animation paths. Changes in orientation, size and shape are accomplished with geometric
transformations that alter the coordinate descriptions of the objects. The basic geometric
transformations are translation, rotation, and scaling. Other transformations that are often
applied to objects include reflection and shear.
Coordinate Systems
In CAD three types of coordinate systems are needed in order to input, store and display
model geometry and graphics. These are the Model Coordinate System (MCS),
theWorld Coordinate System (WCS) and the Screen Coordinate System (SCS). Model
Coordinate System The MCS is defined as the reference space of the model with respect
to which all the model geometrical data is stored. The origin of MCS can be arbitrary
chosen by the user.
World Coordinate System
As discussed above every object have its own MCS relative to which its geometrical data
is stored. Incase of multiple objects in the same working space then there is need of a
World Coordinate System which relates each MCS to each other with respect to the
orientation of the WCS. It can be seen by the picture shown below.
Viewing Transformations
As discussed that the objects are modeled in WCS, before these object descriptions can
be projected to the view plane, they must be transferred to viewing coordinate system.
The view plane or the projection plane, is set up perpendicular to the viewing zv axis.
The World coordinate positions in the scene are transformed to viewing coordinates,
then viewing coordinates are projected onto the view plane.
The transformation sequence to align WCS with Viewing Coordinate System is.
1. Translate the view reference point to the origin of the world coordinate system.
2. Apply rotations to align xv, yv, and zv with the world xw, yw and zw axes, respectively.
TRANSLATION
A translation is applied to an object by repositioning it along a straight line path from
one coordinate location to another. We translate a two-dimensional point by adding
translation distances, tx and ty, to the original coordinate position (x,y) to move the point
to a new position (x',y')
The translation distance pair (tx, ty) is called translation vector or shift vector
This allows us to write the two-dimensional translation equations in the matrix form:
ROTATION
A two-dimensional rotation is applied to an object by repositioning it along a circular
path in the x-y plane. When we generate a rotation we get a rotation angle () and the
position about which the object is rotated (xr , yr) this is known as rotation point or
pivot point. The transformation can also be described as a rotation about rotation axis
that is perpendicular to x-y plane and passes through the pivot point. Positive values for
the rotation angle define counter-clockwise rotations about the pivot point and the
negative values rotate objects in the clockwise direction.
SCALING
Scaling is a kind of transformation in which the size of an object is changed. Remember
the change is size does no mean any change in shape. This kind of transformation can be
carried out for polygons by multiplying each coordinate of the polygon by the scaling
factor. Sx and Sy which in turn produces new coordinate of (x,y) as (x',y'). The equation
would look like
or
NOTE: If the values of scaling factor are greater than 1 then the object is enlarged and if
it is less that 1 it reduces the size of the object. Keeping value as 1 does not changes the
object.
Uniform Scaling: To achieve uniform scaling the values of scaling factor must be kept
equal.
Differential Scaling: Unequal or Differential scaling is produce incases when values for
scaling factor are not equal.
As per usual phenomenon of scaling an object moves closer to origin when the values of
scaling factor are less than 1. To prevent object from moving or changing its position
while is scaling we can use a point that is would be fixed to its position while scaling
which is commonly referred as fixed point (xf yf).
REFLECTION
Reflection is nothing more than a rotation of the object by 180o. In case of reflection the
image formed is on the opposite side of the reflective medium with the same size.
Therefore we use the identity matrix with positive and negative signs according to the
situation respectively.
HOMOGENEOUS COORDINATES
We have seen that basic transformations can be expressed in matrix form. But many
graphic application involve sequences of geometric transformations. Hence we need a
general form of matrix to represent such transformations. This can be expressed as:
Thus, a general homogeneous coordinate representation can also be written as (h.x, h.y,
h). For 2D geometric transformations, we can choose the homogeneous parameter h to
any non-zero value. Thus, there is an infinite number of equivalent homogeneous
representations for each coordinate point (x,y). A convenient choice is simply to h=1.
Each 2D position is then represented with homogeneous coordinates (x,y,1). Other
values for parameter h are needed, for eg, in matrix formulations of 3D viewing
transformations.
or
or
or
3D GEOMETRIC TRANSFORMATION
GENERAL 3-D ROTATION
Rotation in three dimension is more complex than the rotation in two dimensions. Three
dimensional rotations require the prescription of an angle of rotation and an axis of
rotation. The canonical rotations are defined when one of the positive x,y,z coordinate
axis is chosen as the axis of rotation. then the construction of rotation transformation
proceeds just like that of a rotation in two dimensions about the origin.
Steps to be performed
1. Translate origin to A1
3. Rotate line P1P2 about z-axis which is already aligned with the Rotation axis.
4. Reverse steps 2
5. Reverse step 1
MATHEMATICS OF PROJECTIONS
Viewing in Three Dimensions: Mathematics of Projections
We now have the preliminaries settled: how to build a model, and how to transform it.
Next we have to discuss how to produce an actual picture. This process is called
rendering. We have so far only considered surface models, so we are about to describe
surface rendering. (Renderers are tailored to a particular kind of model representation.)
We start from a mesh model, generally formed from triangular facets. We shall look at
producing a shaded colour picture, which will involve
Pre-processing the model, to remove parts which cannot be seen in the final picture.
This involves both clipping and back-face culling
Lighting the model. This includes the use of light direction and intensity; but it also
includes surface reflection calculations (dierent surfaces have dierent reflective
proper-ties).
Projecting from 3D to 2D: projective transformations such as perspective.
Hidden surface removal: only at this stage do we discover which objects obscure
parts of other objects.
We will also look at how to incorporate texture detail on surfaces, for greater realism.
Hidden surface removal is the removal of any part of a surface which is occluded by
another surface, from the viewpoint. This is the most complex to implement: in principle
it requires every triangle to be compared with every other triangle. Contrast this with
back-face removal, which can be done with knowledge of each triangle in isolation. HSR
may require clipping, because part of a triangle may be visible. We will always do back-
face removal first, because that dramatically reduces the scale of HSR calculation.
Culling and Clipping in 3D
We wish to cull those parts of the model that cannot be seen because they are outside the
viewing volume.
Culling is very useful for large models: if we can discard (i.e., not bother to consider)
half the model because we know it cannot be seen from this window, then we have
halved the amount of computation necessary. Indeed culling can save a huge chunk of
time because often most of the model is not viewable, for example in a VR environment.
Most facets will be entirely inside the viewing volume or entirely outside. We accept the
former for further processing and reject the latter. The problem case is those polygons
which are partly viewable. We have to scissor-away the section of each which cannot be
seen: hence the term clipping. In 2D, clipping is simply a calculation of what
intersectsthe edges of the display/picture. It is not quite so simple in 3D:
The volume that the eye can see is a truncated pyramid. The near plane is the screen, the
far plane at some convenient distance. There are thus six clipping planes which bound
the viewing volume. The mathematical term for a solid sliced by two parallel planes is a
frustum, so this is also called the viewing frustum.
Clipping is usually done by a fast subdivision method: for each edge in the model we
check against a clipping plane and find whether the two ends are
(a) both outside the viewing volume: throw it away
% both inside the viewing volume: (potentially) draw it
% one inside one outside: bisect the line and recurse on each half
Testing for inside or outside is a matter of plugging the coordinates into the equation for
the clip plane, and seeing if the result is positive or negative.
We have to test against each clip plane individually and combine the results. It could be
that the ends of an edge are outside the viewing volume, but the middle of the edge
intersects
An alternative to bisection is to compute the intersection of the edge with the clip plane,
and then each sub-edge will fall into category (a) or (b).
You can also see from this why we cannot rely exclusively on 2D clipping. A 2D clip is
performed against the edges of the display i.e. after we have projected the 3D scene
down to 2D. Triangles which are behind the viewer would project onto the screen as
well, so we have to cull them at the 3D stage.
Back-face removal
In a similar spirit we can throw away any facets which are facing away from the viewer.
This is know as back-facing culling or back-face removal.
The reason we can do this is that most real objects have a non-negligible thickness. For
example, both sides of a wall have to be modelled to give an accurate shape to a
building. However, if I am standing on one side of a wall, I cannot see the other side of
it. So we can throw away the polygons which are facing away from the viewer, reducing
the number of polygons to be considered when producing the picture. We do this to
improve the eciency of later stages.
UNIT-3
GEOMETRIC MODELING
REQUIREMENTS OF GEOMETRIC MODELING:
The models should emphasize the relevant aspects of objects. As this research is concerned
with model shape and structure, rather than reflectance, these are: surface shape, intersurface
relationships (e.g. adjacency and relative orientation), surface-object relationships and
subcomponent-object relationships. To recognize the objects in the test scene, the geometric
models will have to:
make surface information explicit - to easily match image surface data,
have three dimensional, transformable object-centered representations - because
objects can take arbitrary, unexpected spatial locations and orientations,
have geometric subcomponent relationships - because of the structuring of the surface
clusters and the physical constraints on their placement,
represent solid and laminar objects - to handle the variety in the scene and
have attachments with degrees-of-freedom - for recognizing articulated objects (e.g.
the robot).
REQUIREMENTS:
Complete part representation including Complete part representation including
topological topological and geometrical data
Geometry: shape and dimensions
Topology: the connectivity and associativity of the object entities; it determines the
relational information between object entities information between object entities
Able to transfer data directly from CAD to CAE and CAM.
Support various engineering applications, such as mass properties, mechanism
analysis, and FEA/FEM and tool path creation for CNC and so on tool path creation
for CNC, and so on.
Size, shape and curvature parameters of individual surfaces and boundary segments,
Non-structural object relations, such as subtype or subclass,
Adjacency of surfaces and their relative orientation and
Typical configurations of visible components.
REQUIREMENTS OF GEOMETRIC MODELING
The functions that are expected of geometric modelling are:
Design analysis:
Evaluation of areas and volumes.
Evaluation of mass and inertia properties.
Interference checking in assemblies.
Analysis of tolerance build-up in assemblies.
Analysis of kinematics . mechanics, robotics.
Automatic mesh generation for finite element analysis.
Drafting:
Automatic planar cross sectioning.
Automatic hidden line and surface removal.
Automatic production of shaded images.
Automatic dimensioning.
Automatic creation of exploded views for technical illustrations.
Manufacturing:
Parts classification.
Process planning.
Numerical control data generation and verification.
Robot program generation.
Production Engineering:
. Bill of materials.
. Material requirement.
. Manufacturing resource requirement.
. Scheduling.
Inspection and Quality Control:
. Program generation for inspection machines.
. Comparison of produced part with design.
GEOMETRIC MODELS:
The geometric models can be broadly categorised into two types:
1. Two-dimensional, and
2. Three-dimensional.
3 D GEOMETRIC REPRESENTATION TECHNIQUES
Given a point, a circle may be constructed of any desired radius, and a diameter drawn
through the center. Call the center , and the right end of the diameter .
The diameter perpendicular to the original diameter may be constructed by finding
the perpendicular bisector. Call the upper endpoint of this perpendicular diameter . For
thepentagon, find the midpoint of and call it . Draw , and bisect , calling
the intersection point with . Draw parallel to , and the first two points of
the pentagon are and . The construction for the heptadecagon is more complicated, but
can be accomplished in 17 relatively simple steps. The construction problem has now been
automated (Bishop 1978).
Simple algebraic operations such as , , (for a rational number), , ,
and can be performed using geometric constructions (Bold 1982, Courant and Robbins
1996). Other more complicated constructions, such as the solution of Apollonius' problem and
the construction of inverse points can also accomplished.
One of the simplest geometric constructions is the construction of a bisector of a line segment,
illustrated above.
The Greeks were very adept at constructing polygons, but it took the genius of Gauss to
mathematically determine which constructions were possible and which were not. As a result,
Gauss determined that a series of polygons(the smallest of which has 17 sides;
the heptadecagon) had constructions unknown to the Greeks. Gauss showed that
the constructible polygons (several of which are illustrated above) were closely related to
numbers called theFermat primes.
Wernick (1982) gave a list of 139 sets of three located points from which a triangle was to be
constructed. Of Wernick's original list of 139 problems, 20 had not yet been solved as of 1996
(Meyers 1996).
It is possible to construct rational numbers and Euclidean numbers using
a straightedge and compassconstruction. In general, the term for a number that can be
constructed using a compass and straightedge is aconstructible number. Some irrational
numbers, but no transcendental numbers, can be constructed.
It turns out that all constructions possible with a compass and straightedge can be done with
a compass alone, as long as a line is considered constructed when its two endpoints are
located. The reverse is also true, since Jacob Steiner showed that all constructions possible
with straightedge and compass can be done using only a straightedge, as long as a
fixed circle and its center (or two intersecting circles without their centers, or three
nonintersecting circles) have been drawn beforehand. Such a construction is known as
a Steiner construction.
Geometrography is a quantitative measure of the simplicity of a geometric construction. It
reduces geometric constructions to five types of operations, and seeks to reduce the total
number of operations (called the "simplicity") needed to effect a geometric construction.
Dixon (1991, pp. 34-51) gives approximate constructions for some figures
(the heptagon and nonagon) and lengths (pi) which cannot be rigorously constructed.
Ramanujan (1913-1914) and Olds (1963) give geometric constructions for .
Gardner (1966, pp. 92-93) gives a geometric construction for
Steinhaus (1999, p. 143). Constructions for are approximate (but inexact) forms of circle
squaring.
CURVE REPRESENTATION METHODS:
Representing Curves
Motivations
Techniques for Object Representation
Curves Representation
Free Form Representation
Approximation and Interpolation
Parametric Polynomials
Parametric and Geometric Continuity
Polynomial Splines
Hermite Interpolation
3D Objects Representation
Solid Modeling attempts to develop methods
and algorithms to model and represent real
objects by computers
Objects Representation
Three types of objects in 3D:
1D curves
2D surfaces
3D objects
We need to represent objects when:
Modeling of existing objects (3D scan)
- modeling is not precise
Modeling a new object from scratch (CAD)
- modeling is precise
- interactive sculpting capabilities
Curve representation:
Representation of curve geometry can be carried out in two forms:
Implicit form, and
Parametric form.
In parametric form, the curve is represented as
X = x(t)
Y = y(t)
Z = z(t)
Circle
Ellipse
Splines: -
Bezier curve
Splines: -
B Splines
Curves Representation
Parametric Polynomials
For interpolating n points we need a polynomial of degree n-1
BZIER CURVE:
The Bzier Curve is the original computer generated "French Curve" and it's
discovery is attributed to the French engineer, Pierre Bzier. Let us first review
ideas concerning the cubic polynomial of degree 3 passes through the
4 points for and is shown in Figure 1.
SURFACE REPRESENTATION METHODS:
Free Form Surfaces
Model generated using the sculptured surfaces (Image appears
with the permission of IBM World Trade Corporation/Dassault Systems - Model
generated using CATIA)
Types of surfaces
Planar surface
Curved surface
Single curved
Double curves
Ruled surface
Coons surface
Bezier surface
B-spline
Lofted surface
Skinning or Lofting
Example of skinning method for model generation
Shaded image of a CAD geometric model ((Image appears with the permission
of IBM World Trade Corporation/Dassault Systems - Model generated using
CATIA))
Drafting Features
Section view generation from a geometric model
Programming Facility
Programming ability (MACRO programming) is a useful feature. Used to customized for a
given range of application processes specific to the company.
Analysis Features
Consideration of kind of analysis facilities to be carried out on a product models
Simple analysis such as area, volume centre of gravity to a general purpose analysis
such as FEA
Assembly facility is also a required feature so that associated interference checking
could be done
Connecting Features
Data generated could also be used with other systems
Ideally an integrated data base structure would be useful to shared with other allied
modules such as Pro Engineer with Unigraphics or Catia.
UNIT-4
DRAFTING AND MODELING SYSTEMS
BASIC GEOMETRIC COMMANDS:
All AutoCAD commands can be typed in at the command line. Many commands also have
one
or two letter aliases that can also be typed as shortcuts to the commands.
1. Type the desired command at the command prompt.
Command : LINE
or
2. Type the commands alias. Command: L
3. Press ENTER/Space to end.
4. Type an option at the command prompt.
TIP: Many AutoCAD commands require you to press ENTER to complete the command. You
know you are no
longer in an AutoCAD command when you see a blank command line.
Reissuing the Last Command
The last used AutoCAD command can be re-entered by one of the following three methods
of ENTER. The ENTER key on the keyboard will always act as ENTER, the SPACEBAR
and
RIGHT MOUSE will act as enter most of the time (exceptions include placing TEXT).
1. Press the ENTER key on the keyboard
or
2. Press the Space bar on the keyboard.
or
3. Click the right mouse button.
Pointing Device (Mouse)
AutoCAD uses either a mouse or digitizing tablet to select objects in a drawing.
Left Mouse Button
Used to pick or select objects
1. Click the left mouse button to select an object area in the drawing.
2. Press ESC twice to deselect an object (or to cancel a command).
Right Mouse Button
Used to enter a command, repeat last command, or access shortcut menus.
1. Click the right mouse button.
TIPS:
SHIFT + the right mouse button brings up the object snap menus.
Various screen locations for the mouse brings up different menus. menus.
Creating a New Drawing
NEW Command
Creates a new drawing file.
1. Choose File, New.
or
2. Press CTRL + N
or
3. Click the New icon.
or
4. Type NEW at the Command prompt.
Command: NEW
5. Choose One of the options for creating a new drawing.
6. Click The OK button.
7. Save the drawing as another name.
TIP:
New drawings can also be created from Template Files.
Line Command
Creates single straight line segments
1. Choose Draw, Line.
or
TIPS:
You can continue the previous line or arc by responding to
the From point: prompt with a space or ENTER.
Choose the right mouse button for the line pop-up menu to
appear while in the line command
Pline Command
A polyline is a connected sequence of line segments created as a single
object. You can create straight line segments, arc segments, or a
combination of the two.
1. Choose Draw,Polyline.
or
Orthogonal Lines
Controls lines from being drawn at various angles to straight lines. When the
snap grid is rotated, ortho mode rotates accordingly.
1. Press Function Key F8.
or
2. Double Click ORTHO from the Status Bar.
or
3. Press CTRL + L.
Rectangle
1. Choose Draw, Rectangle.
or
Circles
Circle Command
1. Choose Draw, Circle.
or
2. Click the Circle icon.
or
3. Type CIRCLE at the command prompt.
Command: CIRCLE
4. Type One of the following options:
3P/2P/TTR/<<center point>>:
Circle, Center Radius
Circle, Center Diameter
Circle, Tangent, Tangent Radius
Circle, Tangent, Tangent, Tangent
or
5. Pick A center point.
6. Type A radius or diameter.
7. Pick A radius or diameter
Diameter/<<radius>>:
TIPS:
- To create circles that are the same size, press
ENTER when asked for the circle radius.
- When selecting a circle with a pickbox, be sure
to select the circumference of the circle.
Arc Command
1. Choose Draw, Arc.
or
2. Click the Arc icon.
or
3. Type ARC at the command prompt
Command: ARC
4. Draw One of the arcs.
TIPS:
-Except for 3 point arcs, arcs are drawn in a COUNTERCLOCKWISE
direction.
- While in the arc command, press the right mouse button to select the
following options for arcs:
Arc Examples
Spline
The SPLINE command creates a particular type of spline known as a
nonuniform rational B-spline (NURBS) curve. A NURBS curve produces a
smooth curve between control points.
Creating Layers
LAYER: Creates named drawing layers and assigns color and linetype properties to those layers.
Command: LAYER (enter)
A Layer & Linetype Properties dialog box will be displayed. To add a new layer, pick the
New button. A new layer listing appears, using a default name of Layer1. the layer name
can be changed by highlighting the layer name. Colors and Linetypes can be assigned to
each new layer by picking the color box to assign a color and picking the linetype box to
assign a line type.
Or
3. Type ZOOM at the command prompt.
Command: Zoom or Z
4. Type One of the following zoom options:
The following are basic zoom options:
All Places entire drawing (all visible layers) on
display at once. Forces a regeneration.
Extents Displays current drawing content as large as possible.
Previous Restores previous view.
Window Designates rectangular area to be drawn as large as
possible.
Number Magnification relative to ZOOM All display
Number X Magnification relative to current display (1X)
Center Specifies center point and new display height.
Dynamic Permits you to pan a box representing the viewing
screen around the entire generated portion of the
drawing and enlarge or shrink it.
TIPS:
-While in the ZOOM command, click with the right mouse button to see the menu to the right.
Display Commands
LIMITS: Sets the size of the drawing paper. For size "A" drawing paper the limits should be set for
10.5 x 8.
Command: LIMITS (enter)
On/Off/Lower left corner <0.0000> (enter)
Upper right corner: 10.5,8 (enter)
Note: To return the picture to its original viewing size enter ALL and press the enter key
when prompted instead of defining a window.
PAN: Allows you to move your view point around the drawing without changing the
magnification factor.
Command: PAN (enter)
EDITING:
Editing Commands
CHANGE: Alters properties of selected objects
Command: CHANGE (enter)
Select objects or window or Last (select objects to be changed)
Properties/<Change point>: (type P)
Change what property (Color/Elev/LAyer/LType/Thickness)? (type Layer)
New Layer: (enter new layer name and press enter)
GRIPS
You can edit selected objects by manipulating grips that appear at defining points on the object. Grips is
not a command. To activate grips simply pick the object. Small squares will appear at various entity-
specific positions. By selecting an end grip you can stretch the entity to change its size. By selecting the
center grip you can move the entity to a new location. To remove grips press CTL-C twice. You can
perform the following using grips: Copy, Multiple Copy, Stretch, Move, Rotate, Scale, and Mirror.
DIMENSIONING
Linear Dimensions:
1.Choose Dimension, Linear.
or
2. Click the Linear Dimension command from the toolbar.
or
3. Type DIM at the command prompt. Command: DIM Dim: HOR or VER
Aligned Dimensions:
1.Choose Dimension, Aligned.
or
2. Click the Aligned Dimensioncommand from the toolbar.
or
3. Type DIM at the command prompt. Command: DIM Dim: ALIGNED
Arclength Dimensions:
1.Choose Dimension, Arclength.
Or
2. Click the ArcLength Dimensioncommand from the toolbar.
Radial Dimensions:
1.Choose Dimension, Radius or Diameter.
or
2. Click the Radial Dimensions command from the toolbar.
or
3. Type DIM at the command prompt. Command: DIM Dim: RADIUS or DIAMETER
Or
3. Type DIM at the command prompt. Command: DIM Dim: JOGGED
Baseline Dimensions:
1. Choose Dimension, Baseline.
or
2. Click the Baseline Dimensions command from the toolbar
or
3.Type DIM at the command prompt. Command: DIM Dim: BASELINE
Continued Dimensions:
Leader Settings:
1. Type QLEADER at the command prompt. Command: QLEADER
2. Type S at the QLEADER prompt to change the leader settings.
3. Choose a setting from the following dialog box.
Quick Dimensions:
Quickly creates dimension arrangements from the geometry you select.
1.Choose Dimension, QDIM.
or
2.Click the Quick Dimension icon from the Dimensions toolbar
or
3. Type QDIM at the command prompt. Command: QDIM
4. Pick the objects to dimension.
Modifying Dimensions:
DDEDIT 1. Choose Modify, Object, Text. 2. Choose the dimension text to modify. TIP: The actual dimensionis
placed in brackets <>. Text can be placed in front of or behind these brackets. If text is placed between the
brackets, the dimensionloses its associative properties.
Stretching Dimensions:
1. Choose Modify, Stretch.
2. Choose a crossing window around the area to stretch. Be sure to include the dimension endpoints.
Dimension Edit Commands:
HOMetext Moves the Dimension text back to its home (default) position.
NEWtext Modifies the text of the Dimensions.
Rotate Rotates dimension text.
OBlique Sets the obliquing angle of Dimension extension lines.
OVerride Overrides a subset of the Dimension variable settings.
UPdate Redraws the Dimensions as directed by the current settings of all dimensioning variables.
Ordinate Dimensions:
1. Choose Dimension, Ordinate
2. Type DIMORDINATE at the command prompt. Command: Dimordinate
SOLID MODELING:
NC machines are method of automation, where automation of medium and small volume
production is done by some controls under the instructions of a program. Various definitions
of NC are :
A system in which actions are controlled by direct insertion of Numerical Data at some point.
Numerical Control is defined as a form of software controlled automation, in which the
process is controlled by alphanumeric characters or symbols.
According to these definitions, a programme is prepared which consists of blocks, blocks
consisting of combination of characters and numbers in sequence describing the position of
the tool and job, the cutting speed and feed. The data converted into coded instructions which
are called a Part Programme. As the job changes, the instructions of part program are also
changed. The other instructions which can be included may be for tool changing or coolant on
and off. It is easy to encode a new programme than to change the machinery for flexibility,
thus arising the need of an NC machine tool.
5.2 NC Modes
PRINCIPLES OF NC MACHINES
The basic elements and operation of a typical NC machine in numerical control and the
components basically involved of data input, data processing and data output. For data
input, numerical information is read and stored in the tape reader or in computer
memory. In data processing, the programs are read into machine control unit for
processing. For data output, this information is translated into commands, typically
pulsed commands to the motor. The motor moves the table on which the work piece is
placed to specified positions, through linear or rotary movements, by the motors, ball
screw, and others devices.
A NC machine can be controlled through two types of circuits, which is open loop and
closed loop.
In the open loop system, the signals are given to the motor by the processor,
but the movements and final destinations of the worktable are not accurate. The open
loop system cannot accurate, but it still can produce the shape that is required.
The closed loop system is equipped with various transducers, sensors, and counters that
measure the position of the table accurately. Through feedback control, the position of
the worktable is compared against the signal. Table movements terminate when the
proper coordinates are reached. For the close loop system normally servomotor is
utilized. For open loop system normally the stepper motor is utilized. The closed loop
system is more complicated and more expensive than the open loop.
There are two basic types of control systems in numerical control, point-to-point and
contouring.
In point-to-point system, also called positioning, each axis of the machine is
driven separately by ball screw, depending on the type of operation, at different
velocities. The machine moves initially at maximum velocity in order to reduce
nonproductive time, but decelerates as the tool reaches its numerically defined position.
Thus in an operation such as drilling or punching, the positioning and cutting take place
sequentially. The time required in the operation is minimized for efficiency.
Point-to-point systems are used mainly in drilling, punching, and straight milling
operations.
Figure 5.2 : Point to point control in NC, Drilling of 3 Holes in Flat Plate
In the contouring system, also known as the continuous path system, positioning and
cutting operations are both along controlled paths but at different velocities. Because the
tool cuts as it travels along the path, accurate control and synchronization of velocities
and movements are important. The contouring system is used on lathes, milling
machines, grinders, welding machinery and machining centers.
Figure 5.3: Continuous Path Control in NC, Profile Milling of Part Outline
5.3 NC Elements
Numerical control (NC) may be defined as a method of controlling the operation of a machine
tool by a series of coded instructions, consisting of numbers, letters of alphabet and symbols
that the machine control unit can understand. The numerical data required to produce a part is
known as part program and is used to control the relative position of work-to-tool, tool
selection, turning on cutting fluid, feeds and speeds,etc. A numerical control machine tool
system basically consists of the following three components
1. Program of Instruction,
2. Machine control unit,
3. Machine tool
Figure 5.4: Basic components of NC
Program of instructions: The part program (program of instructions) is the detailed step by
step instructions by which the sequence of processing steps is to be performed. The
programmer write the program on paper and recorded on the tape by means of tape punch.
The mpst commonly used punched tape is 25mm wide, 8 tracks, i.e., eight punched holes can
be accomodated in one line across the width of tape. The tape is then played on a tape reader.
The tape reader has the capacity of reading the punched holes either mechanically or
electronically.
Machine Control unit(MCU): The punched tape is played on a tape reader in the machine
control unit. Thye controller unit interprets the program of instructions received from the tape
reader and convert it into mechanical actions of machine tool, i.e., the signals are forwarded to
servomotors which control the movement of the slides or spindle along X, Y and Z - axis. The
controller unit controls the path to be followed by the cutting tool spindle speeds, feed rate,
tool changes and several other functions of the machine tool.
Machine tool: The machine tool perform the machining operations. It consists of work table
motors, spindle motors and controls. It also includes the cutting tools, fixtures and other
auxiliary equipment needed in the machining operation. The machine tool has the capacity to
change the tools automatically under tape command. The machine table can orient the job so
that it can be machined on several surfaces as required.
A typical NC machine tool contains the MCU (Machine control unit) and the machine
tool itself. The MCU (also known as the controller unit) is considered the brain of the
machine. It reads the part program and controls the machine tool operations. After reading the
part program, the MCU decodes it to provide commands and decoded instructions to the
various control loops of the machine axes of motion.
The MCU performs two functions: it reads the part program and controls the machine tool. It
consists of two units, one for each function. The DPU(Data processing unit) reads and
decodes the part program statements, processes the decoded information, and provides the
data to the CLU (control loop unit), the other unit. The CLU receives the data from the DPU
and converts it to control signals. The data usually provides the control information such as
the new required position of each axis, its direction of motion and velocity, and auxiliary
control signals to relays. The CLU also instructs the DPU to read new instructions from the
part program when needed, controls the drives attached to the machine leadscrews, and
receives feedback signals on the actual position and velocity of the axes of the machine. Each
axis of motion of the machine tool has its own leadscrew, control signals, and feedback
signals.
In the first and second- generation NC machine tools, the MCU has a tape drive that is able to
mount and read punched tapes that contain part programs. The tape drive is part of the DPU of
the machine.
In CNC and DNC machine tools, the DPU is replaced by the ROM and the tape drive is
elimnated all together.
Types of NC System NC
The original numerical control machines were referred to as NC machine tool. They have
hardwired control, whereby control is accomplished through the use of punched paper (or
plastic) tapes or cards. Tapes tend to wear, and become dirty, thus causing misreading. Many
other problems arise from the use of NC tapes, for example the need to manual reload the NC
tapes for each new part and the lack of program editing abilities, which increases the lead
time. The end of NC tapes was the result of two competing developments, CNC and DNC.
CNC refers to a system that has a local computer to store all required numerical data. While
CNC was used to enhance tapes for a while, they eventually allowed the use of other storage
media, magnetic tapes and hard disks. The advantages of CNC systems include but are not
limited to the possibility to store and execute a number of large programs (especially if a three
or more dimensional machining of complex shapes is considered), to allow editing of
programs, to execute cycles of machining commands, etc.
The development of CNC over many years, along with the development of local area
networking, has evolved in the modern concept of DNC. Distributed numerical control is
similar to CNC, except a remote computer is used to control a number of machines. An off-
site mainframe host computer holds programs for all parts to be produced in the DNC facility.
Programs are downloaded from the mainframe computer, and then the local controller feeds
instructions to the hardwired NC machine. The recent developments use a central computer
which communicates with local CNC computers (also called Direct Numerical Control).
Controlled Axes
NC system can be classified on the number of directions of motion they are capable to
control simultaneously on a machine tool. Each free body has six degree of freedom,
three positive or negative translations along x, y, and z-axis, and three rotations
clockwise or counter clockwise about these axes.
Commercial NC system is capable of controlling simultaneously two, two and half,
three, four and five degrees of freedom, or axes. The NC systems which control three
linear translations (3-axis systems), or three linear translations and one rotation of the
worktable (4-axis systems) are the most common.
Memory
A block of information, consisting of words, is read from tape and stored
into temporary memory called buffer. One block may contain one complete
set of instruction words in sequence. The function of this memory is to keep
on storing the next block of words when the machine is doing processing of
previous block.
Processor
The function of the processor is to coordinate and control the functions of
other units, by giving ready signals to them at appropriate point of time.
Output Channels
The data stored in the memory is converted into actuation signal and
supplied through output channels in the form of pulses.
Control Panel
The control panel has the switches, indicators, Manual Data Input (MDI) and dials for
providing information to the operator.
Feedback Channels
Feedback channel is to check whether the operations are done in the way we want to, the
feedback is sent through feedback channels by position and
velocity.
Housed MCU
Machine Control Unit may be mounted on the machine tool or may be built in the casing of
the machine.
Machine Tool
Machine tool is the main components of a numerical control system, which executes the
operations. It may consist of worktable, cutting tools, jigs and fixtures, motors for driving
spindle and coolant and lubricating system. The latest development in the numerical control
machine tool is the versatile machining center. This is a single machine capable of doing a
number of operations such as milling, boring, drilling, reaming, and tapping by Automatic
Tool Changer (ATC) under the control of tool selection instruction.
Tape Reader
Tape reader is the least reliable hardware components of the machine while any breakdown is
occurred on an NC machine.
Controller
The hard-wired controller cannot be easily altered to incorporate improvements into the unit.
Figure 5.11: Controller
Management Information
The machine tool manufacturers have been continually improving NC technology
by redesigning the systems to provide timely information such as piece counts,
machine tool change, etc. to the management.
Part Programming Mistakes
When preparing the punched tape, part programming mistakes are common and to
achieve the best sequence of processing steps.
Non-optimal Speed and Feed
The control system does not provide the provision to change the speed and feed
during the cutting operation.
The information stored in the computer can be read by automatic means and converted into
electrical signals, which operate the electrically controlled servo systems. Electrically
controlled servo systems permits the slides of a machine tool to be driven simultaneously and
at the appropriate feeds and direction so that complex shapes can be cut, often with a single
operation and without the need to reorient the work piece.
Computer Numerically Control can be applied to milling machines, Lathe machines, Grinding
machines, Boring machines, Flame cutters, Drilling machines etc.
CNC Concept
A CNC system may be characterized in terms of three major elements: hardware,software and
information.
Figure 5.13: CNC System
Hardware
Hardware includes the microprocessors that effect control system functions and peripheral
devices for data communication, machine tool interfacing and machine tool status monitoring.
Software
Software includes the programs that are executed by the system microprocessors and various
types of software associated with CNC.
Information
Information regarding the dynamic characteristics of the machine and many other information
pertaining to the process.
When any of these unreliable components fails, the diagnostics subsystem would
automatically disconnect the faulty component from the system and activate the redundant
component in place of faulty one so that newly installed component can perform its function.
Refer A.1
(a) Determine the startup procedure, which includes the extraction of dimensional data from
part drawings and data regarding surface quality requirements on the machined component.
(b) Select the tool and determine the tool offset.
(c) Set up the zero position for the workpiece.
(d) Select the speed and rotation of the spindle.
(e) Set up the tool motions according to the profile required.
(f) Return the cutting tool to the reference point after completion of work.
(g) End the program by stopping the spindle and coolant.
The part programming contains the list of coordinate values along the X, Y and Z directions of
the entire tool path to finish the component. The program should also contain information,
such as feed and speed. Each of the necessary instructions for a particular operation given in
the part program is known as an NC word. A group of such NC words constitutes a complete
NC instruction, known as block. The commonly used words are N, G,X,Y,Z,A,B,C,F, S, T,
and M.
Where
N = Sequence number of instruction,
G = Preparatory function,
XYZABC = Coordinate and angular data
F= Feed
S= Spindle Speed
T= Tool code
M= Miscellaneous function
The program is directly input into the machine's memory through the following methods:
i. Manual data input through the keyboard of the NC console.
ii. A floppy disc and disc drive or magnetic tape.
iii DNC mode - directly from the computer used for programming or storage of
program to the memory of the CNC machine.
iv. The program can be transferred to the machine through a LAN or through
Internet.
Hence the methods of part programming can be of two types depending upon the two
techniques as below :
(a) Manual part programming, and
(b) Computer aided part programming.
Over the past years, lot of effort is devoted to automate the part programme generation. With
the development of the CAD (Computer Aided Design)/CAM (Computer Aided
Manufacturing) system, interactive graphic system is integrated with the NC part
programming. Graphic based software using menu driven technique improves the user
friendliness. The part programmer can create the geometrical model in the CAM package or
directly extract the geometrical model from the CAD/CAM database. Built in tool motion
commands can assist the part programmer to calculate the tool paths automatically. The
programmer can verify the tool paths through the graphic display using the animation function
of the CAM system. It greatly enhances the speed and accuracy in tool path generation.
Figure 5.14:Interactive Graphic System in Computer Aided Part Programming
Using the example shown in above figure. The words are as follows :
N001 represents the sequence number of the operation.
G01 represents linear interpolation.
X12345 will move the table in a positive direction along the X-axis.
Y06789 will move the table along the Y-axis.
M03 Spindle on CW and
; End of block.
Manual Setting
The operator can use the MCU controls to locate the spindle over the desired part
zero and then set the Xand Y coordinate registers on the console to zero.
Coordinate Word
A co ordinate word specifies the target point of the tool movement or the distance to be
moved. The word is composed of the address of the axis to be moved and the value and
direction of the movement.
Example
X150 Y-250 represents the movement to (150, - 250). Whether the dimensions are
absolute or incremental will have to be defined previously using G-Codes.
Spindle Function
The spindle speed is commanded under an S address and is always in revolution per
minute. It can be calculated by the following formula :
Example
S1000 represents a spindle speed of 1000 rpm
Feed Function
The feed is programmed under an F address except for rapid traverse. The unit may be in
mm per minute or in mm per revolution. The unit of the federate has to be defined at the
beginning of the programme. The feed rate can be calculated by the following formula
Example
F100 represents a feed rate of 100 mm/min.
Tool Function
The selection of tool is commanded under a T address. T04 represents tool number 4.
Rapid Positioning
This is to command the cutter to move from the existing point to the target point at the
fastest speed of the machine.
Figure 5.18: Rapid Positioning
Linear Interpolation
This is to command the cutter to move from the existing point to the target point along a
straight line at the speed designated by the F address.
Circular Interpolation
This is to command the cutter to move from the existing point to the target point along a
circular arc in clockwise direction or counter clockwise direction. The parameters of the
center of the circular arc is designated by I, J and K addresses. I is the distance along the
X-axis, J along the Y, and K along the Z. This parameter is defined as the vector from the
starting point to the center of the arc.
SYMBOLS USED
% Main Programme (1 to 9999)
L Sub program (1 to 999)/Home position
N Sequence of block number.
Lf Block end (EOB) means ; or *
T Tool number or Tool station number
D Tool offset
S Spindle speed
F Feed
M Switching function
G Transverse commands
R Parameters
I, J, K Circle parameters
B/U/R Radius
X/Y/Z Axis coordinates
P Passes.
Appendix 1
A.1 CONVERGENCE OF MACHINE TOOLS
Manufacturing engineers are familiar with various basic machining processes like turning,
boring, milling, drilling, grinding etc. Manual machines are generally designed to primarily
cater to any one of these processes. For example, lathes are designed for turning and allied
operations like thread cutting, drilling along the spindle axis, grooving and knurling though
processing engineers may carry out many other operations with suitable tooling or
attachments. A boring machine can be used for milling and drilling in addition to boring. A
milling machine can be used for a variety of other machining operations other than just
milling. Many axi-symmetric components may have off centre holes, milled features etc. The
practice before the advent of CNC machines involved carrying out the primary machining in
one machine and moving the component to other machines for subsequent operations. For
example, a component with off centre holes and a milled feature as shown in Fig. A.1 is
machined fist in a lathe and the subsequent machining carried out in a drilling machine and
milling machine for drilling off centre holes and
slot respectively. With the development of turning centres, all these operations could be done
in machine without set up changes, thereby increasing productivity and accuracy.
The CNC lathe operation such as simple facing, turning, taper turning, thread, boring,
parting off etc. The X-axis and Z-axis are taken as the direction of transverse motion of
the tool post and the axis of the spindle respectively. To prepare part programs using
G-codes and M-codes. The following examples illustrated the part program for different
components.
Example
01 (All dimensions are in mm).