Chapter 1
Introduction to Computer Aided Design Drafting
Computer Aided Design packages employ several different ways of representing
the geometry of objects. Most packages have two different ways in which
the objects may be displayed. They may be displayed as Wire Frames
or as Solids.
Wire frame displays are easier to work with during model construction
since the display is regenerated much more quickly than a shades solid.
It is important for the creative process that display regeneration is as
quick as possible, so that the thought process is not unduly interrupted
by having to wait. CADKEY employs wire frame model construction using lines,
arcs, conic sections, and splines for defining the edges and shape of the
objects. The lines, arcs, circles, conic sections, and splines are referred
to as entities. The entities can be thought of as the building blocks
we use for defining the shape of the objects we want to design. We will
look at the entities and their definitions and attributes in detail later
in the chapter.
SOLIDS MODELLING:
Solids modelling can be approached in two different ways; Constructive
Solid Geometry (c.s.g.); and Boundary Representation (B-rep).
CADKEY's solids modeller uses the latter approach as can be deduced from
the above description of the mode of wire frame construction.
Constructive Solid Geometry:
In constructive solid geometry one uses a set of solids primitives
on which one performs boolean operations to create the desired geometry.
The standard solids primitives are such objects as blocks, spheres, cylinders,
cones etc. (see figure 1.1).
The boolean operations, union, intersection, and difference
can be illustrated as shown in figure 1.2.
Most c.s.g. software uses wire frame display, with hidden line removal,
of the solids during model construction in order to speed up screen redraw.
Shaded solids are generally only used for final presentation purposes.
Constructive solid geometry is efficient since it requires relatively
little storage space in order to fully describe an object. For instance
a block can be described by its primitive type, its length, depth, height,
location in space, and material density.
The main problem with pure c.s.g. software is that it is difficult
or impossible to define complex shapes like automobile bodies, aircraft
and ship hulls.

- Figure 1.1 Constructive Solid Geometry; example of primitives
Boundary Representation:
Boundary representation solids modelling is ideally suited for modelling
complex shapes. The boundary of the body
is defined as a surface. The interior and exterior of the body is defined
by the sign of the surface normal i.e. the software will have certain surface
construction conventions which force us to clearly indicate which side
is intended as the interior, and which the exterior. The software uses
this to define the positive and negative direction for the surface normals.

- Figure 1.2 Constructive Solid Geometry; Boolean Operations
The surface is often defined by B-spline surface patches (see Appendix
C for an introduction to mathematical surface
modelling techniques). One way that this can be implemented in practice
is for the user to define a series of sections through the body. These
sections are displayed using B-spline curves (see Appendix B for an introduction
to B-spline and other curve fitting techniques). When one is content with
the shape of the sections, the surface can be generated by performing a
"skinning"
operation i.e. taking the complete set of points defining all the sections
and fitting a surface through them. This surface is divided into surface
patches as illustrated in the wire frame display of a ship's hull shown
in figure 1.3.

- Figure 1.3 Ship's Hull
B-rep solids modelling requires much more storage space than c.s.g.
since it takes a large number of points to define each surface. This means
that one will reach the practical limitation on the size of the model much
more quickly with boundary representation than with constructive solid
geometry. The practical limiting factors are imposed by the hardware available
e.g. processor speed, RAM, and storage space.
One can perform boolean operations on solids generated using B-rep,
in the same way as with constructive solid geometry. Again there are practical
limitations to the complexity of the model that can be handled.
Software that combines boundary representation with constructive solid
geometry would give one the best of both worlds. Also, at the current rate
of growth of affordable computing capacity the practical limitations on
model size are constantly being pushed out further and further.
CADKEY's modelling techniques:
CADKEY uses a wire frame modelling technique, and CADKEY Solids uses
boundary representation. Solids takes the wire frame model and fits planes
and complex surfaces through the edges and sections. More will follow on
the operation of the solids modeller in a later chapter. The remainder
of this chapter will deal with some of the basic principles behind the
operation of modelling in CADKEY itself.
The basic building "blocks" of CADKEY are called entities.
These entities come in different types just like the primitives mentioned
in connection with Constructive Solid Geometry. Cadkey has the following
basic entity types and sub-types:
Line
Arc
Circle
Point
Polyline
- string
- rectangle
- N-GON
- SKETCH
- MESH
Fillet
Conic
- Ellipse
- Hyperbola
- Parabola
Polygon
Spline
- 2D CUBIC
- 3D CUBIC
- 2D CLOSED
- 3D CLOSED
- 2D Auto
- 3D Auto
- HELIX
- MESH
These entities are all lines or curves of one form or another which
have what we refer to as attributes. The attributes are such things as
line type (see figure 1.4), line width (see figure 1.5), line colour, pen
number (pen # refers to selecting plotter pens without using line colour
to specify the pen to be used). Polygon and closed polyline entities have
an additional attribute. They can be outlined or filled (see
figure 1.6).



