Cad Manual

Download as pdf or txt
Download as pdf or txt
You are on page 1of 19

CERTIFICATE

THIS IS TO CERTIFY THAT MR./MS. _____________________


____________________________________WITH
ENROLLMENT NO. OF _________________ IN MECHANICAL
ENGINEERING
SEM____ HAS SATISFACTORILY COMPLETED THE TERM WO
RK IN COMPUTER AIDED DESIGN.
HEAD OF DEPT. SUBJECT CO-ORDINATOR

CAD LAB MANUAL

LIST OF EXPERIMENTS

Sr No. Date Title Sign


1 OVERVIEW OF COMPUTER AIDED DESIGN
2 DDA AND BRESENHAM’S ALGORITHMS
3 2D TRANSFORMATIONS
SOLID MODELLING USING 3D MODLING
4
SOFTWARE
5 FINITE ELEMENT ANALYSIS
DESIGN OF MACHINE ELEMENTS USING C-
6
LANGUAGE
LAB-1

Title: OVERVIEW OF COMPUTER AIDED DESIGN

Objectives:
1) To define the terminologies CAD/CAM
2) To know the importance and applications of CAD
3) To get acquainted with CAD systems available in CAD lab

Introduction:
Computer Aided Design (CAD) can be defined as the use of computer systems to
assist in the creation, modification, analysis or optimization of a design. The computer
system consists of hardware and software to perform the specialized design functions
required by the particular user firm. The CAD hardware typically includes the computer-
one or more graphics display terminals, keyboards and other peripheral equipments. The
CAD software consists of computer programs to implement computer graphics on the
system plus application programs to facilitate the engineering functions of the user
company.
Computer Aided Manufacturing (CAM) can be defined as the use of computer
systems to plan, manage and control the operations of a manufacturing plant through
either direct or indirect computer interface with plant’s production resources.

In this subject, following practicals will be performed as listed below


1) Overview of Computer Aided Design
2) Solid Modeling using Pro/Engineer software
3) DDA and BRESENHAM’s Algorithms
4) Programming with C-graphic
5) Finite Element Analysis
6) Generation of SCRIPT files and Introduction to Visual Lisp in AutoCAD
7) Optimization Techniques and its Applications
8) Design of Machine Elements using C-Language
9) Concept of Solid Modeling primitives and generation of DXF file
10) 2D Transformations
11) CAD/CAM Integration
Exercise

1. List various applications of CAD in the field of Engineering.


2. What do you mean by design for manufacture and assembly? Give suitable examples.
3. Write the hardware specifications of CAD system that you are using in the CAD lab.
4. Enlist various input and output devices used along with CAD system.

References:

1. CAD/CAM Theory and Practice


- Ibrahim Zeid (McGraw Hil International Edition)
2. Computer Graphics and Design
- P. Radhakrishnan
- C.P. Kothandaraman
3. CAD/CAM
- Groover and Zimmers
LAB-2

Title: DDA and BRESENHAM’S Algorithms


Objectives:
1) To understand a meaning of Rasterization, scan conversion etc.
2) To get acquainted with DDA and Bresenham’s line algorithms.
3) To generate circle using various algorithms.

Introduction:
Rasterization: Process of determining which pixels provide the best approximation to a
desired line on the screen.

Scan Conversion: Combination of rasterization and generating the picture in scan line
order.In other words, the translation of graphic elements to pixel representation.
For horizontal, vertical and 45º lines, the For any other orientation the choice is more
choice of raster elements is obvious. This difficult:
lines exhibit constant brightness along the
length:
The general problem of scan conversion is which pixels to turn on.
Basic line algorithms:
Lines must create visually satisfactory images.
• Lines should appear straight
• Lines should terminate accurately
• Lines should have constant density
• Line density should be independent of line length and angle.
(a) DDA Algorithm
(b) Bresenham’s Algorithm

