CAD Lecture2

33
9/11/2013 1 1 COMPUTER AIDED DESIGN Dr. Maqsood Ahmed Khan [email protected] Course Plan Topic Lectures Fundamentals of CAD 02 Geometric Modeling 1. Representation of Curves 02 2. Representation of Surfaces 02 3. Geometric Modeling Systems 01 4. Manipulation of Curves and Surfaces 02 5. Modeling Techniques (Solid, Surface, Wireframe) 02 CAD/CAM Software Transformations (2D and 3D) 02 Concurrent Engineering 02

description

Computer aided design

Transcript of CAD Lecture2

Page 1: CAD Lecture2

9/11/2013

1

1

COMPUTER AIDED DESIGN

Dr. Maqsood Ahmed [email protected]

Course PlanTopic Lectures

Fundamentals of CAD 02

Geometric Modeling

1. Representation of Curves 02

2. Representation of Surfaces 02

3. Geometric Modeling Systems 01

4. Manipulation of Curves and Surfaces 02

5. Modeling Techniques (Solid, Surface, Wireframe) 02

CAD/CAM Software

Transformations (2D and 3D) 02

Concurrent Engineering 02

Page 2: CAD Lecture2

9/11/2013

2

Course Plan

Software : CATIA V5 (R18) ; Matlab R2008a

Marks Distribution :

1. Final theory paper = 60 Marks2. Sessional Marks

i. Attendance = 16ii. Project = 14 iii. Midterm Exam = 10

40 Marks

Books

Mastering CAD/CAM by Ibrahim Zeid

Principles of CAD/CAM/CAE Systems

by Kunwoo Lee

CAD/CAM Principles and Applications

by P N Rao

Page 3: CAD Lecture2

9/11/2013

3

Introduction

� CAD/CAM is a term which means computer-aided design andcomputer-aided manufacturing.

� It is the technology concerned with the use of digital computersto perform certain functions in design and production.

� It is a bridge between design and manufacturing.

� Definition-CAD

Computer-aided design (CAD) can be defined as the use ofcomputer systems to assist in the creation, modification,analysis, and optimization of a design.

Computer System

The computer system consists of the hardware and software to perform

the specialized design functions.

The CAD hardware

Typically consists of the computer, one or more graphic display

terminals, keyboards, and other peripheral devices.

The CAD software

Consists of the computer graphic programs to implement computer

graphics on the system plus application programs to facilitate the

engineering functions (stress-strain analysis, dynamic response of

mechanisms, heat-transfer calculations etc.) of the company

Page 4: CAD Lecture2

9/11/2013

4

The Product Cycle and CAD/CAM

Product Cycle: Various activities and functions that must beaccomplished in the design and manufacture of a product is termedas the product cycle.

Product Cycle without CAD/CAM

Product Cycle with CAD/CAM

Page 5: CAD Lecture2

9/11/2013

5

Reasons of Using CAD

To increase the productivity of the designer

This is accomplished by helping the designer to visualize the

product and its component subassemblies and parts; and by

reducing the time required in synthesizing, analyzing, and

documenting the design.

To improve the quality of design

A CAD system permits a more thorough engineering analysis using

different analysis software (ANSYS, ABAQUS, and Nastran) and

larger number of design alternatives can be investigated.

Reasons of Using CAD

To improve communication

Use of a CAD system provides better engineering drawings, more

standardization in the drawings, better communication of the

design, fewer drawing errors, and greater legibility.

To create a data base for manufacturing

In the process of creating the documentation for the product design

(geometries and dimensions of the product and its components,

material specifications, BOM etc.), much of the required data base

to manufacture the product is also created.

Page 6: CAD Lecture2

9/11/2013

6

Analysis Tools

11

Injection Molding - Moldflow by Autodesk

12

Plastic injection molding simulation software provides toolsthat help manufacturers validate and optimize the design ofplastic parts and injection molds by accurately predictingthe plastic injection molding process

Page 7: CAD Lecture2

9/11/2013

7

Sheet Metal Design-NX by Siemens

13

The Conventional Design Process

The process of designing is characterized as an iterative procedure,

