Академический Документы
Профессиональный Документы
Культура Документы
manufacturing firm.
CAD/CAM
CHAPTER TWO
1
The Design Process The Design Process
Evaluation is concerned with measuring the Synthesis and analysis are closely related and
design against the specifications established in highly interactive in the design process.
the problem definition phase. This evaluation Consider the development of a certain product
often requires the fabrication and testing of a design: Each of the subsystems of the product
prototype model to assess operating must be conceptualized by the designer,
performance, quality, reliability, and other analyzed, improved through this analysis
criteria. The final phase in the design procedure procedure, redesigned, analyzed again, and so
is the presentation of the design. Presentation on. The process is repeated until the design has
is concerned with documenting the design by been optimized within the constraints imposed
means of drawings, material specifications, on the designer. The individual components are
assembly lists, and so on. In essence, then synthesized and analyzed into the final
documentation means that the design data base product in a similar manner.
is created.
2
Application of Computers in Design Application of Computers in Design
The design related tasks performed by CAD Fundamental reasons for implementing CAD
system are: system:
1. Geometric modeling. 4. To create a data base for manufacturing.
2. Engineering analysis. In the process of creating the
documentation for the product design
3. Design review and evaluation.
(geometric specification of the product,
4. Automated drafting. dimensions of the components, materials
specifications, bill of materials, etc.), much
of the required data base to manufacture
the product is also created.
Geometric Modeling
Geometric modeling involves the use of a CAD
system to develop a mathematical description of
the geometry of an object. The mathematical
description, called a geometric model, is contained
in computer memory. This permits the user of the
CAD system to display an image of the model on a
graphics terminal and to perform certain operations
on the model. These operations include creating
new geometric models from basic building blocks
available in the system, moving the images around
on the screen, zooming in on certain features of the
image, and so forth. These capabilities permit the
designer to construct a model of a new product (or
its components) or to modify an existing model.
3
Geometric Modeling
Solid models are a more recent development in
geometric modeling. In solid modeling, Figure
(b), an object is modeled in solid three
dimensions, providing the user with a vision of
the object very much like it would be seen in real
life. More important for engineering purposes,
the geometric model is stored in the CAD
system as a 3-D solid model, thus providing a
more accurate representation of the object. This
is useful for calculating mass properties, in
assembly to perform interference checking
between mating components, and in other
engineering calculations.
4
Automated Drafting Design Evaluation and Review
Design evaluation and review procedures can
be augmented by CAD. Some of the CAD
The fourth area where CAD is useful (step 6 features that are helpful in evaluating and
in the design process) is presentation and reviewing a proposed design include:
documentation. CAD systems can be used Automatic dimensioning routines that
as automated drafting machines to determine precise distance measures between
surfaces on the geometric model identified by
prepare highly accurate engineering the user.
drawings quickly. Error checking. This term refers to CAD
algorithms that are used to review the accuracy
and consistency of dimensions and tolerances
and to assess whether the proper design
documentation format has been followed.
Verbal
Sketch
Multiview orthographic drawing (drafting)
CAD drafting
CAD 3D & surface model
Solid model
Feature based design
top
Pr o f i l e p lan e
f
b c d e
I I Z
H o r iz o n t a l I
h i side X
j I V
I I I
Fr o n t a l p la n e
front
5
Standards for dimensioning DESIGN DRAFTING
A drawing is expected to convey a complete
description of every detail of a part. However,
dimensioning is as important as the geometric
information. According to the American National
Standards Institute (ANSI) standards, the following are A
any drawing:
1. Show enough dimensions so that the intended sizes and
shapes can be determined without calculating or 2.0000.001
6
Dimensioning Conventional tolerance
Surface control symbols
TOLERANCE TOLERANCE
1. Check that the tolerance & dimension specifications are reasonable
for assembly.
2. Check there is no over or under specification.
TOLERANCE TOLERANCE
7
CAD systems can be classified in several ways: TOLERANCE GRAPH
1. By the system hardware: Minicomputer,
Engineering workstation, Microcomputer.
2. By the application area: Mechanical
engineering, Circuit design and board
layout, Architectural design and construction
engineering, Cartography.
3. By the modeling method: 2-D drafting, 3-D
drafting, Sculptured surface, 3-D solid
modeling.
8
CAD Systems Architecture CAD Systems Architecture
Structure of CAD Systems
Structure of CAD Systems
Sometimes, a CAD system can be considered as
consisting of three major parts:
1. Hardware: computer and input/output (I/O) devices
2. Operating system software
3. Application software: CAD package
Modeling
Defining the Model
Representation of Models Many properties of products have to be
There are two types of models: modeled, including form, dimension,
tolerance and structure. In all of these areas
Models of form typically represented by drawings geometry, images and spatial manipulation are
of components and their arrangement in
assemblies. very important. For this reason, CAD is
Models of structure normally represented by founded on computational geometry and
diagrams that show the components of a system computer graphics.
and how they are connected.
9
Defining the Model Defining the Model
The representation of structure using diagrams
In engineering diagrams the logical or physical The representation of form using drawings
structure of a system, in terms of the assembly of The technique of representing three-dimensional
the primitive parts and the relationship between forms in two-dimensional space by means of
these, is shown by a series of symbols joined by engineering drawings -on paper or on a computer
connections. The rules for the symbols, and for the screen- is formally known as descriptive geometry.
connections, are governed by conventions that
have been established in standards.
10
Defining the Model Defining the Model
computer representation of drawings and diagrams Example: Top-Down Design A hierarchical
arrangement of diagrams
Defining the graphic elements
The user has a variety of different ways to call a
particular graphic element and position it on the
geometric model. There are several ways of
defining points, lines, arcs, and other components
of geometry through interaction with the ICG
(interactive computer graphics) system. These
components are maintained in the database in
mathematical form and referenced to a 3D
coordinate system.
11
Defining the Model Defining the Model
Arcs and circles
Methods of defining arcs and circles include:
1. Specifying the center and the radius.
2. Specifying the center and a point on the circle.
3. Making the curve pass through three previously defined
points.
4. Making the curve tangent to two lines.
5. Specifying the radius and making the curve tangent to
two lines or curves.
Parabola y 2 4 a x= 0
x 2 y2 1 = 0
Hyperbola a2 b2
Ellipse
12
Fundamentals of Solid Modeling
13
Fundamentals of Solid Modeling Fundamentals of Solid Modeling
14
Fundamentals of Solid Modeling Fundamentals of Solid Modeling
15
Constructive Solid Geometry Constructive Solid Geometry
16
Fundamentals of Solid Modeling Fundamentals of Solid Modeling
B.Rep. Model of Tetrahedron
B.Rep. Models
F+V = E+2+R-2H, For the validity test of solids, Eulers formula can be used.
17
Fundamentals of Solid Modeling Fundamentals of Solid Modeling
Validity of an Engineering Part or Object
Validity of an Engineering Part or Object Example: Part with blind hole
Example: Part with Projection Formula check: F+V = E+2+R
F + V = E +2 +R-2H
F =11(6 + 4 +1)
V = 16, E = 24, H = 0
R = 1 (at base of projection)
F + V = E + 2 +R 2H F = 6+5 = 11
11 +16 = 24 +2 +1-2(0) V = 16, E = 24
27 = 27 R = 1(as its blind hole)
H=0
For 2 projections on a part,
11 +16 = 24 +2 +1 2(0)
F=16, V=24, E=36, R=2, H=0
16+24 = 36 +2+2 27 = 27
40 = 40
F=4+11 (from previous slide) =15 F=5+11 (from previous slide) =16
V=8+16=24 V=8+16=24
E=12+24=36 E=12+24=36
R=1+2 (at base of projection and top R=1+1 (at base of projection and top
of hole) of hole)
F+V = E+2+R-2H F+V = E+2+R-2H
15+24 = 36+2+3-2(1) 16+24 = 36+2+2-2(0)
39 = 39 40 = 40
18
Fundamentals of Solid Modeling Fundamentals of Solid Modeling
Entry Manipulation and Data Storage Entry Manipulation and Data Storage
Transformations 1. Those that apply the transformations of translation, rotation and
scaling to elements of the model (moving the geometry, copying
1. Object transformations the geometry to create one or more duplicate sets of entities in
Object transformations mathematical operations of the data structure.
the manipulation. 2. Those that allow the user to make changes to individual
geometric elements to trim or extend them to their intersections
with other elements.
When the entities of a CAD model are manipulated by 3. Functions for the temporary or permanent deletion of entities
moving them around, or by taking one or more from the model.
copies at different locations and orientations, we 4. Miscellaneous functions that, for example, allow entities to be
image the coordinate system to be stationary, and grouped together.
the object to move.
19
Entry Manipulation and Data Storage Entry Manipulation and Data Storage
Transformations Transformations
The main task: 2. Coordinate system transformations
Define the new object (Transformed) we image the object to be stationary, and the coordinate
How? system to move.
[P*] [P][T ]
where,
Coordinate system transformations = Viewing
[P*] is the object new coordinates matrix (new object)
[P] is the object original coordinates matrix, or points matrix
transformation.
(original object)
[T ] is the transformation matrix
Transformations Transformations
TRANSFORMATIONS TRANSFORMATIONS
CAD and Geometry The aim of these lectures and notes is to give an
The simplest CAD systems are 2D or 3D drafting tools. They understanding of what is happening within CAD
allow geometry to be created, stored and manipulated. systems.
Example: A line might be stored as two points:
By understanding how something works allows us
LP1P2(x1,y1; x2y2)
to use it more effectively.
L 1 1 1
Or in matrix notation: P x y
P2 x2 y 2
Where: P1 x1 y1 , P2 x2 y 2
Transformations Transformations
TRANSFORMATIONS TRANSFORMATIONS
CAD and Geometry
In this format it is not easy to do matrix manipulation in 2D or 3D CAD and Geometry
(which is what we want to do). Thus we want homogeneous Example: Representation of a Triangle: (in 2D ordinary
coordinates. coordinates)
P1 x1 y1
P P2 x2 y 2
Homogeneous Coordinates: Graphical representation: P3 x3 y 3
Presents a unified approach to describing geometric
transformations.
20
Transformations Transformations
Homogeneous Coordinates Homogeneous Coordinates
For instance, consider point P(2, 4) in ordinary coordinates. This Assume a 2D point lies in 3D space.
can be considered as:
P(4, 8, 2), where h=2; or P(6, 12, 3), where h=3; or P(2, 4, 1),
where h=1 in homogeneous space.
In general, P(m, n, h) in homogeneous space is P(m/h, n/h, 1) in
ordinary coordinates.
Thus, the triangle in 2d space can be represented in
homogeneous coordinates as:
x1 y1 1
Any 2D point can be represented in such a 3D space as:
P x 2 y2 1
P(x, y, z) = P(hx1, hy1, hz)
x3 y3 1
Why? To help with transformations. That is, along a ray from the origin (called homogeneous space).
Transformations Transformations
TRANSFORMATIONS
Types of transformations
Transformation is the backbone of computer graphics, enabling
1. Modeling Transformation/ Object Transformation us to manipulate the shape, size, and location of the
This transformation alters the coordinate values of the object. Basic object.
operations are scaling, translation, rotation and combination of one It can be used to effect the following changes in a geometric
or more of these basic transformations. object:
Object transformation = Move (transform) an object in the 3D space. 1. Change the location
2. Visual/ Viewing Transformation (Coordinate System 2. Change the shape
Transformation)
3. Change the size
In this transformation there is no change in either the geometry or the
coordinates of the object. A copy of the object is placed at the 4. Rotate
desired sight, without changing the coordinate values of the object. 5. Copy
Coordinate system transformation = Move (transform) the coordinate 6. Generate a surface from a line
system. View the objects from the new coordinate system. 7. Generate a solid from a surface
8. Animate the object
Transformations Transformations
Examples Examples
21
Transformations Transformations
Basic Modeling/Object Transformations Examples
Scaling, translation, and Rotation. Coordinate System Transformation
Other transformations, which are modification or
combination of any of the basic transformations,
are Shearing, Mirroring, Copy, etc.
Transformations Transformations
Scaling Scaling
P( x, y ) P * ( x*, y*)
x* xs x , y* ys y
Or in matrix form:
s x 0 0
P* x * y * 1 x y 1 0 sy
0 xs x ys y 1
0 0 1
Transformations Transformations
Scaling Scaling
2. Non-Uniform Scaling 1. Uniform Scaling
Scaling transformation matrix in 3d ordinary coordinates: For uniform scaling, the scaling transformation matrix is given as:
sx 0 0 In ordinary 3D coordinate system:
[Ts ] 0 sy 0 s 0 0
0 0 sz [Ts ] 0 s 0
0 0 s
In 3d Homogeneous Coordinates:
sx 0 0 0
0 sy 0 0
[Ts ] Here, s is the scale factor
0 0 sz 0 s 0 0 0
0 s 0 0
0 0 0 1
In homogeneous 3D coordinates: [Ts ]
0 0 s 0
where, s x , s y , s z , are the scale factors for the x, y, and z coordinates
of the object. 0 0 0 1
22
Transformations Transformations
The scaling matrix is:
2 0 0 0
Example: If the triangle A(1, 1), B(2, 1), C(1, 3) is
0 2 0 0 scaled by a factor 2, find the new coordinates of
[Ts ]
0 0 2 0 the triangle.
0 0 0 1
1 1 0 1
[P] 2 1 0 1
1 3 0 1
Transformations Transformations
Translation Transformation Translation Transformation
x* x x
y* y y
Or in matrix form (homogeneous coordinates):
1 0 0
P* x * y * 1 x y 1 0 1 0
x y 1
Transformations Transformations
Translation Transformation Translation Transformation
Example: Translate the rectangle (2, 2), (2, 8), (10, 8), (10, 2) 2 units In translation, every point on an object translates exactly the
along x-axis and 3 units along y-axis. same distance. The effect of translation transformation is
Solution: Using the matrix equation for translation, we have: that the original coordinate values increase or decrease by
the amount of the translation along the x, y, and z-axes.
[ P*] [ P ][Tt ]
The translation transformation matrix has the form:
In 3D Homogeneous Coordinates: 1 0 0 0
Substituting the numbers, we get 0 1 0 0
[Tt ]
0 0 1 0
2 2 0 1 1 0 0 0 4 5 0 1
2 8 0 1 0 1 0 0 4 11 0 1 x y z 1
[P*] where x, y, z are the values of translation in the x, y, and z direction,
10 8 0 1 0 0 1 0 12 11 0 1
respectively.
10 2 0 1 2 3 0 1 12 5 0 1
For translation transformation, the matrix equation is:
Note that the resultant coordinates are equal to the original x and y
values plus the 2 and 3 units added to these values, respectively. [ P*] [ P ][Tt ]
23
Transformations Transformations
Rotation Rotation
Derivation of the Rotation Transformation Matrix We will first consider rotation about the z-axis, which passes through the
origin (0, 0, 0), since it is the simplest transformation for understanding the
rotation transformation. Rotation about an arbitrary axis, other than an
axis passing through the origin, requires a combination of three or more
transformations.
When an object is rotated about the z-axis, all the points on the object
rotate in circular arc, and the center of the arc lies at the origin. Similarly,
rotation of an object about an arbitrary axis has the same relationship with
the axis, i.e., all the points on the object rotate in circular arc, and the
center of rotation lies at the given point through which the axis is passing.
x r cos , y r sin
Transformations Transformations
Rotation Rotation
Derivation of the Rotation Transformation Matrix
Derivation of the Rotation Transformation Matrix
The new coordinates:
In general, the points matrix and the transformation matrix are re-written
as (For 2D objects): [In Homogeneous Coordinates]
x* r cos( ), y* r sin( )
cos sin 0 0
sin Using the trigonometric relations, we get:
cos 0 0
x * y * 0 1 x y 0 1 cos( ) cos cos sin sin
0 0 1 0
sin( ) sin cos cos sin
0 0 0 1
OR:
We get:
x* r (cos cos sin sin ) x cos y sin
cos sin 0
y* r (cos sin sin cos ) x sin y cos
x * y * 1 x y 1 sin cos 0
0 0 1 cos sin
In matrix form:
x * y * x y
sin cos
Transformations Transformations
Rotation Rotation
Derivation of the Rotation Transformation Matrix Derivation of the Rotation Transformation Matrix
Transformation matrix for rotation about y-axis: For 3D geometry: Rotation about z-axis
cos sin 0 0
cos 0 sin 0 sin cos 0 0
0 x * z * 1 x z 1
0
y* y
1 0 0 0 1 0
TR y
sin 0 cos 0 0 0 0 1
0 0 0 1
24
Transformations Transformations
Rotation Rotation
Derivation of the Rotation Transformation Matrix Derivation of the Rotation Transformation Matrix
Translation matrix for rotation about x-axis:
For use with 2D geometry:
[ P] x y 0 1, [ P*] x * y * 0 1
1 0 0 0
For use with 3D geometry: 0 cos sin 0
TR x
0 sin cos 0
[ P] x y z 1, [ P*] x * y * z * 1
0 0 0 1
Transformations Transformations
Rotation of an Object about an Arbitrary Axis Rotation of an Object about an Arbitrary Axis
Thus, the rotation of an object about an arbitrary axis, involves Rotation of a geometric model about an arbitrary axis, other than
three steps: any of the coordinate axes, involves several rotational and
Step 1: Translate the fixed axis so that it coincides with the z-axis translational transformations. When we rotate an object
Step 2: Rotate the object about the axis about the origin (in 2D), we in fact rotate it about z-axis.
Step 3: Translate the fixed axis back to the original position Every point on the object rotates along a circular path, with
(reverse translation) the center of rotation at the origin. If we wish to rotate an
object about an arbitrary axis, which is perpendicular to the
Note: When the fixed axis is translated, the object is also xy-plane, we will have to first translate the axis to the origin
translated. The axis and the object go through all the and then rotate the model, and finally, translate so that the
transformations simultaneously. axis of rotation is restored to its initial position.
Transformations
Rotation of an Object about an Arbitrary Axis Rotation of an Object about an Arbitrary Axis
Example:
Rotate the rectangle (0, 0), (2, 0), (2, 2), (0, 2) shown
below, 30o ccw about its centroid and find the
new coordinates of the rectangle.
25
Rotation of an Object about an Arbitrary Axis Rotation of an Object about an Arbitrary Axis
Transformations Transformations
Rotation about an Arbitrary Point (in xy-plane) Rotation about an Arbitrary Point (in xy-plane)
Solution: We first translate the point (3, 2) to the origin, then rotate the rectangle In order to rotate an object about a fixed point, the point is first moved
about the origin, and finally, translate back so that the original point is (translated) to the origin. Then, the object is rotated around the
restores to its original position (3, 2). The new coordinates of the rectangle origin. Finally, it is translated back so that the fixed point is
are found as follows:
restored to its original position. For rotation of an object about an
[ P*] [ P][Tt ][Tr ][Tt ] arbitrary point, the sequence of the required transformation
1 1 0 1 1 0 0 0 0.866 0.5 0 0 1 0 0 0
matrices and the condensed matrix is given as:
2 1 0 1 0 0 0 0.5 0.866 0 0 0 1 0 0
2 3 0 1 0
1
0 1 0 0 0 1 0 0 0 1 0
[Tcond ] [Tt ][Tr ][T t ]
1 3 0 1 3 2 0 1 0 0 0 1 3 2 0 1 OR:
1.77 0.13 0 1 1 0 0 0 cos sin 0 0 1 0 0 0
0.77 1.87 0 1 0 1 0 0 sin cos 0 0 0 1 0 0
[Tcond ]
1.63 2.37 0 1
0 0 1 0 0 0 1 0 0 0 1 0
2.63 0.63 0 1
x y 0 1 0 0 0 1 x y 0 1
These are the new coordinates of the rectangle after the rotation.
where is the angle of rotation and the point (x, y) lies in the xy-plane.
Transformations Transformations
Mirroring (Reflection) Mirroring (Reflection)
In modeling operations, one frequently used operation is mirroring an
object. Mirroring is a convenient method used for copying an object
1 0 0 0 while preserving its features. The mirror transformation is a special
0 1 0 0 case of a negative scaling, as will be explained below.
[ P*] 2 2 0 1 2 2 0 1 Let us say, we want to mirror the point A(2, 2) about the x-axis (i.e.,
0 0 1 0
xz-plane). The point matrix [P*]=[2 -2] can be obtained with the
0 0 0 1 matrix transformation given below:
26
Transformations Transformations
Mirroring about an Arbitrary Plane Mirroring (Reflection)
Transformation Matrix for Mirroring about x-axis:
If mirroring is required about an arbitrary plane, other
than one defined by the coordinate axes, translation 1 0 0 0
0 1 0 0
and/or rotation can be used to align the given plane Tm x
with one of the coordinate planes. After mirroring, 0 0 1 0
translation or rotation must be done in reverse order to 0 0 0 1
restore the original geometry of the axis. Transformation Matrix for Mirroring about y-axis:
Transformations Transformations
Mirroring about an Arbitrary Plane Mirroring about an Arbitrary Plane
Transformations Transformations
Coordinate System Transformation Mirroring about an Arbitrary Plane
Coordinate frame moves to a new location. Procedure for mirroring the rectangle about the plane:
Step 1: Translate the line AB (i.e., the plane) such that it passes through
the origin, as shown by the dashed line.
Step 2: Next, rotate the line about the origin (or the z-axis) such that it
coincides with x or y axes (we will use the x-axis).
Step 3: Mirror the rectangle about the x-axis.
Step 4: Rotate the line back to its original orientation.
Step 5: Translate the line back to its original position
The new points matrix, in terms of the original points matrix and the five
transformation matrices is given as:
[P*] = [P][Tt][Tr][Tm][T-r][T-t]
Where, the subscripts t, r, and m represent the translation, rotation, and
mirror operations, respectively.
Note: A negative sign is used in the subscripts to indicate a reverse
transformation.
27
Transformations Transformations
Coordinate System Transformation Coordinate System Transformation
P x y z
[ P*] x a y b z c 1
The origin has been translated (moved) from (0, 0, 0) to (a, b, c)
Or:
Note: The sign in the T matrix need to be changed
For coordinate system: x a, y b, z c
1 0 0 0
0 1 0 0
Tt
0 0 1 0
a b c 1
Transformations Transformations
Example: Coordinate Transformation Example: Coordinate Transformation
If the coordinate system has been rotated about z-axis by -30o, then
translated to [a b c], what is the coordinates of the point
Solution:
[x y z] in the new coordinate system?
cos 30o sin 30o 0 0 1 0 0 0
sin 30o cos 30o 0 0 0 1 0 0
[ P*] x y z 1
0 0 1 0 0 0 1 0
0 0 0 1 a b c 1
x * y * z * 1
Transformations Transformations
Coordinate system transformation-Viewing Coordinate system transformation-Viewing
28
Transformations Transformations
Coordinate system transformation-Viewing Coordinate system transformation-Viewing
We will not see all the component at one time. Thus
we need to define a window.
Transformations Transformations
Coordinate system transformation-Viewing Coordinate system transformation-Viewing
When the Aspect Ratio (AR) of both is equal no We can map this to the viewport by:
distortion (scaling occurs).
xv xv min x x w min
w
x max x min xv max xv min x w max x w min
AR And
y max y min
y v y v min y w y w min
y v max y v min y w max y w min
By mapping a smaller window on the viewport, we can
get a zooming effect.
29