DDA Algorithm:
1. Input the two endpoint pixel positions.
2. Horizontal and vertical differences between end point positions are assigned to
parameters dx and dy
3. The difference with greater magnitude determines the value of parameter length.
4. Starting with pixel position (Xa,Ya), we determine offset needed at each step to
generate the next pixel position along the line path.
5. We loop through this process length times. If the magnitude of dx>dy.
a) Xa<Xb – The values of the increments in the x and y directions are 1 and
m respectively.
b) Xa>Xb – The decrements -1 and –m are used to generate each new point
on the line
Otherwise, we use a unit increment (or decrement) in Y direction and an X increment (or
decrement) of 1/m.
Compute which pixels should be turned on to represent the line from (6,9) to (11,12).

Length := Max of (ABS(11-6), ABS(12-9)) = 5


Xinc := 1
Yinc := 0.6
13
Values computed are:
12
(6,9), (7,9.6),
(8,10.2), (9,10.8), 11
(10,11.4), (11,12) 10

9
6 7 8 9 10 11 12 13
Disadvantages:
The DDA algorithm runs rather slowly because it requires realarithmetic.
DDA creates good lines but it is too time consuming due to the round function
Bresenham’s line algorithm for |m|<1:
1. Input the two line endpoints and store the left endpoint in (Xo,Yo)
2. Load (Xo,Yo) into the frame buffer; that is plot the first point
3. Calculate constants ΔX,Δy,2ΔY and 2ΔY-2ΔX and obtain the starting value for
the decision parameter as
Po=2ΔY-ΔX
4. At each Xk along the line, starting at k=0, perform the following
test: If Pk<0, the next point to plot is (Xk+1,Yk) and
Pk+1=Pk+2ΔY
Otherwise, the next point to plot is (Xk+1,Yk+1) and
Pk+1=Pk+2ΔY-2ΔX
5. Repeat step 4 for ΔX times.

Advantages:
The Bresenham’sline algorithm uses only integer arithmetic and runs significantly
faster.
Basic circle algorithms:
We only need to calculate the values on the (-b,a) (b,a)
border of the circle in the first octant. The other
values may be determined by symmetry.
Assume a circle of radius r with center at (0,0).
putpixel(a,b); (-a,b) (a,b)
putpixel(b,a);
(-a,-b) (a,-b)
putpixel(b,-a);
putpixel(a,-b);
putpixel(-a,-b);
putpixel(-b,-a);
putpixel(-b,a); (b,-a)
(-b,-a)
putpixel(-a,b)
Fast circle generation using Mid point:
2 2
Consider only the first octant of a circle of x +y -r 2 =0
x=y
radius r centered on the origin. We begin
by plotting point (r,0) and end when x < y.

The decision at each step is whether to


choose the pixel directly above the current
pixel or the pixel which is above and to the
left (8-way stepping).

Circle of radius 8

Exercise
1. Using the DDA algorithm sketch the pixels for the line drawn from (4,4) to
(15,5) on the graph paper
2. Justify “Line drawn through Bresenham’s Algorithm is more accurate than
DDA Algorithm”
3. Write a C-program to generate line using Bresenham’s Line Algorithm.
4. Sketch the pixels for representing a circle with centre at 200,200 and
radius 50 units using rotation method.
5. Write algorithms to draw circle using Bresenham’s method
LAB-3

Title: 2D Transformations
Objectives:
1. To visualize the fundamental 2D geometric operations translation, rotation
about the origin, and scale about the origin using C-language
2. To understand the usage of homogeneous coordinates.

Introduction:
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 3 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.

Translation
Objective: Moving an object to a new position by adding to the object x and y
coordinates.

To move a point p at (x,y) to a new position p’ at (x’, y’)


where x’ = x + txand y’ = y +
ty
The translation can be expressed as.
p’ = p + T
A line or shape can be translated by translating its vertices and redrawing the
line or shape.

Scaling
Objective: Changing the size of the object.

Scaling refers to rescaling along an axis. A point can be scaled along the x-axis or
the y-axis, or both.

.
x’ = sx x .
y’ = sy y,
In matrix form
A polygon is scaled relative to the fixed point by scaling the distance from each
vertex to the fixed point. For a vertex with coordinate (x,y), the scaled
coordinates (x’,y’) are calculated as,

x’=xf+(x-xf) . sx
y’=yf+(y-yf) . sy

It can rewrite as
x’=x . sx +(1- sx) . xf
y’=y . sy +(1- sy) . yf

where, the additive terms xf(1- sx)and yf(1- sy) are constant for all points in the object

Rotation
Objective: Object is rotated around the origin by a specified angle.

Rotation about the origin (0,0) is simplest:


(x’,y’)
x' is some function of x and y
y' is some other function of x and y
(x,y)
General equations for rotation about α
(0,0): x' = x cosα - y sin α (0,0)
y' = x sin α + y cosα Rotation of a point about (0,0) through
angle α
In matrix form

p’= R .p where, R= rotation matrix


To rotate a line or more complex object,
simply apply the equations to the (x,y) co-
ordinates of each vertex

Original object: Rotated by 45 degrees:

(0,20) (-20 sin 45,


20 cos 45)
(10 cos 45,
10 sin 45)
(-10,0) (0,0) (10,0) (0,0)

(0,-10) (-10 cos 45, (-10 sin 45,


-10 sin 45) -10 cos 45)

In order to rotate around an arbitrary point


(a,b):

now: (a,b)
x' - a = (x - a) cosα - (y - b) sin α  (x’,y’ )

y' - b = (x - a) sin α + (y - b) cosα

i.e:
x' = a + (x - a) cosα - (y - b) sin α (x,y)
y' = b + (x - a) sin α + (y - b) cosα
(0,0)
Homogeneous coordinates:
The problem with above approach is that different transformations are handled
differently.
p’ = p + T p’ = S.p p’ = R.p
The solution is to use homogeneous coordinates.
Each point (x, y) is represent as a triple (x, y, W).
Two points are the same is one in a multiple of the other.
(1,2,3) and (3,6,9) represent the same point.
Each 2D point is now a line in a 3D space. The W = 1 plane is our 2D space and
the intersection of the line with this plane gives us the point.
In a homogeneous coordinate system translation, scaling and rotation are
matrix multiplications.
Exercise

1. Write C-program to scale, translate and rotate the given line about origin.
2. Show matrix representation for scaling, rotation and translation for rectangle
having diagonal coordinates (150,150) and (300,300).
3. If scaling of rectangle is to be obtained without changing its apex point (150,150),
what procedure to be adopted?
4. Show matrix representation for reflection about xy-plane.
5. Write C-program to translate and rotate rectangle about origin.
References:

1.CAD/CAM and Automation


- FarazakHaideri
2.CAD/CAM Theory and Practice
- Ibrahim Zeid (McGraw Hil International Edition)
LAB-4

Title: SOLID MODELLING USING 3D MODLING SOFTWARE


Objectives:
1) To know different menu available in Pro/E software or inventor.
2) To get acquainted with Extrude, Revolve, Sweep, Blend features of the software.
3) To create solid model of the given objects.

Introduction:
Pro/ENGINEER Part enables you to design models as solids in a progressive
three-dimensional solid modeling environment. Solid models are geometric models that
offer mass properties such as volume, surface area, and inertia. If you manipulate any
model, the 3-D model remains solid. Pro/ENGINEERor Inventor provides a progressive
environment in which you create and change your models through direct graphical
manipulation.
There are many kinds of features that you can create on a part. There are solid
features and surface features, and features specific to applications. A feature is the
smallest building block in a Pro/ENGINEERor Inventor part model.
Following features are used in Pro/E for solid modeling:
Base features: Extrude, Revolve, Sweep and Blend
Engineering features: Holes, Ribs, Shells, Draft, Rounds and Chamfers
Edit features: Copy, Mirror, Move, Merge, Trim, Patterns, Extend, Project, Intersect etc.
Advanced Features: Helical sweeps, Boundary blends, Parallel blends, Non-Parallel
blends and Swept blends
Tweak Features: Local pushes, Radius domes, Section domes, Toroidal blends etc.

