You are on page 1of 28

DEPARTMENT OF MECHANICAL ENGINEERING

CAD/CAM LAB (EME-751)

LIST OF EQUIPMENT

S.NO NAME OF EQUIPMENTS QTY.


1 1
CNC LATHE
2 20
COMPUTER
1
3 PRO/E SOFTWARE 500 USER LICENSE
1
4 SOLID WORK 20 USER LICENSE
1
5 AUTOCAD 60 USER LICENSE
1
6 PRINTER
1
7 SCANNER

LIST OF EXPERIMENTS
1. To write a C-Program for drawing line using
Bresenham’s algorithm.

2. To write a C-Program for drawing circle using mid point


algorithm.

3. To write a C-Program for transformations (translation/


scaling/ rotation) of given coordinates.

4. To write and simulate a manual part program for step


turning of a given drawing (By single step metal removal
and by canned cycle).

5. To write and simulate a manual part program for taper


turning of a given drawing (By single step metal removal
and by canned cycle).

6. To write and simulate a manual part program for drilling


of a given drawing.

7. To write and simulate a manual part program for cutting


of given profile on milling of a given drawing.

8. To draw 2D drawings by using basic AutoCAD


commands.

9. To make solid models of a mechanical components using


Pro/E.

CAD/CAM LAB (TME 751)


GENERAL INSTRUCTIONS

DO’S
 Switch off mobiles in the lab
 Bring your lab record with you
 Always come to the lab in time
 Maintain silence and be attentive
 Keep individual records of observations
 Always turn off the computer before leaving the lab
 Return all the materials issues to you before leaving the lab
 Read the instruction manual carefully before performing any
experiment
 Follow the instruction manual of CNC Machine properly.
 Use the emergency switch of CNC Machine if necessary.
 Keep all the belongings outside the lab except lab file and
necessary books.
DONT'S

Change Current setting


Over any mark on instruction manual
Drag the stool and chair inside the lab
Leave the lab till the class has concluded
Take any material outside the lab with you
Touch any machine /equipment/model without supervision
Operate the CNC Machine in the absence of instructor.
During the lab timings don’t use internet.

INDEX
S. No. EXPERIMEN OBJECTIVE DATE SIGN
T No.
1 To write a C-Program for drawing
line using Bresenham’s algorithm.
2 To write a C-Program for drawing
circle using mid point algorithm.
3 To write a C-Program for
transformations (translation/
scaling/ rotation) of given
coordinates.
4 To write and simulate a manual
part program for step turning of a
given drawing (By single step
metal removal and by canned
cycle).
5 To write and simulate a manual
part program for taper turning of a
given drawing (By single step
metal removal and by canned
cycle).
6 To write and simulate a manual
part program for drilling of a given
drawing.
7 To write and simulate a manual
part program for cutting of given
profile on milling of a given
drawing.
8 To draw 2D drawings by using
basic AutoCAD commands
9 To make solid models of a
mechanical components using
Pro/E.
10 To study the robotic arm.
EXPERIMENT NO.1 DATE
BRESENHAM'S LINE DRAWING ALGORITHM
1.1 OBJECTIVE, 1.2 PRE REQUISITES, 1.3 ALGORITHM, 1.4 PROGRAMME, 1.5 OUTPUT, 1.6 QUESTIONS

1.1 OBJECTIVE:
To write Bresenham's line drawing algorithm by using C programme and running it
on computer.

1.2 PRE REQUISITES:


Computer graphics basics
Basic mathematical equations of line
Line drawing algorithm
Fundamentals of C programming
Fundamentals of using computer

1.4 ALGORITHM:
Write the step by step procedure for Bresenham's line drawing algorithm in the
space provided below:

Consider drawing a line on a raster grid where we restrict the allowable slopes of the line
to the range .

If we further restrict the line-drawing routine so that it always increments x as it plots, it