- Figure 1.4 (Above left) Line Types
- Figure 1.5 (Above center) Line Widths
- Figure 1.6 (Above right) Outline/Filled polygons or closed-polyline
entities
In addition to the entities that we use for constructing the objects
we have another group of entities called detail entities. These
entities are:
- Dimension
- horizontal
- vertical
- parallel
- radius
- angular
- diameter
- ordinate
- serial
- chamfer
- Note
- Label
- Arrows
- Witness lines
- Cross-hatching
- brick
- steel
- copper
- alloys
- aluminum
- rubber
- marble
The text used in details has the following attributes:
- FONT type
- Height
- Aspect (i.e. ratio of height/width of character)
- Slant (i.e. slant of character)
- Fill (characters either filled or outlined)
- Note Angle (angle of base line of text)
- Line spacing (spacing between successive lines of text)
- Underline (text either underlined or not underlined)
The dimensions used have the following attributes:
- DIMENSION REPRESENTATION
- DECIMAL
- FRACTION of INCHES
- FEET and INCHES
- DEGREES
- DEGREES and MINUTES
- TOLERANCES
- UNITS
- INCH
- MM
- FEET
- CM
- YARD
- METRE
- USER (i.e. user defined units)


- (Above)Figure 1.7 Arrows IN and OUT
- (Above Right) Figure 1.8 Arrow styles
The arrows have the following attributes:
- DIRECT
- (i.e. the arrows are set to the inside or outside of the witness
lines)
The witness lines have the following attributes

- Figure 1.9 witness line options
The leader lines have the following attributes:
- BOTH
- FIRST
- SECOND
- NONE
- SOLID
- FIRST SOLID
- SECOND SOLID
- NO ARROWS
The leader line options are shown in figure 1.10.
The cross-hatching has the X-HATCH Type as its basic attribute
(i.e. brick, steel etc.). In addition we have the following two attributes:
- ANGLE (i.e. slant of the crosshatching)
- SPACING (i.e. the distance between cross-hatching lines).
Figure 1.11 shows the X-HATCH Types available.
The above outline is intended to give you an idea of the thinking behind
the CADKEY program. It will give you a better concept of how the program
functions, and how you may change things that are not the way you would
like them to be. This applies to both your model and presentation drawings.
For more detail on the program menus and sub-menussee Appendix D. All these
principles will become clearer to you when you start using the program.

- Figure 1.10 Leader type options
If we look at the way in which the entities are defined we get an idea
of how model information is stored. Lines for
example have to have the following information stored:
LINE,pt1(x,y,z),pt2(x,y,z),L-type,L-width, L-colour, [PEN
#].
In other words, we need to store the entity type, the minimum geometrical
information (in this case the x, y, and z coordinates of the line end points,
since all points in between can be reconstructed by using the mathematical
equation for a line in 3-space), plus the entity attributes (i.e. line
type, line width, line colour, and an optional specification of pen number.
The way in which the information about each entity type may be stored can
be seen from the structure specified for the CAKEY Advanced Design Language
(CADL). See chapter 16 for more details on CADL.

- Figure 1.11 Cross-hatching options
End of Chapter 1