which consists of six identifiable steps

Recognition of need

It involves the realization by someone that a problem exists for

which some corrective action should be taken.

Definition of problem

It involves a thorough specification (physical and functional

characteristics, cost, quality, and operating performance) of the

item to be designed

Page 8: CAD Lecture2

9/11/2013

8

The Conventional Design Process

Synthesis

Conceptualization of a product

Analysis and optimization

Evaluation

Measuring the design against the specifications

Presentation

The Application of Computers for Design

The various design-related

tasks which are performed by

a modern computer-aided

design system can be grouped

into four functional areas:

Page 9: CAD Lecture2

9/11/2013

9

Geometric Modeling

It is concerned with the computer compatible mathematical

description of the geometry of an object.

To use the geometric modeling, the designer constructs the image

of the object on the monitor screen by three types of commands.

1. The first type of command generates the basic geometric

elements (e.g., points, lines, and circles).

2. The second command type is used to accomplish scaling,

rotation, or other transformations of the elements.

3. The third type causes these elements to be joined into the

desired shape of the object.

Geometric Modeling

During this geometric modeling process, the computer

� Converts the commands into mathematical model.

� Stores it in the computer data files.

� Display it as an image on the monitor screen.

Different methods of displaying object in geometric modeling:

� Wire frame modeling.

� Surface modeling.

� Solid modeling.

Page 10: CAD Lecture2

9/11/2013

10

Engineering Analysis

In any engineering design project, some type of analysis is

required. The analysis may involve:

� Stress-strain calculations

� Heat-transfer computations

� Vibration etc.

Turnkey CAD/CAM systems often include or can be interfaced to

engineering analysis software.

Design Review and Evaluation

� Interference checking

� Kinematics packages

Page 11: CAD Lecture2

9/11/2013

11

Automated Drafting

� Automated drafting involves the creation of hard-copy

engineering drawings directly from the CAD data base.

� CAD systems can increase productivity in the drafting function by

roughly five times over manual drafting.

� Some favorable features are:

1. Automatic dimensioning

2. Generation of crosshatched areas

3. Scaling of the drawing

4. Develop sectional views

5. Enlarged views of particular part details.

Creating the Manufacturing Data Base

� Conventionally, a two step procedure, designing and then

manufacturing was employed.

� This was both time consuming and involved duplication of efforts.

� It is the goal of CAD/CAM not only to automate certain phases of

design and certain phases of manufacturing, but also to

automate the transition from design to manufacturing.

� Much of the data and documentation is generated during design

phase which is required to plan and manage the manufacturing

operations (e.g., geometry data, bill of materials, parts list,

material specification, etc.)

Page 12: CAD Lecture2

9/11/2013

12

Benefits of CAD

1. Productivity improvement in design

2. Shorter lead time

3. Design analysis

4. Fewer design errors

5. Standardization of design, drafting, and documentationprocedure

6. Drawings are more understandable

7. Improved procedures for engineering changes

8. Benefits in manufacturing

Techniques for Geometrical Modeling

Page 13: CAD Lecture2

9/11/2013

13

Curves Representation

Explicit function

It is a function in which the dependent variable is expressed in

terms of some independent variables.

It is denoted by:

Example:

where a , n and b are constant.

ny ax bx= +

( )y f x y mx c= ⇒ = +

Curves Representation

Implicit function

It is a function in which the dependent variable is not expressed in

terms of some independent variables.

The implicit equation of a curve lying in the xy plane has the form.

For a given curve the equation is unique up to a multiplicative

constant.

( , ) 0f x y =

Page 14: CAD Lecture2

9/11/2013

14

Implicit Equations

An example is the circle of unit radius centered at the origin,

specified by the equation:

2 2 1 0x y+ − =

4 3 17 0y x+ + =

Problems with Implicit and Explicit Representations

1. They represent unbounded geometry

2. Curves are often multi-valued

3. With implicit representation it is not possible to generate orderly

sequence of points

The difficulties in using the implicit or explicit representations might

be overcome by the appropriate programming of the CAD system.

There are some other attractive alternative representations of

geometries which do not posses these problems.

Page 15: CAD Lecture2

9/11/2013

15

Parametric Equations

� In parametric form, each of the coordinates of a point on the

curve is represented separately as an explicit equation function

of an independent parameter

� Thus, C(u) is a vector-valued function of the independent

variable, u.

� Although the interval [a, b] is arbitrary, it is usually normalized to

[0, 1].

( )( )

( )

x uu a u b

y u

= ≤ ≤

C

Parametric Equations

� The first quadrant of the circle is defined by the parametric

functions

� Setting , one can derive the alternate representation

� Thus, the parametric representation of a curve is not unique

( ) cos( )

( ) sin( ) 02

x u u

y u u uπ

=

= ≤ ≤

tan( 2)t u=2

2

2

1( )

12

( ) 0 t 11

tx t

tt

y tt

−=+

= ≤ ≤+

Page 16: CAD Lecture2

9/11/2013

16

Advantages

� By adding a z-coordinate, the parametric model is easily

extended to represent arbitrary curves in three- dimensional

space.

� It is difficult to represent bounded curve segments (or surface

patches) with implicit form. However, boundedness is built into

the parametric form through the bounds on the parameter

interval.

� Parametric curves possess a natural direction of traversal (from

C(a) to C(b) if a ≤ u ≤ b); implicit curves do not. Hence, it is easy

to generate ordered sequence of points along a parametric

curve.

Advantages

� The parametric form is more natural for designing and

representing shapes in a computer. The coefficient of many

parametric functions, e.g., Bezier and B-spline curves, possess

considerable geometric significance. This translates into

interactive design methods and numerically stable algorithms.

� Compute a point on a curve or surface is difficult in the implicit

form.

Page 17: CAD Lecture2

9/11/2013

17

Types of Curve Representations

Parametric

Analytical Synthetic

Analytical Curves

1. Point

2. Line

3. Circle

4. Ellipse

5. Parabola

6. Hyperbola

Page 18: CAD Lecture2

9/11/2013

18

Synthetic Curves

1. Analytical curves are usually not sufficient to meet the

geometric design requirements of mechanical parts.

2. Products such as car bodies, ship hulls, airplane fuselage and

wings, propeller blades, shoe insoles, and bottles are a few

examples that require free-form, or synthetic curves and

surfaces.

3. The need for synthetic curves in design arises when a curve is

represented by a collection of measured points.

4. The typical form of these curves is a polynomial.

Page 19: CAD Lecture2

9/11/2013

19

Synthetic Curves

5. Various continuity requirements can be specified at the data

points to impose various degree of smoothness on the resulting

curves.

6. The order of continuity becomes important when a complex

curve is modeled by several curve segments pieced together

end-to-end.

7. Zero-order continuity yields a position-continuous curve. First

and second order continuities imply slope and curvature

continuous curves respectively.

Types of ContinuityThere are two ways of describing smoothness of ��� order.

� Geometric or visual continuity, ��

The ��� order derivatives are same

� Parametric continuity ��

The ��� order derivatives along with their magnitudes are same

For example,

� ��continuity means continuity of the tangent vector, while G�

continuity means continuity of slope.

� � continuity means continuity of the acceleration vector, while G

continuity means continuity of the curvature.

38

Page 20: CAD Lecture2

9/11/2013

20

Types of Continuity

39

Types of ContinuityGeometric Continuity� �

�: Curves are joined at common point� �

�: First derivatives are proportional at the join point. (Thecurve tangents have the same direction, but not necessarilythe same magnitude i.e., C1’(1) = (a,b,c) and C2’(0) =(ka,kb,kc)).

� �: First and second derivatives are proportional at joint point.

40

Page 21: CAD Lecture2

9/11/2013

21

�� Continuity

Aesthetical Impression

You need to move the end points to join.

Curves will be continuous but will

probably have a visible crease

Curves will appear smooth, their reflection

could have sudden changes

Reflection will change smoothly as, ambient

shadows will be gradual.

Math. analysis

f(x) = g(x).

f(x) = g(x)

f’(x) = g’(x)