becomes clear that, having plotted a point at (x,y), the routine has a severely limited range
of options as to where it may put the next point on the line:

 It may plot the point (x+1,y), or:


 It may plot the point (x+1,y+1).

So, working in the first positive octant of the plane, line drawing becomes a matter of
deciding between two possibilities at each step.

We can draw a diagram of the situation which the plotting program finds itself in having
plotted (x,y).

In plotting (x,y) the line drawing routine will, in general, be making a compromise
between what it would like to draw and what the resolution of the screen actually allows
it to draw. Usually the plotted point (x,y) will be in error, the actual, mathematical point
on the line will not be addressable on the pixel grid. So we associate an error, , with
each y ordinate, the real value of y should be . This error will range from -0.5 to
just under +0.5.

In moving from x to x+1 we increase the value of the true (mathematical) y-ordinate by
an amount equal to the slope of the line, m. We will choose to plot (x+1,y) if the
difference between this new value and y is less than 0.5.
Otherwise we will plot (x+1,y+1). It should be clear that by so doing we minimise the
total error between the mathematical line segment and what actually gets drawn on the
display.

The error resulting from this new point can now be written back into , this will allow
us to repeat the whole process for the next point along the line, at x+2.

The new value of error can adopt one of two possible values, depending on what new
point is plotted. If (x+1,y) is chosen, the new value of error is given by:

Otherwise it is:

This gives an algorithm for a DDA which avoids rounding operations, instead using the
error variable to control plotting:

This still employs floating point values. Consider, however, what happens if we multiply
across both sides of the plotting test by and then by 2:
All quantities in this inequality are now integral.

Substitute for . The test becomes:

This gives an integer-only test for deciding which point to plot.

The update rules for the error on each step may also be cast into form. Consider the
floating-point versions of the update rules:

Multiplying through by yields:

which is in form.

Using this new ``error'' value, , with the new test and update equations gives
Bresenham's integer-only line drawing algorithm:
 Integer only - hence efficient (fast).
 Multiplication by 2 can be implemented by left-shift.
 This version limited to slopes in the first octant, .

1.4 PROGRAMME:
Write C programme for the algorithm in the space provided below:
1.5 OUTPUT:
Write the output obtained by the programme:
1.6 REVIEW QUESTIONS:
1. Digitize the line with end points (5, 6) and (15, 18) using Bresenham's line
algorithm.
2. Extend line drawing algorithm to generate lines with any slope, taking symmetry
between quadrants into account.
3. Set up a parallel version of Bresenham's line algorithm for slopes in the range
0<m<1.
4. Devise a consistent scheme for implementing the polyline function, for any set of
input line endpoints, using a modified Bresenham's line algorithm so that
magnitudes are maintained.
EXPERIMENT NO.2 DATE
MIDPOINT CIRCLE ALGORITHM
_____________________________________________________________
____
2.1 OBJECTIVE, 2.2 PRE REQUISITES, 2.3 THEORY, 2.4 PROGRAMME, 2.5 OUTPUT, 2.6 QUESTIONS

2.1 OBJECTIVE:
To write Midpoint circle algorithm by using C programme and running it on
computer.

2.2 PRE REQUISITES:


Computer graphics basics
Basic mathematical equations of circle
Circle drawing algorithm
Fundamentals of C programming
Fundamentals of using computer

2.4 THEORY:
Write the step by step procedure for Midpoint circle algorithm in the space
provided below:
Circle is the set of points that are equidistant from a special point in the plane. The
special point is the center. The center of a circle is also the intersection of any two distinct
diameters. Diameter is the maximum distance from one point on a circle to another.
Radius is the distance from the center to any point on a circle. Therefore, the length of the
radius is equal to half of the length of the diameter.

The segment that joins any two distinct points on a circle is a chord. Hence, the diameter
is also known as a chord that contains the center.

