Cad Manual
Cad Manual
Cad Manual
LIST OF EXPERIMENTS
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.
References:
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).
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.
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.
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.
now: (a,b)
x' - a = (x - a) cosα - (y - b) sin α (x’,y’ )
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:
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.
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
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
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
References: