MOD2.1 CAD and Computer Graphics Software Textbook

You might also like

Download as pdf
Download as pdf
You are on page 1of 23
Module -2 Chapter - 3 CAD & Computer Graphics Software | After studying this chapter the reader should be able to: * Appreciate the use of Computers and Design process. + Understand graphic system and its configuration. + Explain the functions of graphic system. * Understand Geometry construction in graphic system + Appreciate the need for transformations 3.1 MECHANICAL ENGINEERING DESIGN Mechanical Engineering Design can be defined as the use 6f Scientific principles, schnical information and imagination in the description of a machine or a mechanical “stem to perform its specific functions with maximum and experience. ‘The description machine or mechanical system is mainly done in the form of drawings or blue prints. 3.2 CONVENTIONAL DESIGN PROCESS The process of designing something consists of six different steps or phases "Necessity ‘s the Mother of Invention”. Always a design starts with a need. Recognition of Need : It involves identification by someone that a problem exists for which some corrective action should be taken. The problem may be the identification of some defect in the existing machinery or a need of new product in the market. Definition of problem : It involves through specification of the item to be designed. This specification includes chysical or functional characteristics, cost , quality and operating performance. Synthesis : In this phase we develop preliminary (basic) ideas regarding the topology and geometry of the problem, i.e., regarding the shape and size and connectivity of various parts in the product. In this phase a prototype model is created. 112 Computer Integrated Manufacturing: Recognition of Need ‘ Defination of Problem “4 1 Synthesis [; 1 Analysis ‘ — Evaluation 1 Presentation Analysis : In this phase, a prototype model is analyzed by giving different boundary conditions and constraints, subjecting the model to different temperatures and loads to perform feasibility study. If the product fails at this stage, once again the design is reverted back to the synthesis phase. Evaluation : The end products of the analysis phase is compared with the definition phase. If there: requires any changes, then the design is one again reverted back to synthesis phase. Presentation : This includes documentation of the design by means of drawings. material specifications. Bill of materials, Views, tolerances etc. 3.3 COMPUTER AIDED DESIGN PROCESS The various design related tasks which are performed by a modern computer. Aided design system can be grouped into four functional areas. 1. Geometric Modeling 2. Engineering Analysis 3. Design review and evaluation 4, Automated drafting, Geometric modeling corresponds to synthesis phase. Engineering analysis corresponds to analysis. Design review and evaluation corresponds to evaluation phase. Automated drafting corresponds to presentation phase. CAD and Computer Graphics Software . 113 : Recognition of Need v Problem: Defination v ~ Synthesis [<4 Geometric Modeling [; Analysis |<4 Engineering Analysis y Evaluation k Design Review Evaluation’ ¥ Presentation <— Automated Drafting 3.3.1 Geometric Modeling It is concerned with computer compatible mathematical description of the geometry. These drawings are created in a computer and also computerized model can be developed instead of a prototype model. Here,the designer constructs the graphical image of the object on the screen by giving three types of commands to the computer. I type of commands : Generates basic geometric elements such as points, lines and circles. II type of commands : Used for scaling, rotation and other transformation. Ill type of commands : Used to join various elements to get desired shape. There are different ways of representing the objects in geometric modeling. 1. Wireframe modeling 2. Surface Modeling 3. Solid modeling 1. Wireframe Modeling : Aaa Basic representation form. It is easier to create, but complex to understand. It consists of only points, lines and curves. 2. Surface Modeling : . LMP? Here, the geometry is represented in the form of surfaces, But the object will not have any mass or volume. 3. Solid Modeling : This is the most advanced method of geometric modeling. Here, the objects will occupy volume. During the geometric modeling process, computer converts the commands into mathematical models, stores it in computer data files and displays it as an image on the CRT. There are different software which are capable of performing geometric modeling like, ProlE, CATIA, Solid Edge Uni Graphics, Solid Works. 3.3.2 Engineering Analysis The analysis involve stress-strain calculations, heat - transfer computations, fluid flow analysis etc. Different types of analysis can be performed on a geometric model, like structural analysis, Thermal analysis, Electro - Magnetic analysis, computational fluid- dynamics etc. There are mainly two different types of analysis 1. Analysis of mass properties 2. Finite element analysis Analysis of mass properties provides different properties of a solid model like surface area, weight, volume, center of g.avity, moment of inertia etc. For planar surfaces we can find out perimeter, area and inertia properties. Finite element analysis is the most powerful analysis of a CAD system. In this type of analysis the model is divided into a large number of finite elements. Then these small elements are analyzed for different properties and thus by analyzing these elements, the behaviour of the entire object can be accessed. There are different analysis packages available in the market . They are , Ansys, Nastran, COSMOS, Fluent, Hyper Mesh, Star - CD, .... CAD and Computer Graphics Software 115 3.3.3 Design Review and Evaluation * Checking the accuracy of the design can be easily accomplished by using computers. * Semiautomatic dimensioning and tolerance will help the user reducing the possibility of dimensioning errors. + A procedure called layering, is often used to compare similar type of images with each other and helps to find out the defects. + Interference checking helps to find out if any parts are intersecting with each other ina assembly model. +» Kinematics is one of the most interesting evaluation factor which provides capability to animate the motions of simple designed mechanisms. Commercial software are available to perform kinematics like ADAMS(Automatic Dynamic Analysis of Mechanical Systems). 3.3.4 Automated Drafting This involves creation of hard - copy drawings of the models from the solid model ina CAD database. Automated drafting helps to generate different orthographic and sectional views directly from a solid mode. ‘The dimensioning and tolerances including cross hatching is automatically provided to the models. It also takes care of various design standards in the drawing such as thick lines, thin lines, hidden lines, center lines. The part list can be automatically generated in a CAD system. By using automated drafting, the productivity of a system can be increased rapidly. _ 3.5 COMPUTER GRAPHICS CAD/CAM has more potential to inctease productively. These CAD/CAM software ___ provides engineers with tools needed to perform this technical jobs efficiently. Similar to er CAD/CAM software has developed steadily since the development of ICG in 1960's. ; The graphics software is the collection of programs that includes programs to generate images on the CRT screen, to manipulate the images, and to accomplish various types of interaction between the user and the system. In addition to the graphics software, there may be additional programs for implementing certain specialized functions relation to CAD/CAM. These include design analysis programs (¢.g., Finite element analysis and Kinematic simulation) and manufacturing planning programs (e.g. automated process planning and numerical control part programming). 116 Computer Integrated Manufacturing * 3.6 GRAPHICS SOFTWARE A Graphical software is the collection of programs written to make it convenient for the user to operate the computer graphics system. It includes programs to generate images and to manipulate images. Graphics software must be written specifically by considering the type of CRT used, type of input devices used, type of image generation techniques. 3.6.1 Factors that should be considered in designing graphics software : 1. Simplicity : The graphics software must be easy to use. 2. Consistency : The package should operate in a consistent and predictable way to the user. 3. Completeness : There should be tolerant of minor instances of misuse by the operator. 4, Robust : The graphics system should be tolerant of minor instances of misuse by the operator. 5. Performance : With in the limitations of the system hardware, graphics software must perform with high efficiency. 6. Economy : Graphics program should not be so large (or) expensive as to make their use prohibitive. 3.7 Software configuration of graphics system When the user is working on a graphics system, a number of activities takes place, which are divided into three categories : 1. Interact with the graphics terminal to create and modify images on the screen. 2. Constructing a physical model called as application models with the help of these images. 3. Store the model in computers memory. These activities are performed in combination rather than sequentially. Based on these three activities, the graphics software is divided into three basic modules. 1. Graphics package 2. Application program 3. Application database. CAD and Computer Graphics Software 117 Design Workstation Graphics terminal Application |}—>] Application al Graphics Database_| Program | Package _}< User Input devices 1. Graphics Package : Itisthe software support between the userand the system. It consists of input subroutines and output subroutines. Input subroutines accept data and commands from the user and forward them to the application program. Output subroutines controls the output devices. Converts the application models into two - dimensional or three dimensional graphical images. 2. Application program : It Controls the storage of data and retrieves the data out of the application database. The user works on the application program through graphics package. Application programs develops the physical model of the graphical images. These physical models are the mathematical representations of the geometry and are also called as application models. 3. Application database : Application database stores mathematical, numerical and logical definitions of application models. It also includes alphanumeric information such as bill of materials, mass properties and other data. 3.8 FUNCTIONS OF A GRAPHICS PACKAGE/SYSTEM Some of the common functions of a graphics package are 1. Generation of graphic elements 2. Transformations 3. Display control and windwoing functions 4. Segmenting 5. User input functions 1. Generation of graphic elements : A graphic element in computer graphics is the basic image entity such as dor , line , circle etc. Graphical elements also include alphanumeric characters, special symbols ete graphic elements in 3-D are referred as primitives, such as sphere, cube cylinder. These primitives are used as building blocks to construct a 3 dimensional model. a 1g8 Computer Integrated. Manufacturing 2. Transformations : Used to change (or) Teposition the graphical entities on the database. Transformation: include enlargement and reduction ofan entity by a process called as scaling, repositioning the image or translation, rotation. : 3. Display control and windwoing functions : These functions help the user to view the image from desired angle and at the desired magnification. These function as are sometimes referred as windwoing, because the graphics screen like a window used to observe the model. Another aspect of display control is hidden line temoval. Hidden line removal is the concept in which the image is divided into visible in visible lines. In some software, users only will identity which lines are to be removed so that the diagram is more understandable. Most of the other graphic packages are sophisticated enough to remove these hidden lines, 4. Segmenting function : Provides capability to selectively replace, delete or modify the portions of the image. Segment - particular portion of the image. Segmenting functions cannot be used in storage tubes, as there erase. If the image to be modified the entire screen must be redrawn, incorporated. © no selective ith the changes In case of refresh display, segments functions is possible. 5. User input functions : ‘These are the functions which help the user to enter commands. The input functions must be written for specific input devices. These input functions are defined in such a way that even the user without any programming experience can also work effectively. 3.9 CONSTRUCTING THE GEOMETRY 3.9.1 Graphic elements The graphics system constructs the geometry out of ‘graphic elements. These elements called by the user during the construction process and added, one by one, to create the model. During the process, each new element specified by its size, position and orientation is added to the model. These specifications are necessary to form the model to the Proper shape and scale. For this purpose, the various transformations are used. Boolean operations like addition, subtraction on intersection of geometric elements can be carried out on these elements. Figure 3.2 illustrates this construction feature for a two-dimensional object, C by subtracting circle B from rectangle A. CAD and Computer Graphics Software 119 A-B=C Later, several geometric elements can be grouped together into units called as cells which can be used anywhere in the model. For example, if a bolt is to be used several places in the construction of a mechanical assembly model, the bolt can be formed as a cell and added anywhere to the model. The use of graphic cells is a convenient and powerful feature in geometric model construction, 3.9.2 Defining the graphic elements Particular graphics element can be called in several ways. These elements are stored in the form of mathematical models in the database. For example, a point would be defined simply by its x, y, and z coordinates. A circle would be defined by its center and radius. Mathematically, a circle can be defined in the x-y plane by the equation. (&-my+(y-ny=r 3.9.3 Method of defining geometric elements Points * Pointing to the location on the screen by means of cursor control ° Entering the coordinat ia the alphanumeric keyboard + Entering the offset (distance in x. y. and 1) from a previously defined point * The intersection of two points + Locating point’s at fixed intervals along an element Lines * Using two previously defined points + Using one point and specifying the angle of the line with the horizontal + Using a point and making the li cither normal or tangent to a curve * Using a point and making the line either parallel or perpendicular to another line + Making the line tangent to two curves + Making the line tangent to a curve and parallel or perpendicular to a line Arcs and Circles * Specifying the center and the radius * Specifying the center and a point on the circle * Making the curve pass through three previously defined points 2 ° Making the curve tangent to three lines 120 Computer Integrated Manufacturing 3.9.4 Editing the geometry Corrections and adjustments in the geometric model can be made in CAD system. Varioussediting commands like delete, move, copy,rotate, mirror, trim and scaling are used to edit the geometry. The editing procedure involves selecting the desired portion of the model and executing the appropriate command, 3.10 NEED FOR GRAPHIC STANDARD The software developed based on the three modules i.e., graphics package, application program and application database is Purely dependent on the type of hardware ie., the type of CRT used, the type of input and output devices and other hardware components. If these hardware components are replaced or changed, the software will not work efficiently. The software needs to be modified once again. This process is costly for users as well as venders. This was the approach during the period between 1963 to 1974. There were lot of needs to be fulfilled in both user and vendors Point of view. They are . 1. Application program portability : If'a software or application program is as originally written for a specific type of graphics terminal, it should also have the capability to be easily transported and support the other graphical terminals also. 2. Picture data portability : The description of the images ina software program should be independent of different hardware components. 3. Text portabilit Text associated with the graphics should be independent of the hardware. 4. Object database portability : ‘The database files of a particular system should be able to get transferred to another system irrespective of hardware configuration. By keeping this in mind, the search for standard began in 1974. In 1974, graphics standard planning committee(GSPC) was established, with a aim that application programs should be device independent and should interface with any type of graphical system irrespective of hardware : Thus graphics standards were established. Computer Graphics Software 121 Design Workstation Graphics System Graphics eteation | >| Application |i] Kemal |,,[ Device ]}—»} |_texminal Mtabase j<—j pro gTEM [<—+ | System drivers i User Input devices Se graphics system is divided into two parts. Kernal system and device drivers. Kemal = is hardware independent. It stores standard functions of that particular graphical ere. Device drivers are hardware dependent. It stores the drivers of all the hardware ponents. sail the oftware become portable. © 1981, GSPC was abandoned and ANSI came into existence and formed the technical saittee for computer graphics. At international level, GSPC was replaced by ISO, DIN/ = result various graphics standards are developed. KS : Graphics Kernal System : an ANSI and ISO standard. It is device independent, has system independent and piication independent. It supports both Two & Three dimensional data. There are two ves of GKS, GKS - 2D and GKS - 3D. = PHIGS : Programmers Hierarchial Interactive Graphics System The operation of PHIGS is similar to GKS. It is mainly used to support all the software “Scarding workstation. + YDM : Virtual Device Metafile Tthas functions needed to define the picture. It is now called as CGM file. + 1GES : Initial graphics exchange specification It has been developed in 1981 and is mainly used to support exchange of model data = CAD/CAM systems. It is the most widely used file. 5. VDI : Virtual device Interface It is mainly used to support plotters and printers. It is also called as CGI(Computer Gzaphics Interface) 122 Computer Integrated Manufacturing 3.11 2-D TRANSFORMATIONS X and Yeco-ordinates are required to specify a point in a two dimensional co-ordinate system. These co-ordinates can be represented in matrix form as “fi Similar matrix representation can be used to specify line connecting between two co- ordinates (x,,y,) and (x,,y,) The notation would be ae eee Using matrix algebra , 2D transformations can be performed on the line or point. 3.11.1 Translation : Translation involves moving the element to one location to other. Translation of a point (%y) to a new position (x',y’) is given by x! =x+dx and y!=y+dy where, x',y' = Co—ordinatesafter translation xy = Co— ordinates of the point before translation dx, dy = Movement of the point in x and y direction respectively. In matrix form, translation is represented by POE =[p'}=[e]+[7] P where (rl-(*) 1 bee a dy wf reine es (T]= a = Translation matrix y. CAD and Computer Graphics Software 123 1. Apoint (3,4) has to be translated at a distance of 4 units in x - axis and 2 units in y-axis. Determine the co-ordinates of the translated point. _ Sol. Given: ne “hf 7 rye traf") *. The co — ordinates of the translated pointis(7,6) 2. Aline is defined by the point (1,1) and (2,4). Calculate the co-ordinates of the line when it is moved at a distance of 2 units in x direction and 3 units in y - direction. Sol. Given, Boece yy} lL 4 =| oF; 2 dy dy} [3 3] Note : Since both the ends of the line have to be translated at a distance of (2,3) in x and y directions, 2x2 matrix has to be considered. -(e]=[L]+ [1] one 1 The new co-ordinates of the line are (3,4) and (4,7). L (47) ea) _// Translated line “» 434) a Original line LD 124 Computer Integrated Manufacturing 3.11.2 Rotation In such type of transformation, the co-ordinate points associated with the geometry are related about a point (origin) in two dimensional x - y plane. Rotation of the point takes place around z - axis. y x Figure | Consider a point 'p' attached to the axis OAB as shown in figure 1. At this stage the co-ordinates of the points wart x and y axis be P, and P,,. Original point before rotation Figure 2 Let the point 'P' rotates around z -axis angle 'q' such that the axis system OAB attached to the point 'P' also rotates by 'q! in counter clock wise direction. 4 CAD and Computer Graphics Software 125 From figure 2, P, =P, cosO—p, sin® p, =P, sin@ +p, cos® Converting above equation in matrix form p.|_[eos® -sin0 |p, Py Siena cos0 || ps [o]-ER]«P] where, [p' ]=Pointafter translation [p] = Original point : _ _[cos® -sin® [R]= Rotation matrix =| sin® cos Note: If rotation isin clockwise direction then'— @'has to be considered in rotation matrix. 3. The point (5,4) is rotated by 30° around z - axis in x - y plane. Determine the co- ordinates of the point after rotation. Sol. Given , 5 wf 0=30° cos —sin® tel] 5 | _feos30 —sin30 i a 0.866 -0.5 -| 0.5 vl [e'J=[R Ife] _[0.866 -0.5 ][5 + 05 eal 0.866x5-0.5%4 Reet (w-| seu 126 Computer Integrated Manufacturing 4. Aline defined by the points (1,1) and (2.4) is rotated by 60° around z - axis w.rt to origin iff x-y plane. Determine the co-ordinates of the line after rotation. Sol. Given: mo 9=60° i Es | sin® cos@ sin60° cos60° oR : [oss 866 a [r] ir 0s 60° = =[R]}x{L] 0.866] [1 2] 0866 05 | [I 4| 17__[-0366 2.464 [u]- 1.366 3.732 ©. The co — ordinates of the ineafter rotation are (—0.366, 1.366) and (~2.464,3.732) 3.11.3 SCALING Scaling is used to enlarge or reduce the size of the element. Scaling factor is used to alter the size of the object and the scaling factor need not necessarily be equal in x and y directions. y. ys S] | = r =, a The point os an element can be scaled by the scaling matrix using the following matrix equation. CAD and Computer Graphics Software 127 x'|_[S, 0 ][x a “lo S.JLy. [p'J=1SIbe] 1 x | evi point y [e'] (| = pointafter scaling e y ‘ [Sx 9 [S-Setingmatin=| a J S,.8, =Scaling factorsinx and y directions. 5. A line defined by the points (1,1) and (2,4). The line is scaled by a factor of 3 units. determine the co-ordinates of the line. Sol. Given : cane ik 2] ane i E Byala Scaing factor =3 (Considering for both x and y—axis) S O]]3 0 is-|5 ss | [E]=[s]] [3 oft 2 “lo 3fl1 4 _[3x14+0x1 3x2+0%4 © (Ox1+3x1 0x24+3x4 [ <5 al - Theco— ordinates of the lineafterscalingis(3,3)and (6,12) 6. Arectangle with a length of 10mm in and having width 6 mm has one of its edge lying at the origin and is as shown in fig. Determine the coordinates of the rectangle, with a neat sketch if 2 i. It is translated by a distance of 3 units in x - axis and 4 units in y - axis ii, It is scaled by a factor of 3 units iii. It is sealed by a factor of 2 units in x axis and -1 unit in y - axis 128 Computer integrated Manufacturing Sol. iv, It is rotated at an angle of 45° , w.rt origin V, It is rotated at. an angle of -30° , w.rt origin YN = (0,0)! >x [P')=[P]+[1] agenisee +; 4 10 fl carsi-[5 §] [P)-IskkP] eee Siesta sp 2] [eJ-(sP] ee e 20 20 “al 00" -6"%6 a cos45 -sin45 R]=| (ER) fee | CAD and Computer Graphics Software 129 _ [0.707 -0.707 Sloan 0.707 P'=[R« PP] [0.707 -0.707 5 {0 10 10 9] ~|o707 0.707} [0 0 6 6} _{0 7.07 2.828 -4.242 la 7.07 11312 4.242 eyes = 0.866 0.5 aml a [gece 0.5 ] [0 10 10 0] fo 866 1166 3 = x = 1-05 0866] [0 0 6 6] |0 -5 0.196 5.196 oatwl=[ 2 | m0) 0 10 10 ORS Ome 0 [PJ-IMb«(P]= : Ge gy O10 0 6 GD 0 4 7. Asquare with an edge length of 10 units is located on the origin with one of the edge at an angle of 30° with positive x - axis. Calculate the new position of the square if it is rotated about z-axis by an angle 30° in clock wise direction. Sol. of Se alge 2 Po} 1osin30|"| 5 L -{8:95—10sin30]_[.66 Ps 15410c0s30 | 113.66 130 Computer Integrated Manufacturing —l0sif30]_[—s Pa = = 10cos30 | | 8.66 ©. Therectangleisrepresented by i{o 8 366 5 Psi 5° 13166" 8.66 Given,0=—30° cos -sin@ t= a _| ¢0s(~30°) _sin(—30) | sin(-30) eos(—30) 0.866 0.5 R]= ee -. The nw co — ordinates [e']=[R fr] 0.866 0.5 0 866 3.66 -5 = x 0.5 0.866] [0 5 13.66 8.66 17_f0 10 10 0 (rl-[) 0 10 a Py Ps Pre CDs 3.12 HOMOGENEOUS TRANSFORMATIONS The transformation matrices for rotation and scaling are multiplicative type where as the transformation matrix for translation is additive Man time it becomes necessary to combine transformations to achieve required results. In order to combine the transformation all the matrices should be homogeneous i.c., either multiplicative or additive type. To achieve homogeneity between all the transformation matrices translation matrix is converted into multiplication form by using the following matrix. Mea Sct eat “tbh 4 Andie ate eae Translation : x Point,[p]=| y {nsentorusingfo] 1 Translation matrix, 1 0 dx] =|0 1 4|{rmeiort[) On Oat New pointafter translation [p' |=[1][P] (Insteadof[ p' ]=[7]+[P]) Similar changes were madein representing the other geometrical entitis. ee Line,[p]=|y, y2 eae Be nas Rectangle,[p}=|y, y2 Ys Ye ee L Rotation matrix, | cos®. -sin® 0 [R]=|sin@ cosd 0 es ei Scaling matrix Smee One| {s]=|0 s, 0 O01 3.13 Concatenation of transformations The previous single transformations can be combined as a sequence of transformations. This is called concatenation, and the combined transformations are called concatenated transformations. The objective of concatenation is to accomplish a series transformations to achieve a single transformation. Example: Rotation of the element about an arbitrary point in the element 132 Computer Integrated Manufacturing The sequence of transformations would be: * Transtation to the origin, ° Then rotation about the origin, + Then translation back to the original location. Magnifying the element but maintaining the location of one of its points in the same location. ‘ The sequence of transformations would be: + The clement would be scaled (magnified) Translation to locate the desired point. 8. Determine the position of the point (3,1 x']_[S. 0 1Tx CH SE] x']_f2 os CH af] x'] fe [*] - Next, the rotation can be performed. x] Pe] Be eer) x!'|_[cos0 =e CaS en x!"]_ feos 45 el 6 ele 45 cos45 ( x'"]_[0.7071 -0.7071]6 Eee oe x!"]_2.828 Bales The same result can be accomplished by concatenating the two separate transformation matrices. The product of the two matrices would be sr=|S: © ]feose -sino [0 S, [sino coso ) after scaling by a factor of 2 and rotated by 45°, i CAD and Computer Graphics Software x 0.7071 -0.7071 el 2][.0.7071 0:7071 Syaia -.ag “(1414 1.414 | ‘ow applying this concatenated transformation matrix to the ori iginal point, Peet] Pee es 133 Ne we have

You might also like