f’’(x) = g’’(x)

Curves Continuity

� It may be obvious that a curve would require G1 continuity to

appear smooth.

� For good aesthetics, such as those aspired to in architecture

and sports car design, higher levels of geometric continuity

are required. For example, reflections in a car body will not

appear smooth unless the body has G2 continuity.

� A rounded rectangle (with ninety degree circular arcs at the

four corners) has G1 continuity, but does not have G2

continuity.

42

Page 22: CAD Lecture2

9/11/2013

22

Go Check in CATIA

1. Go to Start > Shape > FreeStyle

2. Click on 3D curve and draw following two curves using

control point option.

3. To verify it click on Connect Checker Analysis and select

the two curves.

The curves have only Zero order continuity

G1 Continuity Check in CATIA

1. Click on 3D curve and draw following two curves using

Through point option.

2. To verify it click on Connect Checker Analysis and select

the two curves.

The curves have only First order continuity

Page 23: CAD Lecture2

9/11/2013

23

G2 Continuity Check in CATIA

1. Click on 3D curve and draw following single curve.

2. Using split to break the curve

3. To verify it click on Connect Checker Analysis and select

the two curves.

The broken curve segments have Second order continuity

Curvature Analysis in CATIA

46

Radius of Curvature Analysis

Observe:

1. The location of Point of Inflection

2. Direction of Radius of Curvature

Page 24: CAD Lecture2

9/11/2013

24

Curvature Analysis in CATIA

47

Types of Synthetic Curves

Major CAD/CAM systems provide following types of synthetic

curves:

1. Cubic polynomial curves

2. Hermite curve

3. Bezier curve

4. Cubic spline curve

5. B-spline curve and

6. NURBS curve

Page 25: CAD Lecture2

9/11/2013

25

Cubic polynomial curves

In three dimensional modeling a geometric representation is

required that will:

1. Describe non-planar curve.

2. Avoid computational difficulties and unwanted undulations

(oscillations) that might be introduced by high-order polynomial

curves.

These requirements are satisfied by the Cubic Polynomial Curves

therefore, it has become very popular as a basis for computational

geometry.

Cubic polynomial curves

1. A cubic polynomial is the minimum-order polynomial that can

guarantee the generation of curves.

2. In addition, the cubic polynomial is the lowest-degree

polynomial that permits inflection within a curve segment and

that allows representation of non-planar (twisted) 3D curves in

space.

3. Higher order polynomials are not commonly used in CAD

because they tend to oscillate , are computationally

inconvenient, and are uneconomical of storing curve and

surfaces in the computer.

0 1 2, , or G G G

Page 26: CAD Lecture2

9/11/2013

26

Cubic polynomial curves

Just as two information are required to define a line, and three

information for an arc of a circle, four information are required to

define the boundary conditions for a cubic polynomial.

If the four information are points, the fitting of a curve through these

points is known as Lagrange interpolation, shown in the following

figure.

0P

1P

2P

3P

[ ]3

2 30 1 2 3

0

( ) ( ) ( ) ( ) 0 1ii

i

u u x u y u z u u u u u=

= = = + + + ≤ ≤∑P a a a a a

Cubic polynomial curves

Find a cubic polynomial curve equation which satisfy following

boundary conditions.

P(u = 0) = [0 0]

P(u = 0.25) = [2 2]

P(u = 0.5) = [4 0]

P(u = 1) = [6 2]

0P

1P

2P

3P

Page 27: CAD Lecture2

9/11/2013

27

Polynomials (Curves)

� Linear:

� Quadratic:

� Cubic:

We usually define the curve for 0 ≤ t ≤ 1

( )

( )

( ) dcbaf

cbaf

baf

+++=

++=

+=

tttt

ttt

tt

23

2

Hermite Curve

If two end points of a curve and the tangent vectors

at the end points are used to define a cubic polynomial, it is called

Hermite interpolation , shown in the following figure.

0 1P , P ' '0 1P , P

1 0 2 1 3 0 4 1( ) ( ) ( ) ( ) ( )u f u f u f u f u′ ′= + + +P P P P P

Basis Functions

