Cad Guidebook: A Basic Manual for Understanding and Improving Computer-Aided Design (28 page)

Read Cad Guidebook: A Basic Manual for Understanding and Improving Computer-Aided Design Online

Authors: Stephen J. Schoonmaker

Tags: #Science & Math, #Biological Sciences, #Biotechnology, #Professional & Technical, #Medical eBooks, #Special Topics, #Professional Science

BOOK: Cad Guidebook: A Basic Manual for Understanding and Improving Computer-Aided Design
5.7Mb size Format: txt, pdf, ePub

FIGURE
5.4

An object’s real 3-D “origin.”

118 Chapter 5

aligned in that direction); this is done by making sure that the origin in both the
Front and Right views are at the same vertical location (refer to Figure 5.1).

5.6.4 Viewport Calculations

It is important to note that the careful specification (alignment, scale, etc.) allows
one to calculate the exact location of a point with respect to the entire drawing
based on the characteristics of the view. Calculating this normalized location in-
volves a transformation or mapping. It transforms local view coordinates to the
global coordinates for the entire drawing. It is often expressed in terms of a posi-
tion vector such as R. The calculation looks like the following in vector form:

Rglobal(X,Y)
=
Rorigin(X,Y)
+ scale *
Rlocal(x,y)

where:

Rglobal(X,Y)
is a vector in global X,Y coordinates (such as model space) that

points from the global origin to the desired point within the viewport. Its

components would be Xglobal
and Y

global.

Rorigin(X,Y)
is a vector in global X,Y coordinates that points from the global

origin to the origin of the viewport (i.e., local origin). Its components

would be Xorigin
and Y

origin.

Rlocal(x,y)
is a vector in local x,y coordinates that points from the local ori-

gin to the desired point within the viewport. Its components would be

xlocal
and y

local.

And, scale is the scale factor for the viewport (such as 0.5 for half scale).

When vectors are added, their separate components can be added in “sca-
lar” form. Thus, the calculation for the global X and Y for a point in a viewport
with a scale factor becomes the following:

Xglobal
= X

origin

+ scale * x

local
Yglobal
= Y

origin

+ scale * y

local

Understanding this transformation calculation can be important if the
CAD system allows geometric entities to be created in either the local or the
global coordinates. In this case, 2 points located in 2 different views (even if they
use different scales) can be related to each other accurately (by using the global
coordinates).

5.7 LAYERS

Another method of organizing the graphical data displayed on a CAD system is
through the use of layers. Although different CAD systems will use layers in dif-

2-D CAD 119

ferent ways, this feature primarily allows for the selective viewing, editing, and
management of the entities in the drawing. For instance, a CAD drawing may
have a layer for dimensions, a layer for hidden lines, a layer for notes, etc. The
layers can be thought of as clear paper that can be overlaid onto the geometric
entities.

Layers can be used in a variety of ways to improve working with the draw-
ing. If a drawing is too cluttered, and the user needs to no longer view data tem-
porarily (such as all notes or dimensions), then the user can hide these items by
turning off or hiding the entire layer. Or, some attributes of the data on the layer
may need to be changed. For instance, if all the lines on a layer are for holes
drilled into a part, and the user wants to change the color of the circles for the
holes all at once, then the user should be able to select the layer and then make
the attribute change for them all.

In some cases, the user is responsible for making sure that the particular
types of items are placed on independent layers as a company standard. If so,
users should determine if this is the case before working on a drawing. A com-
pany may also need to establish a standard naming convention for the layers since
the CAD system may allow user defined names or numbers for them.

Some CAD systems may have the layer capability, but layers may not be
the only means of filtering or selectively viewing or editing the different entity
types. These systems may offer entity filtering instead. In this case, all the dimen-
sions or notes in a drawing could simply be selected automatically by a single
command. In this case, the CAD system actually “knows” the different entity
types in the drawings data structure instead of relying on the user to change lay-
ers as they create the different types of entities for the drawing.

If the entity type filtering option is available, then the layers could be used
for other functionality. For instance, if the designer of a component was explor-
ing different possible configurations of the design, then the layers could be used
to contain different geometry for the different designs. Then, by managing the
layers, the different options or configurations could continue to be refined until
the final design is achieved. The layout type of drawing (discussed in the previ-
ous chapter), in particular, can take advantage of this approach.

There may be many more applications for layers within the context of a par-
ticular CAD system or design task. The user will need to refer to the CAD system
documentation or experts for more detailed information. The intention here was
simply to explain what layers are and what they can accomplish in general.

5.8 VECTOR GRAPHICS

An important ramification of
the “smart paper” analog
y for CAD systems is that
the CAD drawing (particularly the geometric entities such as lines and arcs) is

120 Chapter 5

independent of the computer devices used. In other words, the drawing is correct
regardless of the size or resolution of the computer monitor or the hardcopy de-
vice used to print the drawing. This is a result of the fact that a mathematical
model has been created for the drawing.

In the mathematical model, a line has a beginning X and Y value and an
ending X and Y value. These 4 numbers represent the mathematical model for
the line. Of course, in order to see this line on the computer monitor, the mathe-
matical model must be “mapped” or converted to the screen. This mapping pro-
cess is automatically performed by the CAD system and the computer hardware.
It takes the X and Y values the user entered and converts them into specific in-
structions for the computer to change the color of specific pixels on the screen to
show the line. Of course, this shown line is an approximation of the mathematical
model, and “better” graphics hardware will show the line more clearly and pre-
cisely, but the exact numbers (the X, and Y in the mathematical model) are not
affected by the computer hardware.

This important concept of model vs. computer graphics for the CAD sys-
tem can be expressed by the term vector graphics. A vector is a specific mathe-
matical concept that is helpful in managing graphics and different viewports
(such as the equation shown earlier for finding the relationship between the local
and global X- and Y-values). Any CAD system (or any program actually useful
for design work) must be based on vector graphics.

The alternative (which could not really be called a CAD system) would be
to use bitmap graphics. In this case, there is no mathematical model. The soft-
ware (such as a “paint” program) would not always intelligently recognize any
particular geometric entities. What is seen on the screen is just a collection of
dots.

Appreciating the difference between vector graphics and bitmaps is a major
benefit for CAD users and CAD administrators alike. For instance, one can imag-
ine that it is a simple matter to convert vector graphics to a bitmap. Indeed, the
mapping process to display the drawing on the computer monitor does just that.
The screen has a finite number of pixels, so what one sees on the screen is a bit-
map itself. But, it is extremely difficult to convert a bitmap to vector graphics
(particularly for drawings). How would a computer program tell the difference
between a set of vertical lines in a drawing (some being the object and others
being dimensions), or how would it tell the difference between a string of number
ones, and a string of lower case letter Ls? This process is known as “raster-to-
vector” conversion, and it is rarely extremely successful with drawings. It is sim-
ilar to object character recognition (OCR) for documents, but at least in a docu-
ment, the OCR program only needs to find numbers, letters, etc. In a drawing,
there is a much wider variety of content to figure out.

2-D CAD 121

Another instance of appreciating the difference between vector graphics
and bitmaps is that one can not really import or insert many popular types of files
into CAD systems. Files such as GIF, TIFF, and JPEG are bitmap files. There-
fore, they have no mathematical model that can be readily used in the CAD sys-
tem. The data in these type of files can be projected or overlaid onto the screen,
but they cannot have any useful connection to the mathematical model. One ex-
ample of this would be a “decal” shown in a CAD drawing. The decal can be
moved and resized (as a bitmap), but one would not be able to connect a line from
what is shown in the decal to the rest of the normal geometric entities in the CAD
drawing. One solution to this is for software to allow a user to trace the geometry
from the bitmap. In this case, the user can manually create a mathematical defini-
tion for the geometry. The results of this tracing process can be acceptable for
design purposes, but there will be a loss of some accuracy versus the original de-
sign’s mathematical model (the image can only be as good as the bitmap’s finite
resolution).

5.9 GEOMETRIC ENTITIES

Naturally an important feature of the CAD drawing is the geometric entities that
represent the object being documented by the drawing. There are a variety of
geometric entities that are usually provided for by the CAD system. Each of them
will eventually be useful to an experienced CAD user. This section will give a
very brief overview of these entity types as well as some discussion on how ge-
ometry is recognized and/or selected in the CAD system.

5.9.1 Snapping

One of the most common assisting techniques in CAD systems is snapping.
Snapping allows the user to make certain that only specific points on the screen
will be recognized for selection. These points form a grid on the screen (refer to
Figure 5.5). Usually the user can indicate or customize the interval for the grid.

Snapping is one way to ensure that various elements or geometry are
aligned to each or with respect to an origin or other X,Y position that is meaning-
ful to the design. However, the grid can also be a hindrance. If the grid interval is
set to 1 mm, and a geometric entity needs to be located at a fractional location of
a millimeter (such as 1.5 mm), then there will be a problem. The snapping is go-
ing to only allow the selection of whole number millimeters. This technique is
probably called snapping since the mouse is only going to recognize the grid
points, previewed entities appear to jump around or “snap” from grid point to
grid point.

122 Chapter 5

FIGURE
5.5

An example of snapping grid.

5.9.2 Geometric Relationship Recognition and

Utilization

Some CAD systems are not restricted to snapping to the imaginary grid locations.
These systems can recognize relationships in the existing geometric entities. For
instance, if two existing lines cross at a point, then a new line can be drawn such
that it starts at this intersection point. This would be the recognition of an inter-
section. Some other possibilities include starting point of a line, ending point of a
line, coincidence with a line, the center of circles, the center of arcs and fillets,
tangency to circular entities, midpoints of lines, etc.

Other books

Running From Mercy by Terra Little
The Guardian by Carey Corp
The Guilty Plea by Robert Rotenberg
Down a Lost Road by J. Leigh Bralick
Lost in You by Heidi McLaughlin
The Golden Season by Brockway, Connie
Krysta's Curse by West, Tara
Under the Harrow: by Flynn Berry