The curve that joins any two distinct points on a circle is an arc. Hence, two different
points on a circle can form two arcs: one major arc and one minor arc. If the two points
are the endpoints of a diameter, then the two arcs are known as the semicircles.

An additional property of a circle is that the angle subtends from the center is 360 degrees
(or 2 pi radians).
2.4 PROGRAMME:
Write C programme for the algorithm in the space provided below:
2.5 OUTPUT:
Write the output obtained by the programme:
2.6 REVIEW QUESTIONS:
1. Why we can't generate exact circular path in the computer graphics output.
2. The radius of circle is 20 calculate points on the circumference using mid point
circle algorithm.
3. Set up a procedure for a parallel implementation of the mod point circle
algorithm.

EXPERIMENT NO. 3 DATE

TITLE: 2D TRANSFORMATION

3.1 OBJECTIVE, 3.2 PRE REQUISITES, 3.3 THEORY, 3.4 ALGORITHM, 3.5 PROGRAMME, 3.6
OUTPUT, 3.7 QUESTIONS

3.1 OBJECTIVE: How to implement 2D transformation

3.2 PRE REQUISITES:


Computer graphics basics
Basic mathematics of matrix multiplication
Basics of Transformations of objects
Fundamentals of C programming
Fundamentals of using computer

3.3 THEORY: Transformations are a fundamental part of computer graphics.


Transformations are used to position objects, to shape objects, to change viewing
positions, and even to change how something is viewed (e.g. the type of perspective that
is used) There are 4 main types of transformations that one can perform in 2 dimensions:
 translations
 scaling
 rotation

These basic transformations can also be combined to obtain more complex


transformations. In order to make the representation of these complex transformations
easier to understand and more efficient, we introduce the idea of homogeneous
coordinates.

3.4 ALGORITHM:

Translation: Consider a point p(x,y). We can translate it means shift it to new position
p’(x’,y’)by adding tx in x and ty in y where tx and ty are the translating factor.

Scaling : To change the size of an object such that we can magnify the size or reduce it.
This process is called scaling .Suppose P(x,y) is the point which we want to scale, after
scaling we get new point having co-ordinates as p’(x’,y’).

Rotation : If we want to rotate an object or a point about an arbitrary point then first of
all we translate the point about which we want to rotate to the origin. Then rotate the
point or object about origin and at the end we again translate it to original place. We get
rotation about arbitrary point.

3.5PROGRAMME:
Write C programme for the matrix multiplication in the space provided below:
3.6 OUTPUT:
6.7REVIEW QUESTIONS:
1. What is composite transformation used in computer graphics
2. Briefly explain common types of transformations used.
3. Briefly explain homogeneous coordinates.
EXPERIMENT NO. 4 DATE
CNC PROGRAMME FOR LATHE OPERATIONS
4.1 OBJECTIVE, 4.2 PRE REQUISITES, 4.3 FIGURE, 4.4 PROGRAMME, 4.5 QUESTIONS

4.1 OBJECTIVE:
To write CNC programme by using ISO codes for turning process

4.2 PRE REQUISITES:


Basics of computer aided manufacturing
Fundamentals of computer numerical control
Knowledge of turning operation

4.3 FIGURE:
Write the step-by-step working procedure for turning process given below:
4.4 PROGRAMME:
Write CNC codes for the above problem in the space provided below:
4.5 REVIEW QUESTIONS:
1. Give the definition for CAM.
2. What is numerical control?
3. Whether it is useful to use subroutine for drilling process consisting of more no.
of holes.
4. Why we have take the drilling tool to some depth below the bottom of workpiece
EXPERIMENT NO. 5 DATE
CNC PROGRAMME FOR LATHE OPERATIONS
5.1 OBJECTIVE, 5.2 PRE REQUISITES, 5.3 FIGURE, 5.4 PROGRAMME, 5.5 QUESTIONS

5.1 OBJECTIVE:
To write CNC programme by using ISO codes for turning process

5.2 PRE REQUISITES:


Basics of computer aided manufacturing
Fundamentals of computer numerical control
Knowledge of turning operation

5.3 FIGURE:
Write the step-by-step working procedure for turning process given below:
5.4 PROGRAMME:
Write CNC codes for the above problem:
5.5 REVIEW QUESTIONS:
1. Give the definition for CAM.
2. What is numerical control?
3. Whether it is useful to use subroutine for drilling process consisting of more
no. of holes.
4. Why we have take the drilling tool to some depth below the bottom of
workpiece
EXPERIMENT NO. 6 DATE
CNC PROGRAMME FOR LATHE OPERATIONS
6.1 OBJECTIVE, 6.2 PRE REQUISITES, 6.3 FIGURE, 6.4 PROGRAMME, 6.5 QUESTIONS

6.1 OBJECTIVE:
To write CNC programme by using ISO codes for turning process

6.2 PRE REQUISITES:


Basics of computer aided manufacturing
Fundamentals of computer numerical control
Knowledge of turning operation

6.3 FIGURE:
Write the step-by-step working procedure for turning process given below:
6.4 PROGRAMME:
Write CNC codes for the above problem:
6.5 REVIEW QUESTIONS:
1. Give the definition for CAM.
2. What is numerical control?
3. Whether it is useful to use subroutine for drilling process consisting of
more no. of holes.
4. Why we have take the drilling tool to some depth below the bottom of
workpiece
EXPERIMENT NO. 7 DATE
CNC PROGRAMME FOR LATHE OPERATIONS
7.1 OBJECTIVE, 7.2 PRE REQUISITES, 7.3 FIGURE, 7.4 PROGRAMME, 7.5 QUESTIONS

7.1 OBJECTIVE:
To write CNC programme by using ISO codes for milling process

7.2 PRE REQUISITES:


Basics of computer aided manufacturing
Fundamentals of computer numerical control
Knowledge of milling operation

7.3 FIGURE:
Write the step-by-step working procedure for turning process given below:
7.4 PROGRAMME:
Write CNC codes for the above problem:
7.5 REVIEW QUESTIONS:
1. Give the definition for CAM.
2. What is numerical control?
3. Whether it is useful to use subroutine for milling process consisting of
more no. of holes.
4. Why we have take the drilling tool to some depth below the bottom of
workpiece
EXPERIMENT NO.8 DATE
USING BASIC 2D AutoCAD COMMANDS
8.1 OBJECTIVE, 8.2 PRE REQUISITES, 8.3 EXERCISES, 8.4 QUESTIONS

8.1 OBJECTIVE:
To draw 2D drawings by using basic AutoCAD commands.

8.2 PRE REQUISITES:


Engineering graphics basics
Basics of Machine drawing
Basic AutoCAD 2D commands
Fundamentals of using computer

8.3 EXERCISES:
Draw the following sketches by using AutoCAD software.
8.4 REVIEW QUESTIONS:
1. What are the different coordinate systems used in AutoCAD.
2. Briefly explain different basic drawing commands used.
3. Briefly explain different basic editing commands used.
4. How to change different line types.
5. How dimensioning are done in AutoCAD.
EXPERIMENT NO.9 DATE
USING Pro/E COMMANDS
9.1 OBJECTIVE, 9.2 PRE REQUISITES, 9.3 EXERCISES, 9.4 OUTPUT, 9.5 QUESTIONS
9.1 OBJECTIVE: To make solid models of a mechanical components using Pro/E.

9.2 PRE REQUISITES:


Basics of Machine drawing
Fundamentals of using Pro/E Software
Pro/E Commands for drawing and part modeling.

9.3 EXERCISES:
To do the part modeling using PRO/E software.
9.4REVIEW QUESTIONS:
1. What are the different methods used to draw 3D models.
2. What are the different coordinates systems used in CAD system.
3. Briefly explain different Boolean operations used in 3D modeling.

You might also like