0P

1P

0′P

1′P

Page 28: CAD Lecture2

9/11/2013

28

Derivation of Hermite Curve

0 0

1 0 1 2 3

0 1

1 1 2 3

(0)

(1)

(0)

(1) 2 3

= == = + + + ⇒

′ ′= =′ ′= = + +

P P a

P P a a a a

P P a

P P a a a

0 0

1 1

2 0 1 0 1

3 0 1 0 1

3 3 2

2 2

==

′ ′= − + − −′ ′= − + +

a P

a P

a P P P P

a P P P P

[ ] 2 30 1 2 3( ) ( ) ( ) ( ) 0 1 (1)u x u y u z u u u u u= = + + + ≤ ≤ − − −P a a a a

3

0

( ) (0 1)ii

i

u u u=

= ≤ ≤∑P a

Hermite Curve

Thus, by substituting in equation-1, we obtain:

2 3 2 3 2 3 2 30 1 0 1( ) (1 3 2 ) (3 2 ) ( 2 ) ( )u u u u u u u u u u′ ′= − + + − + − + + − +P P P P P

0

12 3 2 3 2 3 2 3

0

1

( ) 1 3 2 3 2 2u u u u u u u u u u

= − + − − + − + ′ ′

P

PP

P

P

Page 29: CAD Lecture2

9/11/2013

29

Hermite Curve

Or, in matrix notation P = UCS where

0

12 3

0

1

( )

1 0 0 0

0 0 1 0( ) 1

3 3 2 1

2 2 1 1

u

u u u u

= ′ − − − ′−

P = U C S

P

PP

P

P

Plot Hermite Curve using Matlab

0

1

0

1

1 1

6 5

8 0

2 30

=

′ − ′ −

P

P

P

P

Page 30: CAD Lecture2

9/11/2013

30

Effect of Tangent Vectors on the Shape of the Curve

0 1 2 3 4 5 61

2

3

4

5

6

7

8

9

S = [1 1;6 5;-8 0;2 -30]

-2 -1 0 1 2 3 4 5 61

2

3

4

5

6

7

8

9

S = [1 1;6 5;-8 0;30 -30]

0 1 2 3 4 5 61

2

3

4

5

6

7

8

9

S = [1 1;6 5;8 0;30 -30]

-2 -1 0 1 2 3 4 5 61

1.5

2

2.5

3

3.5

4

4.5

5

S = [1 1;6 5;-8 0;30 8]

Effect of Tangent Vectors on the Shape of the Curve

Page 31: CAD Lecture2

9/11/2013

31

Four Hermite Basis Functions

2 31

2 32

2 33

2 34

( ) 1 3 2

( ) 3 2

( ) 2

( )

f u u u

f u u u

f u u u u

f u u u

= − +

= −

= − +

= − +

Hermite Curve

Hermite curve can be represented as:

are its geometric coefficients.

Equation-2 gives the general form of a cubic polynomial in the

Hermite basis.

1 0 2 1 3 0 4 1( ) ( ) ( ) ( ) ( ) (2)u f u f u f u f u′ ′= + + + − − −P P P P P

0 1 0 1, , ,′ ′P P P P

Page 32: CAD Lecture2

9/11/2013

32

Properties

� The curve passes through the end points (u = 0, u = 1)

� The curve shape can be controlled by changing its end points or its tangent vectors

� If the two end points P0 and P1 are fixed in space, the designer can control the shape of the spline by changing either the magnitudes or the directions of the tangent vectors

� The use of Hermite curve in design applications is not very popular due to the need for tangent vectors or slopes to define the curve.

� It is not easy to predict curve shape according to changes in magnitude of tangent vectors

Properties

� Control of the curve shape is not easy because of its global control characteristics. For example, changing the position of a data point or end slope changes the entire shape of the curve, which does not provide the intuitive feel required for design.

Page 33: CAD Lecture2

9/11/2013

33

Example

Calculate the mid-point of the Hermite curve that fits the pointsand the tangent vectors0 1(1,1), (6,5)= =P P 0 1(0,4), (4,0) ′ ′= =P P