Extrude:Extrusion is a method of defining Revolve: The Revolve tool creates a feature by


three-dimensional geometry by projecting a revolving a sketched section around a
two-dimensional section at a specified centerline.
distance normal to the sketching plane.

Sweep: It is used to create a surface by Blend: It consists of a series of at least two planar
sweeping a section along one or more sections that Pro/ENGINEER joins together at
selected trajectories by controlling the their edges with transitional surfaces to form a
section’s orientation, rotation, and continuous feature.
geometry.
Helical Sweep: Used to sweep section along helical trajectory

Le ft Handed (Origin at bottom side)

Exercise
1. Differentiate between wireframe modeling, surface modeling and solid modeling.
2. List various solid repr esentation schemes.
3. Create the solid models of following part using PRO/ENGINEER software. Write
each step of model creation.
Draw a rectangle of 1000  2000  200 Draw a rectangle of 500  500  100 units.
units.
- Create a protrusion of φ 200 of 200 unit Made a cut of 40-unit radius about the
length and cut of 200 unit square as center of the piece.
shown in figure
Note: Take a reference of 150 units
from both edges for protrusion

4. Create the solid model using Blend and Helical sweep feature

Create two section:  Enter Pitch Value say 20unit. 



1. 350450 unit rectangle for bottom base  Select type of section say circle of 15
2. Circle of φ 200 for top base unit. 

Note: Add same number of b lend vertex to


a circle as no of vertices of the rectangle
LAB-5

Title: FINITE ELEMENT ANALYSIS


Objectives:
1) To know FEM as a tool for analysis.
2) To find out the solution of various problems using FEM.

Introduction:
FEM is powerful numerical technique for analysis. It is used for solid
mechanics, fluid mechanics, nuclear reactors etc. It is used for the stress analysis in the
area of solid mechanics. The basic concept of the FEM is that a body or a structure
may be discretized into smaller elements of finite dimensions called finite elements.
The original body or structure is considered as an assemblage of these elements
connected at finite number of joints called nodes. The properties of elements are
formulated and combined to obtain the solution for the entire body or structure. For a
given design problem, the engineer has to idealize the physical system into a finite
element model with proper boundary conditions and loads that are acting on the
system.
FEM Terminology:
Just as in the truss problem,u and f are displacement and force vectors
respectively. The relation between u and f is assumed to be of linear and
homogeneous. The last assumption means that if u vanishes so does f. The relation is
then expressed by the master stiffness equations:
[K]{u}  {f}
K is universally called the stiffness matrix even in non-structural applications because
no consensus has emerged on different names. The physical significance of the vectors
u and f varies according to the application being modeled, as illustrated in Table 1.
Application State(DOF) vector u Conjugate vector f
Problem represents represents
Structure and Solid Mechanics Displacement Mechanical Force
Heat conduction Temperature Heat Flux
Acoustic fluid Displacement Potential Particle Velocity
Potential Flows Pressure Particle Velocity
General Flows Velocity Fluxes
Electrostatics Electric Potential Charge Density
Magnetostatics Magnetic Potential Magnetic Intensity
Types of Element:
There are different types of elements used for various types of analysis.
Beam Element: The simplest form of element which is used for structure analysis.
Triangular or quadrilateral Element: Plain stress, plain strain or plate bending
problems. Flat or Curved shell Element: For shell structure analysis.
Hexahedral or Tetrahedral Element: 3D analysis.

Types of Errors:
The finite element analysis is an approximate numerical method to obtain the
solution and is not exact. The main types of errors are,
a. Mathematical modeling error.
b. Discretization error.
c. Round off errors.
The first type of error is due to the approximation of the physical system and assumptions
and the last error id due to accuracy level possible due to fixed number of digits
Advantages:
The main advantage of FEM is the physical problems, which were so far
intractable and complex for any closed bound solution can now be analyzed by this
method. The advantages in relation to the complexity of the problem are stated below:
a) The method can be efficiently applied to cater irregular geometry. It can take care
of any type of boundary.
b) Material anisotropy and non-homogeneity can be catered without much difficulty.
c) Any type of loading can be handled.
 There are many approximate methods such as weighted residual method, Rayleigh
 Ritz method, Galerkin’s method and others. The FEM stands superior to all of them. 
 The formulation of the FEM is that in this method the approximations are confined to
relatively small sub domains whereas in other methods the admissible functions
satisfy the boundary conditions of the entire domain, which becomes extremely
difficult when the domain has irregular shape. In the finite element method, the
admissible functions are valid over the simple domain & have nothing to do with the 
boundary however simple or complex, it may be based on the FEM can be run only in
high-speed digital computer.
Disadvantages:
1. One should not form the idea that the FEM is the most efficient for the analysis of
any type of structural engineering or physical problem. There are many types of
problems where some other method of analysis may prove efficient than the FEM.
2. For vibrations and stability problem in many cases, the cost of analysis by FEM may
be prohibitive. It may therefore be a luxury to undertake vibration and stability
analysis of simpler structures where applications of even simpler computer methods
such as finite strip or other semi analytic methods will lead to more economic
solution.
Limitation of FEM:
1. It must be remembered that in whatever sophisticated manner the problem might have
been formulated & solved, it has been done so within the framework of its
assumptions.
2. Proper engineering judgment, however is to be exercised in interpreting the results.
3. It is not necessary that all conceivable existing complicated problems have been
solved by FEM.
4. Due to the requirement of large computer memory and time computer programs based
on the FEM can be run only in high speed digital computer.
5. There are certain categories of problems where other methods are more effective e.g.
fluid problems having boundaries at infinity are better treated by the boundary
element method.
6. For some problems, there may be considerable amount of input data errors may creep
up in their preparation and the results thus obtained may also appear to be acceptable
which indicates deceptive state of affairs, it is always desirable to m ake a visual
check of the input data.
7. In FEM, the size of the p roblem is relatively large, many problems lead to round off
errors. A computer works with a limited number of digits solving pro blem. On the
basis of restricted number of digits may not yield the desired degree of a ccuracy or it
may give total erroneou s results in some cases. The magnitude of these round off
errors varies with the problem, the problem description and computer con figuration.

Exercise
1. Derive stiffness equation for a spar element oriented arbitrarily in a 2 dimensional
plane.
2. Explain (1) plane stress (2) plane strain (3)Boundary Conditions.
3. A four bar trusses sho wn in fig.1 assuming that each element cross s ection area
id 400 mm2and modules of elasticity is 200 Gpa, Determine the deflection,
reaction forces and stress in each element.
4. A stepped shaft is a shown in fig.2 determine the stress and deflection in each of
section assume unif orm martial for the complete shaft having a modulus of
elasticity as 200 Gpa and axial force as 35KN.

Fig.1 Fig.2
LAB-6

Title: DESIGN OF MACHINE ELEMENTS USING C-LANGUAGE


Objectives:
1. To know application of a programming language in the design field.
2. To effectively program a given design problem.
Exercise
1. Develop an algorithm for design of helical springs. The design should be quite
exhaustive.Write a program in C for helical spring.
2. Prepare computer program using ‘C’ programming language for the design of
shafts on the basis of torsional rigidity. State clearly the inputs and assumptions.
3. Prepare computer program using ‘C’ programming language for the design
of Flange Coupling. State clearly the inputs and assumptions.
4. Prepare computer program using ‘C’ programming language for the design of a
hollow shaft subjected to combined twisting moment and bending moment. State
clearly the inputs and assumptions.

References:

1. A text book of Machine Design


- R.S. Khurmi and J.K.Gupta
2. Programming in C
- E. Balaguruswamy.

You might also like