Upload
others
View
2
Download
0
Embed Size (px)
Citation preview
AN APPLICATION OF COMPUTER
AIDED DESIGN TECHNIQUES TO MECHANICAL
ENGINEERING
by
ROBERT CHARLES EDNEY, B.Sc.(Eng.), A.C.G.I.
A thesis submitted for the degree of Doctor of Philosophy of London
University and the Diploma of • Imperial College
Mechanical Engineering Department Imperial College London, S.W.7
June 1977
ACKNOWLEDGEMENT
Thanks are due to Dr. A. Jebb, Dr. C.B. Besant and
Messrs. Alfred Herbert Ltd. for their support and en-
couragement during the preparation of this thesis.
Also to Mr. G.S. Stavrides and Mr. J.S. Richardson
for two useful projects, and to the CAD unit at Imperial
College for much helpful advice and criticism.
ABSTRACT
The main point of this thesis is that computers can only contrib-
ute to the design process in so far as the ideas and shapes of
interest to the designer can be expressed in a form which can
be accepted by the computer. Different techniques of reading data
into the computer are mentioned and some previously successful
applications of CAD techniques to Chemical, Electrical and Mech-
anical Engineering highlighted. A computer system based on a
digitizer and a minicomputer which can produce Mechanical Engine-
ering drawings is described in detail, and the possibilites of
extending the digitizer approach to design calculations and
generation of NC tapes discussed. The conclusion contains a
table of different data input techniques and their estimated
suitability for different applications given.
CONTENTS
CHAPTER PAGE
1 Introduction 1
' 2 Basic Concepts and-Techniques 16'
3 Engineering Drawings' 32
4 Design Retrieval 58
5 Design Analysis Calculations -70
6 Size and Shape Definitions 80
7 Numerical Control Tapes 37
8 Conclusions 95
References 101-r
Glossary 107
Appendix I The Medcap System 110
Appendix II Component Statistics 121'
Appendix III Geometrical Elements 137.
Appendix IV Computer Drawings Back Pocket
Chapter 1
1Nia0DUCTION
Computers
Computers have been steadily developing since the second
world war until the present day, at which point they have a
well understood technology and make a significant impact
on our economy.
The first computer installations were of large main frame
machines costing large amounts of money, and requiring a per-
manent staff of operators to control the day to day running of
the machine. Many companies now have large and fast machines
of this type to perform accounting and general data processing
where a large amount of tedious and routine work has to be done.
Usually these types of computers expect the input data in the
form of numbers, either punched on cards or typed in from a
terminal, and the output is presented in the form of a print
out, usually on paper but often on a visual display screen. A
lot of programming is done under batch mode, whereby the user
submits a job in the form of a deck of cards to the computer.
This job is then read by the computer and takes it's place in a
queue of jobs with which the computer has to deal. When the
job has been executed by the computer the answers are printed
out on the line printer and returned to the user. The time
between submitting a job and receiving the answers varies
considerably depending upon the size of the job, the size of the
computer and the total amount of work that the computer has to
do, but the time may vary from a few minutes to a few days.
Most large main frame computers also offer a time sharing facility,
whereby several users each have a terminal and can type in
commands and submit jobs to the computer simultaneously. Be-
cause the computer can execute an instruction far quicker than
a person can type in a new instruction each user is given the
i) lus ion that he has complete control of the computer, and the
machine can respond very quickly to commands given in this way.
However all the communication between the man and the machine is
done in terms of rharacters, often tables of numbers. The user
2
types in, or punches on cards, the input data, and the machine
prints out the answers either on a line printer or a terminal.
An important innovation occurred in the 1960's with the advent
of the minicomputer. Minicomputers ought not to be regarded
as•scaled down versions of main frame machines with many of the
extras removed. Where a small amount of computing power is
required often and quickly a minicomputer with appropriate soft-
ware costing a few tens of thousands of pounds can turn out to
be a much better solution than a large main frame computer cos-
ting several hundred thousand pounds. A lot of minicomputers
perform dedicated tasks, such as controlling a numerically
controlled machine tool, in which circumstances the computer
only ever executes one program at a time and needs very little
operator supervision.
Advances in electronic technology now makes it possible to build
a complete processor on a single crystal of silicon. These are
called micro processors. At the time of writing a kit of parts
to build a micro processor capable of loading and executing
a program can be bought for £60 (17). A peripheral (such as
a teletype) is needed which will raise the price to about £300
at most for a working computer system. With this dramatic
fall in costs and large range of computers available new appli-
cations are being investigated, and cost alone is no longer a
prohibitive factor.
Computers in Engineering
Engineering companies have been using large main frame computers
for many years in a strict commercial environment, quite apart
from engineering applications. Numerically controlled machines
have created a new need for computing power. Computers are
used in the basic control functions to drive a numerically con- ti trolled machine tool, and also at a higher level to produce NC
control tapes from a geometrical description of the shape to he
cut. Computers are also extensively used in the design process
to perform complex calculations of a scientific nature, such
as finite element stress analysis of a ship's hull or a mass
and energy balance on a chemical reactor. Such calculations can,
and often do, produce large amounts of answers, usually in the
form of tables of numbers printed out on a line printer. Answ-
ers presented in this form can be hard to assimulate, and a
visual presentation, such as a plotted graph, is more acceptable.
Several large computers are equipped with either drum or flat
bed plotters, or microfilm plotters on which graphical inform-
ation can be outputted. However the data input is still in
character form, usually punched out on cards.
Engineering Design and Production
Many varied and intricate skills and processes are involved in
the design and manufacture of an engineering item. For example
the design of a new lathe might very well start from a require-
ment to cut components of a given size. Having determined the
maximum size workpiece to allow for the designer would use his
experience and knowledge of previously constructed machiries to
start to design the new machine. A drawing board and a pencil
(and eraser) are tools which the designer can use to express the
concept of the new machine on paper. To help visualize what the
new machine should look like several drawings may have to be
prepared, and ammended and redrawn. This process may well continue
several times before an acceptable design is finalized. Some
calculations, such as stress analysis and estimates of mass and
stiffness and power requirements may be necessary before the
design is complete, but the bulk of the design time is spent on
such considerations as will all the pieces fit together; can
the designed and drawn components all be manufactured with the
facilities available, as well as economic aspects? And can
the components be easily assembled and taken apart to allow for
maintenance and service? It is important to settle such consid-
erations before actual construction begins, and so avoid expens-
ively manufactured scrap.
Once the design has been finalized, detailed drawings of all the
components to be manufactured must be drawn up, as well as lists
of parts and quantities required for each part. This is often
time consuming, laborious and error prone. The working drawings
can then be passes on to the workshop for manufacture to begin.
When, say, a new casting is required the patten maker must
first study the drawings very carefully and form an accurate
picture in his mind of what the final casting should look like.
When this has been done manufacture of the patten can begin.
Many of the problems encountered in the design of a machine tool
are solved by the designer using his experience and standard
codes of practice, as well as intuition.
When an electrical engineer designs a new circuit a great deal
of circuit analysis may go into producing an original circuit,
or checking the performance of a standard arrangement. Once
the circuit has been finalized a printed circuit board is often
required, meaning that the designer has to convert the circuit
diagram into a physical arrangement of components on a board and
provide all the necessary connections between the components
in terms of copper strips. An accurate drawing of the printed
circuit board is then made which can be photocopied and used
to etch a photosensitive printed circuit board. The design of
integrated circuits involves the preparation of several photo-
masks, and a large scale integration chip may involve the
positioning of 100,000 details in seven or eight different layers,
each detail positioned according to design rules and the circuit
diagram (21). The processing of such information manually is
very error prone and time consuming. A single mistake in the
positioning of one of the detials can force the redesign of
several masks, and the mistake may not be detected until the
final circuit has been constructed and tested.
In the field of Chemical Engineering a great deal of design
work goes into the preparation and construction of a new chem-
ical plant. After the basic chemistry has been established
the Chemical Engineer can start the process design stage, This
frequently involves elaborate mathematical calculations on, for
instance, energy and mass balances. The engineer has to calc-
ulate the amount of raw materials going into the plant, the
product yield coming out and the consequent waste. Also estim-
ates of the energy required are made. The designer then tries
to optimize the design by maximizing the yield and, as far as
possible, minimizing the cost. Such considerations, among
others, will determine how many heat exchangers. reactors,
- 5
storage tanks etc. are needed for the proposed design. Also
the operating conditions, such as the pressure and flow rates
at each point in the system can be chosen and the logical
connections between each plant item determined. During the
final stages of the design the actual plan of the site is used
to position each piece of equipment and route the pipework
between them. Even a modest size chemical plant contains a
vast amount of pipework and it is not a trivial task to route
the pipes from one point to the next, and to give a total of the
length required. Mistakes in estimating the amount of pipework
needed can be costly and cause delays in construction if the
missing pipes are of an unusual specification, not readily
available at short notice.
Computer Aided Design
Several papers have been published (22, 23) describing programs
written to perform mass end energy balances on chemical process
plants. The user of such programs has to punch out some data
cards describing the number of heat exchangers, evaporator
vessels etc. in the system, and their interconnections. Also
included in the input data are items like the input flow rates,
the size of the heat exchangers and the physical properties of
the incoming materials. Built into the program are the physical
laws governing the mass and energy balances within the chemical
reaction, often in a simplified form. The program can then cal-
and output as answers, the mass flowrates and pressure
etc. at any point in the system. The calculations are often
iterative and very tedious to perform manually, and a computer
program represents a far more satisfactory method of carrying out
such calculations (23). The input data is punched out on cards,
fed into the computer and the answers come out as tables or
columns of figures printed on paper.
One existing program known to the author has been developed to
assist the Chemical Engineer in the site layout and routing of
pipework between plant items (24). The user starts with a schs,m-
atic diagram showing all the pieces of equipment required in the
plant and their logical interconnections. Also a map of the
site is available and a physical description of the size of each
plant item. As part of the input data the user can specify where
on the site to position the storage tanks, heat exchangers
etc.,, and the fact that a pipe must run from the top of distill-
ation column A into heat exchanger B, then on to storage tank G.
A fair amount of design experience has been included in the
program. For instance items such as the maximum working press-
ure suitable for a given kind of pipe, the maximum distance
between supports and the maximum distance between expansion
joints are standard design constants, often specified in codes
of practice, and are part of the program. Once the input data
is complete the program can determine an optimum route for each
pipe according to a cost criterion and automatically add up the
number of valves, supports etc. requried, and the total length
of each kind of pipe called for. Not only does the program
provide accurate estimates of the total pipework specified and
a bending chart for each pipe, showing the position and angle
of each bend in the pipe, location of valves etc., but the rel-
ative merits of different site layouts can easily examined by
changing the input data and rerunning the program.
Hosking has demonstrated how a computer system can be used to
aid the construction of printed circuit boards, both single and
double sided (25). It is assumed that the physical layout of
the components on the board has been determined and that it is
necessary to route the interconnections between the components.
The geometry of the board is described to the computer by typing
in numbers and characters, and the connection schedule is input-
ted
in a similar manner. The program then allocates the vertical
connections and gives the user an opportunity to edit these.
The final stage is then for the computer to complete the cohnect-
ion layout by adding in the horizontal strips and plotting out
the tracking. Traditional manual methods of producing artwork
for printed circuit boards involve the accurate deposition of
black adhesive tape onto a stable transparent material at a
suitably enlarged scale. The resultant taped masters are photo-
graphically reduced to produce the final art work. It is claimed
that computer aided techniques can produce far more accurate
;jots, especially as track widths decrease rand component packing
densities increase (25). A similar paper (21) describes how
photo masks can be generated on a computer for the production
of LSI (Lopge Scale Integration) chips. The requirements in thls
case are far more rigorous than those for printed _circuit
boards.
Numerically controlled machine tools began making their appear-
ance during the 1960's and are used extensively in the aircraft
and aerospace industries to cut out shapes such as wing surfaces
and turbine blades. The big difficulty in writing numerical
control tapes to cut out, say an aircraft wing surface, is to
describe and express the shape of the wing in a form which the
computer can assimilate. Indeed the main problem in computer
aided design is to express the designer's concepts in a form,
often numerical, which can be fed into a computer. Several dif-
ferent methods exist, depending on the peripheral used to feed
in the data, three of which are described below.
Pure Numeric Approach
The easiest way of feeding data into a computer, from the prog-
raming stand point, is to punch out numbers onto cards and then
read the data cards into the machine, wait while the program
executes and then collect the answers, either from a line printer
or a plotter if graphical output has been requested. A lot of
computing is done in this fashion, and is suitable, for instance,
for the chemical process programs discussed earlier (22,23).
However it is not always convenient, or possible for a designer
to express ideas and concepts in a purely numerical fashion. It
would be difficult to imagine someone describing, say a motor
car gear box, by drawing out all the parts on graph paper, read-
ing off the x, y coordinates of every line on the paper, then
punching these coordinates on cards and reading them into the
computer. It is precisely this list of coordinates which the
computer needs to drive a display device and give a visual output.
Similarly to cut out an aircraft wing surface a numerically cont-•
rolled machine tool needs a list of numbers describing the shape
of the wing and the paths which the cutting tool has to take.
Some other means of inputting data, other than in a pure numeric
form has to be found if the computer is going to make a contrib-
ution to this part of the design process.
Lanuage Input
Numnous languages have been developed to describe components
to be manufactured by numerically controlled machine tools,
among the best known being APT (5). Languages like APT provide
a facility for a programmer to define the geometry of the shape
to be cut in a mathematical form, and also to control the
motions of the cutting tool and determine the depth of cut and
feed rate etc. One useful tool developed by Coons and others
is a patch technique which can be used to define surfaces such
as aircraft wings and mOtor'car bodies, and provide smooth
contours between patches (26). A fair degree of skill is used
in the preparation of these programs and all the data is still
fed into the machine in terms of characters, usually punched on
cards.
Graphical Input
Punching out numbers on cards is not the only way of inputting
data into a computer. Fig. 1.3(a) shows a typical batch mode
processing sequence. The user would submit the job to the
card reader and wait for the output from the line printer. If
necessary the user can make any required changes to the deck
of cards and resubmit the job. The time interval between read-
ing in the job and receiving the answers varies considerably,
but is not insignificant. Once the computer has finished the
batch job the machine will start the next job for the next user.
Fig. 1.3(b) represents an interactive situation, where the user
sits at a time sharing terminal and types in his commands to
the computer via a terminal keyboard. The answers and output
can be written onto the display by the computer as soon as
they are ready. Once the answers have been displayed on the
screen the computer asks the user for more instructions, rather
than finishing with this user altogether. The computer system
will keep up a dialogue with each user for as long as he rem-
ains at the terminal. Fig. 1.3(d) shows a storage tube type
display. In this case, once the computer has calculated the
coordinates- of a line these are fed into the storage tube and
the line is displayed on the screen. The line will remain
visible until the entire screen is erased. Fig. 1.3(c) shows
a refreshed display, similar to a television receiver in that
if a line is drawn on the screen it fades away quite rapidly and
the computer must continuously overwrite the line for it to
9
remain visible. Once the program has calculated where the
line should go the coordinates are left in a separate part
of the computer's memory. An entirely independent display
processor continually reads the coordinates in this part of
the computer's memory and draws the lines on the screen. The
display processor may be a specially constructed piece of hard-
ware or a program running at a high priority under a time shar-
ing system. •
A refreshed display has the advantage that single lines can easily be deleted from the screen without altering the rest of
the picture. Also moving pictures can be displayed with quite
realistic effects. The disadvantage is that only a limited
number of lines can be displayed without any flicker being
noticed. Storage displays need far less computer power to
drive them, since the lines comprising a given picture need
only be sent to the display once. However, selective erasure is
not yet possible with a storage display. If only one line has
to be deleted the whole screen must be erased and the complete
picture redisplayed.
Volume Primitives, developed by Braid and others, provide an
effective method of describing a three dimensional shape to
the computer. Built into the computer's program are descript-
ions of, say, a sphere, a cylinder and a cube. The user can
instruct the computer to draw a cube of a certain size at a
given position on the screen, and an isometric picture of the
cube is displayed on the screen. Other cubes can be added
above, below, by the side of and partially inside the original
cube. Something like a shaping or milling machine can be des-
cribed quite effectively in terms of cubes of different sizes
placed next to each other. Once a three dimensional picture
has been built up in this manner the computer can be instructed
to view the object frcm the other side, giving an isometric
view of the same object from several different sides. This
can be very helpful in visualizing what the object looks like
in real life, something a patten maker has to do before prep-
aring for a casting. Techniques also exist for automatically
generating orthographic views of the object, either in first
angle or third angle projection, and these can be used as a
starting point for engineering drawings.
- 10 -
Justifications for CAD
There are two possible justifications for using computers
in the design and manufacturing processes. Firstly CAD
techniques can solve problems which would not be economic, or
perhaps even feasible without them. For example a great
deal of data processing is required to produce a numerical
control tape to cut out an aircraft wing surface. It would
be difficult to imagine a programmer writing down all the
coordinates necessary to move a cutting tool in the correct
direction, the punching these coordinates on to paper tape
and feeding them into a numerically controlled machine tool.
Programs, such as APT, have been available for almost fifteen
years to greatly assist in the production of these control
tapes. That is an example of manufacturing technique which
requires computer aid to make it practical, i.e. the computer
has made a contribution to the development of a new technology.
The second justification for using computer aided design
would be if the computer could reproduce a process which is
-done manually, but offer considerable savings in cost and
time over existing manual methods, i.e. perform an existing
task more efficiently.
Some of the shapes dealt with by NC programs are of complex
geometries, usually two and a half or three dimensional, however
a large percentage of engineering components are two dimensional
and a great number of those are rotational turned parts. Much
skilled time and effort is spent in the design, drawing and
manufacture of such components. A typical established engineering
company might be expected to have 40,000 drawings of current
designs filed in the drawing office (10), not to mention drawings
of obsolete and superceeded designs which would be kept in an
archive. The research described in this Thesis set out to
ask two questions, viz: can computer aided design techniques
be used to reproduce any of the steps, which are currently
done manually, involved in the design, drawing and production
of simple two dimensional engineering components, and secondly,
if the computer can reproduce existing tasks, do computer
methods offer any significant advantages over existing manual
methods?
11 -
This Thesis
This thesis describes an examination into some of the ways in
which computers, and specifically computer aided design techniques
can be applied to general mechanical engineering problems. The
idea of the research is to see how much of the man-machine
dialogue can be performed in terms of pictures, rather than
characters. A fair degree of work has been done in the field
of using a computer to construct and display an image on
a screen. Much work has, is, and remains to be done in the
field of inputting geometrical shapes to a computer (18). Once
the data is in the machine then it is not so difficult to
present the answers in a graphical form, either on a display
screen or a plotter. The early successes in CAD were in
areas such as producing aircraft wings and involute pump shapes
on numerically controlled machines, where the essential problem
is to describe a complex geometrical shape, and CAD techniques
provide the only feasible method of doing this. However the
vast majority of engineering components, particularly those
turned on a lathe are of simple geometrical outline and do not
need elaborate mathematics to define them. Since engineering
drawings are two dimensional it was decided to see how far
2-D graphical input techniques, and specifically a digitizer,
could be used to describe general mechanical engineering components.
A big advantage of a digitizer and display screen approach is
that it is easier for a non technical user to appreciate what
is happening, since virtually no programming skill is called for
and all the man-machine communication is done in terms of pictures
rather than characters.
Chapter 2 describes the basic programming techniques used and
developed by the author. The software system (Fig. 12) consists
of 33 overlays, representing about 10,000 lines of code, includinJ,
comments. Most of the programs were written in FORTRAN, with
a few assembly language routines. Chapter 3 describes the
working and development of a package to produce engineering
drawings and illustrates some of the strengths and weaknesses
of the computer.
Four problems were considered as suitable for computer aided
design techniques, viz:
- 12 -
1 Production of Engineering Drawings
2 Design and Information Retrieval
3 Design Analysis Type Calculations
4 Generating NC Tapes
Each of the above areas is well suited to the computer, and
programs of one form or another already exist in each of the
four areas. However each program has been developed separately
with little consideration as to program-program interaction or
the design of a single software package (3). By having each
computer function, such as design calculations and the generation
of NC tapes, integrated into one single computer system it
might be possible to achieve large time savings in the design-
production process, if only because all the relevant information
is together in one place (4).
The computer hardware used in the project, Fig. 1.1 consists
of a dedicated minicomputer with a digitizer for graphical
input, a storage tube for graphical output, one 1.2 M word disk,
a magnetic tapc unit, a line pr4nte-, 24 K wordsof r'r/-"P a
flat bed plotter. The hardware and system software have been
under development at Imperial College for a number of years
(1,2) and applications are now being examined. The pocket inside
the back cover contains a digitized drawing.
- 13 -
PAPER
TAPE
PUNCH
PAPER
TAPE
READER
2.4 M
BYTE
DISK
PDP 11/45
24K CORE
MAG TAPE
UNIT
SCREEN
DIGITIZER
FLAT BED
PLOrEER
Figure 1.1. Hardware Configuration
Plotter
Engineering
Drawings
-14 -
Accurate Size
Specification
Dimension
Symbols
Shape
Definitions
Geometrical
Constructions
Lines-Circles
Archive
Data Base
Design
Evaluation
Design
Retrieval
Fig. 1.2. Software Modules
- 15 -
Card Reader
Line Printer
Cards Paper
(a) Batch Mode Processing
(b) Interactive Processing on a terminal
Computer
Memory
Program Defining
the picture
(c) Refresh Display Device
Storage
Display
Program Defining the picture.
(d) Storage Display Device
Fig. 1.3. Different ways of communicating with a computer
Refresh
Display
Display
Processor
- 16 -
Chapter 2
BASIC CONCEPTS AND TECHNIQUES
Hardware:
'Fig 1.1 showed a block diagram of the hardware, which
consisted of a PDP 11/45 minicomputer, with 2uK of core,
a digitising table, a storage tube, a 1.2M word disk unit,
a magnetic tape unit and a flat bed plotting table.
The digitiser consists of a glass working surface approximately
2 m x 1.2 m, on top of which a device called a 'bug' rests.
This can be moved over the glass surface by hand. It transmits
a 400 Hz signal which is picked up by a receiver mounted below
the glass surface. This receiver is mounted on a gantry which
allows it to move in two axes. A control system searches for
the bug and ensures that the receiver is always directly
underneath the bug. Two encoders are mounted on the gantry
and these enable the X, Y coordinates of the bug to be
measured. The digitiser has a basic resolution of 1/40 mm,
and the bug's coordinates are read and stored by the computer
to an accuracy of 1/10 mm.
The storage tube (a Tektronix 611) has a resolution of 1024 x
1024 bits, and a display area of 10" x 10". A particular
point on the screen is designated by its integer coordinates;
(0, 0) is the bottom left-hand corner, (512, -512) is the
screen centre, and (1024, 1024) the top right-hand corner.
The storage tube can be used in two modes, store and non-
store mode. In store mode, once a vector has been drawn
on the screen it remains visible and the computer need take
no further action. In non-store mode the line remains
visible for a short time only, and if it is to remain
permanently visible the computer must draw it repeatedly,
or continually REFRESH the display.
The magnetic tape unit and disk are standard computer items.
OBEY
COMMAND
Display Cursor
at X,Y
17 -
Graphical Input and Output:
Graphical I/O is done by using the storage tube and digitiser
together. A short program can be used to read the digitiser
coordinates, look for a command, and refresh a cursor on the
display screen (Figure 2.1). The user can move the bug across
the table whilst the cursor will echo his movements on the
disply screen. The flow chart (Figure 2.1) is the basic
background loop to which the software always returns.
The software divides the digitising table's surface into two
regions, one on the left called a MENU area, and a working
area on the right. If the user specifies a part of the table
on the menu, it is interpreted as a command, or instruction,
whilst if a point on the working area is specified, it is
treated as data. In addition to the menu, the bug is fitted
with eight buttons, which can be used to give instructions
regardless of the bug's position on the table.
START
L Read
Table X,Y
Fig. 2.1.
• - 18 -
Due to the difference in size of the table and the screen,
the table coordinates must be scaled so that all the work-
ing suface of the table can be displayed on the screen
(Equation 2.1):
XSC - XTB x 1024 TB SIZE
( 2.1) YSC - YTB x 1024
TB SIZE
where TB SIZE is the size of the table's working area;
(XSC,YSC) are screen coordinates and (XTB,YTB) table
coordinates. This means that the displayed picture is
very much reduced in size, and it makes it virtually
impossible to see any fine details. To overcome this, a
software device called a WINDOW is employed. This enables
the user to specify any part of the table and to scale it
to fill the display screen. It is necessary for the user
to specify the start point and size of the window (Figure
2.2, Equation 2.2), where (XWN,YWN) is the position of the
window, and W SIZE the size of the window.
w size
Selected Window
(XWN,YWN) MENU
WORKING AREA
Fig. 2.2. Setting a Window
Monitor
Resident
Overlay
Low
Address
High
Address
Disk Overlay File
1 2 I 3 4
-
XSC - (XTB - XWN) x 1024 W SIZE
(2.2 )
YSC - (YTB - YWN) - 1024 W SIZE
Overlays:
Overlays represent a method of running a large program on a
small machine, and also enable several different programs
to be chained one after the other. As in Figure 2.3, the
core is divided into two regions, an overlay area and a
resident area.
- Core
Figure 2.3. Overlay System
When a new overlay is called for it is loaded into the
overlay section of core from disc and completely destroys
the previous contents of that area. Overlays can communicate
- 20 -
with each other by leaving data in COMMON blocks of the
resident section of core, which remains there the whole
time the overlay system is running. Care must be taken
as to which system subroutines are to be resident and
which need not be. Obviously the overlay handler must
be resident.
An existing overlay system, developed at Imperial College
(2) was modified by the author and then used in the author's
system. An execution stack enables the programmer to specify
which overlays are to be used next. Figures 2.4a, b and c
show an illustrative overlay system and how it is programmed.
Fig. 2.4d shows what happens when it is run.
c 'PROGRAM TMAIN
c TESTS OVERLAY SYSTEM
c THIS PART IS RESIDENT
INTEGER ANSWER
COMMON /SUBOV /ISUB
COMMON /BUFFER /BUFF
CALL OVINIT
BUFF = 2.0
WRITE (6, 1000) BUFF
CALL OVLINK (1)
10 ISUB = 1
CALL OVLINK (4)
WRITE (6, 1000) BUFF
11 WRITE (6, 1001)
- 21 -
READ (6,1002) ANSWER
IF (ANSWER) 11,11,10
1000 FORMAT (1 X, ' MAIN ROUTINE, BUFF = ', F8.6)
1001 FORMAT (1 X, ' TYPE A 1 TO CONTINUE')
1002 FORMAT (I1)
END
Fig 2.4a
C
C
C OVERLAY NUMBER 1
C
COMMON/SUBOV/ISUB
COMMON/BUFFER/BUFF
BUFF = 3.14159
WRITE (6,1000) BUFF
CALL STACK (4, 2)
CALL OVRETN
1000 FORMAT (1 X, ' OVERLAY TOV1, BUFF = F8.6)
END
Fig 2.4b
C
C _PROGRAM TOV4.BUILT AS OVERLAY NUMBER 4
C
COMMON/BUFFER/BUFF
COMMON/SUBOV/ISUB
INTEGER ANSWER
GO TO (100,200) ISUB
100 WRITE (6,1000)
CALL OVRETN
C
C
C
200 WRITE (6,1002) BUFF
- 22 -
CALL OVRETN
1000 FORMAT (1 X, ' OVERLAY TOV4')
1002 FORMAT (1 X, ' OVERLAY TOV4, BUFF = F 8.6) END
Fig. 2.4c
•
MAIN ROUTINE, BUFF = 2.000000 OVERLAY TOV1, BUFF = 3.141590 OVERLAY TOV4, BUFF = 3.141590 OVERLAY TOV4
MAIN ROUTINE, BUFF = 3.141590 TYPE A 1 TO CONTINUE
1 OVERLAY TOV4
MAIN ROUTINE, BUFF = 3.141590
TYPE A 1 TO CONTINUE
•
Fig. 2.4d C
Subroutines OVINT, OVLINK and STACK are part of the overlay
handler, together with OVRETN. Subroutine OVLINK links to
the specified overlay by bringing it into core, destroying
the previous overlay. Subroutine stack will push the specified
overlay onto the execution stack, together with the specified
entry point. Subroutine OVRETN is used to exit from an overlay.
OVRETN will either load the next overlay on the execution stack
into core, or it will exit back to the main program if the
stack is empty.
Filing Systems
A disk was used to store all the program's data. The disk is
divided into a number of physical BLOCKS, each of which can store
256 words, and has its own ABSOLUTE BLOCK ADDRESS. For the purposes of this thesis a BLOCK will mean one physical unit of
storage space, a FILE all the data between end of file marks,
and a RECORD a set of data items which we always expect to find
- 23 -
together and which are always processed together. A file in-
variably occupies several blocks on the disk, and the way in
which these blocks are arranged on the disk depends on whether
the file is a LINKED or a CONTIGUOUS file.
In a contiguous file CFig. 2.5a) a fixed area of disk is res-
erved for the file, by the programmer, and each block is written
into this area, one next to the last, until the area is com-
pletely filled. When this'happens a fatal error occurs and the
program aborts. A linked file (Fig. 2.5b) takes blocks from the
disk as and when it needs them, and uses a pointer to move on
to the next block.
1st 2nd 3rd - , 4th
(a) Contiguous
1st
L 2nd '3rd
(b) Linked
Fig. 2.5: File Types
If one wants, say, the fifth block in a file, and we know the
starting point of the file, provided the file is contiguous
we can calculate the absolute block address and jump straight
to the required block. This is called a RANDOM ACCESS system.
If however the file is a linked file one must go to the begin-
ning of the file and read each block in turn until we get to
the fifth. This is called a SEQUENTIAL file. These remarks
apply to the computer system used by the author, and different
arrangements of blocks in a file are possible.
The Madcap system is provided with three types of files, each
having different accessibilities. Twelve scratch files are
used for temporary storage, intended for program use only. A
-24 -
semi permanent library with a capacity for 128 files can be
addressed from the menu, and is for the user to store half
finished drawings and macros and similar items for quick
_retrieval and use at a later time. A permanent archive
type store is provided by a library system which can store a
large number of files. Each file is given a unique 11 digit
reference number by which the file is known and can be accessed.
This number is given by the user and is kept in the library direc-
tory (see Chapter 4). All the files used in the Medcap system
data stores are contiguous. The drawing in the back pocket
required about 20 blocks of data, and with a 4000 block library
file about 200 drawings can'be stored on one disk of the type
used by the author.
The 128 files which comprise the semi permanent store are stored
in one large contiguous area on the disk, called a mass storage,
or MS file for short. An overlay OVFIL was written by the author
to manage this storage area and to allocate blocks as and when
they are required. OVFIL uses a directory and bitmap technique
to split up the available storage space into a predetermined
number of slots, in this case 128. The bitmap contains one bit
for every block of storage space. If the bit is set to one, then
that block is being used to store information and should not be
over written. Correspondingly if the bit is zero then the block
is free for any future use. The index or directory contains two
entries for every slot in the MS file. The first entry gives
the starting block number of the slot and the second entry gives
the finish block of the slot. Fig. 2.6(a), (b) and (c) show a
13 block MS file set up with five slots.
0 1 2 3 4 5 6 7 8 9 10 11 12
N.".\, `./ V v., , 1'
,...1,). 4 .SsZ
1,,,,,,07/1////1/1//// / / / /////////./////////;
/ I I/
//// ii, / 5, . ,,, / .4
// mi.,
/////// ,/////,,,,ii///////////,/
I li / //(////////, // -I/ I/ / / ,I / I / ,/,', i
I, //
//f1////,
/////17777////.
II /11%1/
•///i.- /.,, ,A . ; /
///_.1_,_,
I 1 1 I 1 1 1 1 0 1 1 L 1 1 I 0 Li I 1 ., L. i
(a) Blocks on Disk and (b) Bitmap
(a)
(b)
2 3
0 0
. 5 7
8 8
10 12
1
2
3
4
5
(c) Directory or Index
Fig. 2.6 Filing System
- )25 -
Start End
Slot 2 in Fig. 2.6 is empty, as indicated by start and finish
blocks of zero. There are 100 file squares provided on the menu
and each file square corresponds to one slot in the MS file.
When the'user gives the command 'DISPLAY FILE' and then digitizes
which file square to display,OVFIL will then go to the directory
and look up the corresponding start and finish blocks of that
slot. If these addresses are zero a message 'FILE IS EMPTY'
will be displayed, otherwise all the data between the start and
end blocks will be read and displayed on the screen. When the
user deletes a file square the directory entry is set to zero
and the corresponding bits in the bitmap set to zero. When it
is required to store, say, 5 blocks of data in, say, slot 3,
OVFIL will look for a free contiguous space within the MS file
of 5 blocks in length and use these to store the data in. The
bitmap and directory are updated accordingly. If a large
enough free space cannot be found, OVFIL will try packing all
the slots to one end of the MS file, eliminating any gaps
between the slots. If this still does not yield enough free
contiguous space an error message 'NOT ENOUGH ROOM ON DISC' is
displayed.
Access Methods
When data records are written into the file it must be decided
how many records to put in each block, which depends on the size
of each record. If every record is fixed in length, and a
contiguous file is used, then a random access structure
- 26.
exists. If the records are not the same length, we must use
a sequential access structure and all the file processing must
begin at the start of each file. It would be possible, of
course, to write only one record per block and thus achieve
a variable record length random access structure. However,
its use was not encouraged since it is wasteful of disk
-space which is at a pTemium in a low cost minicomputer
installation. The distinction between random access and
sequential structures is an important one; random access
files must be contiguous, sequential files may or may not
be contiguous.
The GETREC and PUTREC subroutine philosophy was used to
structure the programs and define the data structure. Figure
2.7 shows the method. Subroutine GETREC is used to get the
5th record from file 1 into the array REC. The subroutine
automatically increments the record counter, hence the statement
IREC = IREC - 1. After swopping the first and second numbers
of the record, routine PUTREC is called to replace the updated
record back in the file.
DIMENSION REC (10)
IFILE = 1
IREC = 5
CALL GETREC (IFILE, IREC, REC)
IREC = IREC - 1
TEMP = REC(l)
REC(l) = REC(2)
REC(2) = TEMP
CALL PUTREC (IFILE, IREC, REC)
Figure 2.7: GETREC and PUTREC Routines
In the PDP 11 computer one Fortran variable requires two
words of storage space, so with 256 words per block we can
- 27-
get 128 Fortran variables into one block. Thus with 10
variables per record we can have 12 records per block with
8 spare at the end. Figure 2.8 gives an example of an
elementary subroutine coding. Routine GETADD converts the
record number into block number and position within block.
RAREAD is an assembler routine which fetches block NBLOCK
from file IFILE into BUFFER and then increments NBLOCK.
Note that Figure 2.8 results in one disk access every time
the routine is called, two in the case of the PUTREC routine.
A more sophisticated version would only write the buffers to
disk when necessary, ie at the end of file, or buffer full;
and similarly would only read a block down when the correct
block is not already in the buffer. This would reduce the
disk accesses to a minimum, at the expense of some extra
housekeeping. In a minicomputer with a relatively slow disk
this is likely to prove a saving. However, bearing in mind
that situations occur when one wishes to edit a file that is
still having data added to it, and the fact that programs,
buffers included, are continually being overlayed, it is not
surprising to find that it is very easy to lose the odd
buffer, so corrupting the file. Also due to core limitations
it was found necessary to share the same buffer space between
several files.
SUBROUTINE GETREC (IFILE, IREC, REC)
DIMENSION BUFFER (128), REC(10)
CALL GETADD (IREC, NBLOCK, IDP, 12)
CALL RAREAD (IFILE, NBLOCK, BUFFER)
DO 100 I = 1, 10
100 REC(I) = BUFFER(I (IDP - 1) * 10) I3ZC= IREC + 1
RETURN
END
a) GETREC
- 28 -
SUBROUTINE PUTREC (IFILE, IREC, REC)
DIMENSION BUFFER (128), REC(10)
CALL GETADD (IREC, NBLOCK, IDP, 12)
CALL RAREAD (IFILE, NBLOCK, BUFFER)
N BLOCK = NBLOCK - 1
DO 100 I = 1, 10
100 BUFFER (I t (IDP - 1) * 10) = REC (I)
CALL RAWRIT (IFILE, NBLOCK, BUFFER)
IREC = IREC + 1
RETURN
END
b) PUTREC
Figure 2.8: Elementary GETREC and PUTREC Routines
The best solution was thought to be to use double buffering,
one input buffer and one output buffer, both resident, and a
FILE STATUS FLAG, to indicate five possible file states:
1. File all on disk, closed,
2. Input buffer needs saving,
3. Output buffer needs saving, 4. File opened for reading,
5. File is empty.
All file flags were made resident. Figure 2.9 gives flow
charts for writing GETREC and PUTREC routines. Note diet PUTREC has to recognise when the end of data is being written
to the file. This will rarely be at the end of the contiguous
area available to the file.
Some of the advantages of using this sort of program structure
are:
1. It makes the program automatically modular and structured.
2. It involves less effort to code and debug new programs
using existing data structures.
3. It makes the main routine independent of storage devices
and, to a certain extent, access methods.
- 29 -
4. It forces the programmer to consider what type of data
structure and access method is best for the particular
problem under consideration.
5. It makes it very easy to change buffer sizes without
altering the main program.
'GETREC and PUTREC routines always go in pairs, and are written
in pairs. Considerations to bear in mind when writing.them
are:
1. Double or single buffering?
2. Resident or non-resident buffers?
3.' Number of records per block, and packing method.
4. Sequential or random access.
File Open For Reading
File Empty
2
- 30 -
File Empty
Set Data
To EOD
Compute Block
Number
N
Correct Block in
Core 2
Y
Output Buffer Need
Saving 2
N
Read Correct Block
Putrec Temporary
EOD
Write to
Disk
1--
Read Data from Buffer
f
Update file Status
Figure 2.9(a). GETREC Routine
Write to Disk
Output Buffer Nee Saving 7
N Y
Read Correct Block
Write Data to Buffer
Input Buffer Need Saving
7
N
Write to
Disk
Compute Block Number
File Using Input
Buffer 7
Y
orrec, Block in
Core 7
31 -
Set Status to
Closed
Save Number
of Blocks in File
Write Buffer to Disk
V
Set Status to save Input Buffer
Increment Record
Counter
( EXIT
Figure 2.9(b). PUTREC Routine
- 32 -
Chapter 3
ENGINEERING DRAWINGS
Introduction
When trying to design an interactive computer system to produce
engineering drawings the first difficulty encountered is the
large variety of drawing types and styles in existence. Even
a. cursory glance at a few drawings picked up at random will
show that they have very little in common. The kind of drawings
used in Civil Engineering to describe, say a building, are com-
posed largely of very simple geometrical constructions, mostly
orthogonal straight lines arranged in rectangles or squares
and this proves to be a great help in describing such pictures
to a computer system. Mechanical Engineering drawings, on the
other hand are composed largely of curves and straight lines.
Almost invariably sharp corners of an engineering component are
rounded off with a fillet, and drawing fillets and lines tan-
gential to circles is basic to mechanical engineering drawing.
Table 3.1 gives some statistics on some engineering drawings
chosen at random, indicating the number of straight lines, circles,
fillets, alphanumeric characters included as comments on the
drawing and dimension symbols. Dimension symbols are described
later on in this Chapter. These drawings were all of simple
components and an assembly drawing of say a motor car gear box
would be considerably larger. Just about the only common elements
are straight lines, circles and alphanumerics. Accordingly it
was felt that a system with a very flexible and versatile input
format would be required. Further more, the system should be
able to process straight lines, circles and alphanumerics as
geometrical elements and more complex shapes would be built up
from those. One other• property frequently encountered in en-
gineering drawings is symmetry about an axis, indicating that
powerful mirroring facilities would prove useful. Also the
power of the computer can be exploited by incorporating macro
facilities, so that often used constructions need only be
drawn once, and then repeated as many times as required.
- 33 -
Drawing No. 1 2 3 4 5 6 7 8
Dimension Symbols 44 14 31 139 41 42 81 12
Alphanumerics 385 . 58 77 80 36 110 103 450
Circles 10 9 6 0 20 15 11 0
Fillets 20 13 0 48 4 16 6 11
Straight Lines 141 16 17 62 57 62 324 250
Table 3.1 .Statistics on some typical engineering Drawings
Straight Lines
Building on the ideas of Chapter 2, graphical_ input and
output a program can be written to read the table x,y coord-
inates whenever, say button 1 on the bug is pressed, store
the coordinates in the data, and draw a vector on the screen.
An additional command is needed to break the line that has
just been drawn and allow a fresh line to be started. It is
necessary to store the fact that a new line is being started,
or whether an old line is being continued, as indicated by a
LINE BROKEN flag. Thus the data could be stored as I ,X,Y r,e(=Is where
- 34 -
I = 1 means start of new line
I = 2 means point on existing line
X, Y coordinates
Using such a programme can only draw lines 'free hand'
and it is soon evident that the squareness of such lines
is not acceptable. It becomes desirable to apply a cursor
control and correct the digitised table coordinates, so
that lines drawn approximately horizontally are made exactly
horizontal, and lines drawn approximately vertically are
made exactly vertical (Figure 3.1).
Point Data Point
Digitized \
•\
\ Trailing Origin
Figure 3.1: Cursor Control
To accomplish this we need to store the last point digitized
as the TRAILING ORIGIN. One further step is to type in the
cursor, or control angle from the teletype, so that one
could draw accurate straight lines at any angle. Figure
3.2 shows a flow chart for the program, and Figure 3.3. the
type of shapes which could be constructed using it.
Find Routines:
The program of Figure 3.2 is unable to cope with the situation
where we want two lines to meet exactly, at a corner, say. It
becomes virtually impossible to place the cursor exactly on
Make X Coords Equal
Make Y Coords Equal
Obey Command
Rotate X,Y
Through Cursor Angle
35
Figure 3.2
• Figure 3.3
Calculated Data
7". Digitized Point
Calculated Point
Digitized Point
-36 -
the end of an existing line by eye. To solve this problem
a command instructing the computer to find the coordinates
of the nearest point in the data, and to use those rather
than the digitised values, is necessary. An ambiguity arises
when we wish to sit the cursor on a line (Figure 3.4). We
need to know in which direction to move the digitsed point
on to the found line. If the digitised point is the start
of a new line, i.e. line broken, we move the digitised point
perpendicularly on to the found line, otherwise we use the
trailing origin and calculate the intersection of the two
lines.
Existing Line
Trailing Origin
Figure 3.4: Find Strategy
Figure 3.5 shows a program for doing this. Two points should
be noted, firstly that this program is executed after the
digitised points have gone through the cursor control program,
so that all the-lines will still be at the correct angle,
and secondly the algorithm entails calculating the distance
from every line in the data to the digitise point. This
could be a slow process
Data Forms:
At this stage it is worth examining the data forms used to
define lines and points. APT(5) uses a vector notation in
which lines are stored as their unit vectors plus the
START
--t_ Save
Digitized Point
Y
Take Next Line
Calculate Distance Point To
Line
Move Point At Right Angles
Store Computed Values
- 37 -
N
Nearest ine so Far
Save Address Of Line
Figure 3.5. A FIND Algorithm
N N N■ Second Line ■
. \\N
Data Line
•
- 38
perpendicular distance from the origin to the line. In this
case we are only concerned with 2-D geometry and it seems
simpler to define a line by the coordinates of the start
and end points. The algorithm of Figure 3.5 has one serious
weakness, in that it must distinguish between the section of
a line which is displayed and its mathematical projection
(Figure 3.6). It is quite simple to check that the digitised
point is between the start and end of a given line if we
store the line as X, Y start and X, Y end.
1
Required Point
Figure 3'.6
Mirroring:
Several features in an engineering drawing, especially items
like shafts, have an axial symmetry, and a mirroring command
would be very useful. However, there are 'several lines which
we do not want to mirror, and in general the mirroring axis
can be anywhere (Figure 3.7).
Figure 3.7: Selective Mirroring
- 39-
Therefore the mirroring command must be selective, and we
need some criterion to select which lines to mirror and
which to ignore. Only the heavy black lines in Figure
3.7 should be processed by the mirroring program. One
way to arrange this is for the user to set a window around
the area containing thoselines which need to be mirrored.
Then the mirroring program can easily check whether each
point in the data is on or off the screen. If the point
is on the screen, it is mirrored, and if off the screen,
it is ignored. As a preliminary the user has to specify
the axis about which mirroring is to occur, and it was
decided to restrict this to lines already existing in the
data. Also the window has to be set. In this case, the
window is used to demarcate one area of the table rather
than to change the scale of the display.
Line Types, Levels and Labels:
Four different line types were implemented, and four possible
pens allowed for. Levels is a concept inherited from previous
software(2); it enables the user to input data into different
levels of the same file, and these can be displayed separately
or together, under user control. At one time 'it was thought
desirable to give each data record a unique reference number
or label, and this was incorporated in the data structure.
Two different methods of storing line types, pen numbers and
levels are possible (Figure 3.8). Ond is to pack the infor-
mation into each I code (Figure 3.8a), the other is to store
line type and pen number etc. only when they are changed
(Figure 3.8b).
4e1 do
LABEL
-Fig. 3.8(a)
Line Type Y
Label
Label I
Pen Change
X Y
Label
Y Pen
- 140. -
Line Change
Label I
Fig. 3.8(b)
Bounding Rectangles:
Almost all the commands given to the system involved either
a FIND, or a window, both of which imply searching through
the data. With a fair sized file, this proves to be very slow,
and some means of structuring the data to help the display
and the FIND routines becomes essential. One obvious way to
help the display is to test if a particular block of data is
on or off the screen. Since the user will often be using
a window, a considerable part of the data will, in fact, not
be visible and a lot of time would be saved by not processing
it. With current packing methods only 120 variables are
placed in each block, leaving 8 spare at the end. These can
be used to store the maximum and minimum X,Y coordinates,
or bounding rectangle, of the data in the block. This can
be tested against the current window parameters and the block
discarded or processed.
Two objections to discarding blocks in this manner are then
discovered. With the data structure of Figure 3.8(b) it is
impossible to mirror different line types, as we may well
skip the change of line type marker, because the block
containing it is not currently on the screen. This can be
overcome by using the data structure of Firgure 3.8(a). Also
- 41-
using Figure 3.8(a) rather than Figure 3.8(b) means that it
is easy to change line types and levels after the data has
been stored. The second objection is that we may skip
past the end of the data marker. The solution is to use
another variable at the end of the block as an end of
data flag, so that we may tell if the block contains the
end of the data or not, and if it does, then process it
regardless of whether it contains data on the screen or
not.
A third, and far more serious complication introduced by
discarding blocks arises when a symbol, comprising of
several records lies half in the end of one block and
half in the beginning of the next block, Figure 3.9.
If the first block is off
the screen, then half of the
Block n symbol data will be lost.
This can be avoided by en-
suring that the bounding rect- Symbol angles.of each block overlap,
- so that if either of the blocks
are on the screen, both are Block n+1 processed. Tests carried out
on the drawing in the appendix Figure 3.9 showed that more than half the
blocks were skipped during every FIND or WINDOW, so dis-
carding blocks probably is worth the extra complication
involved in the programming.
Cross Hatching:
Suppose we have a fixed area (Figure 3.10a) and we know
that the lines form a closed boundary. If then the user
types in the required spacing and angle of the cross hat-
ching lines, it is possible to write a program to cross
hatch the area, as in Figure 3.10b without too much diffi-
culty.
However, if we try to use that method.on a practical problem,
- 42 -
(a) Before (b) After
Figure 3.10: Cross hatching on enclosed area
Figure 3.11a: Practical Shape for Hatching
I I_ 1--; I -1
Figure 3.11b: Splitting the lines up
Figure 3.11c: Forming Enclosed Areas
Figure 3.11d: Picking out areas to be hatched
" 44 "
such as Fig. 3.11a, there are several enclosed areas in
the drawing, some of which are hatched and some of which are
not. Also each of the lines in the data has been drawn in a
more or less random order, and some considerable processing is
required to split this information up into lines with no junc-
tions (Fig. 3.11b), then into enclosed areas (Fig. 3.11c) and
finally to pick out the areas to be hatched (Fig. 3.11d).
Chapter 5 describes an overlay BOUND which was written to pick
out closed boundaries, however this program is not particularly
fast and was designed to treat as errors any lines, such as
centre lines, which do not belong to a particular area.
As an alternative the hatching algorithm might require the user
to digitize each hatching line individually. The computer
would space out the lines, ensure that they are all parallel,
and calculate the exact length of each line. Fig. 3.12a illus-
trates this. The cursor is controlled to move only along
the thin black lines, and the crosses represent the digitized
points. The user uses his pattern recognition abilities to
indicate the approximate start and end points of each line and
the computer spaces out the lines and ensures that they are
all parallel.
A third method of writing the program might be to have the user
specify which area he wants to hatch by pointing to all the lines
that go to make up the boundary, Fig. 3.12(b). In practice this
requires almost as much digitizing as asking the user to digitize
the start and end points of every line especially when several
small areas are hatched with widely spaced lines. The division
of labour between the program and the user is by no means a
foregone conclusion - it is beneficial to decide which items
of information must be inputted as data, and which items can be
left for the program to calculate. In the author's system the
hatching program was written so that the user had to digitize
the start and end of each line. It was thought that this gave
the most reliable algorithm, since it could cope with any shape
that required hatching and was straightforward to write.
- 45 -
Fig. 3.12 (a) Digitizing every line
Fig. 3.32 (b) Indicating the closed area
- 46 -
Symbols
Symbols can be defined as graphical items constructed from
-several lines and/or circles. Generally they need more than one
data point to define them, e.g. an arc could be defined by the
coordinates of the start, centre and end points. Symbols are
constructed by separate overlays, and are reconstructed every
time they are displayed: TO save display time it is desirable
that only symbols within the current window are processed, hence
each symbol has a bounding rectangle included in its data, and
the display program first checks that this is in fact on the
screen before constructing and displaying the symbol. In the
author's system this requires a separate overlay call. Each
symbol overlay has three main entry points, one to define, con-
struct and add a new symbol to the data, one to mirror existing
symbols and add them to the data, and one entry point to con-
struct and display them only. Figure 3.13 shows a flow chart
for a general symbol.
Tapped Holes
Two symbols are available to draw tapped holes, one in ele-
vation and one in plan view, Figures 3.14 and 3.15. In the plan
view the user indicates the centre of the hole and types in the
diameter or radius. The program will then construct the complete
inner circle and the outer arc automatically to conventional
drawing practice (12). The line type is specified in a differ-
ent program, so the symbol can be constructed in any line type,
solid, chain dotted or dotted. For the elevation symbol the user
digitizes two points and types in the diameter. The program
then calculates the coordinates of the other lines and inserts
them in the data. So rather than the user having to construct
8 lines, only two points are required as input data.
Fig. 3.11! Plan
Fig. 3.15 Elevation
- 147 -
Endmill Shapes
One other symbol implemented by the author is a slot shape,
as generated by an endmill cutter travelling over either a
curved or straight path, Fig. 3.16. To generate that shape
all the user has to do is to digitize the two points A and
B and type in the radius R. The program will ensure that the
lines and semicircles are tangential and join up with
mathematical precision, rather than having to rely on digitizing
the points by eye.
Several othershapes which are often used can be written as
symbols. For instance the shape and proportions of nut and
bolt heads are given in BS standards and can be programmed
quite easily. It means that the user has to do much less
work, and the repeatability and
accuracy of the computer means
that a high degree of standard-
ization and uniformity between
drawings is ensured.
Fig. 3.16 Endmill Shape
Constructing Symbols
To place, say a tapped hole on a drawing, one point and a
diameter must be supplied to the program. The two coordinates
may be either a raw digitized point, or calculated from the
intersection of two lines, or the intersection of a line
and a circle. How the data is defined does not matter to
the symbol overlay. To program this easily the symbol
overlays use the overlay stacking facility (2) to link
to the digitizing overlay. The digitizing overlay then gives
the user a choice of either digitizing a raw point, going
to the construction overlay or windowing. This can imply
four levels of overlay stacking, Fig. 3.17.
Set Messages
and Flags
Clear Messages
Y
Store Data in Common
( Data in Common Qiirror Ent7)
Store Symbol in Data
File
Construct Symbol from Coniuon Data
o :: ( Display Entry
Display Symbol
Menu Entry
Figure 3.13
Data in Common
- 4 8 -
Symbol Overlay
Set Flag
Stack Symbol
Construct Shape
Clear] Flag
C EXIT
Window Overlay
P.
0 w
0
co
co
Uripp
-e4.s
ke
-Dian
o JO
Digitizing Overlay
START
Find Point
Find Overlay
Stack Find Overlay
<3
Window + Display
Window + Display
Store Point
Point Digitize
?
N
Stack Digitizing Overlay Y
Stack Digitizing Overlay Y
- 5'0—
Constructing an Engineering Drawing
The Medcap System was designed partly to enable a designer or
draftsman to produce engineering drawings easily and quickly.
The following paragraphs show how the menu commands can be used
to achieve this.
To construct, say, Fig. 3.18, using the Medcap system the
following steps may be .used. First the centre lines would be
digitized, quite arbitrarily.
C
X D
. Fig. 3.18 Drawing to be constructed
So choosing line type 4, chain dotted, from the menu, point- A
can be digitized, then pressing button 6 will enter control
900 mode and the cursor can be moved over to point B and that
point digitized. The cursor control program will ensure that
the line A-B is perfectly horizontal. Next button 2 is pressed
to break the line and button 6 is pressed to exit from the con-
trol mode and enable the cursor to be moved freely to point C,
- 51 -
which is then digitized. Coni:rol 90 mode is then entered and
point D digitized. -Breaking the line by pressing button 2 is
the next step, then moving the cursor to point E and using the
FIND program, button 7, to calculate the intersection of lines
AB and CD enables the line EF to be accurately digitized.
Line EF' can be constructed by using the mirroring program with
CD as the axis of the mirror. Line type 1, solid lines, are
elected next and the Symbol 'CIRCLE-TYPED RADIUS' used to
draw two circles. This symbol expects the centre of the circle
to be digitized and then asks the user to type in the radius.
The FIND program is used to indicate that point E should be taken
as the centre, and the value of 43.5 typed. Next the second
circle is drawn by again FINDING point E as the centre and typing
27.0 for the radius. Changing to dotted line type and using the
same symbol again will generate the middle circle. Chain dotted
lines and the SCE arc symbol (Start, Centre and End) can be
employed to construct the centre line for the curved endmill
shape. A symbol is available to draw all four arcs in one go.
The symbol requires three points representing the start, centre
and end of the curved shape to be digitized and then asks the
user to type in a radius representing the endmill cutter size.
The FIND program ensures that all the circles are perfectly
concentric, rather than relying on the user to do this by eye.
Button 5 is programmed to find circles, and line-circle inter-
section. This can be used to place the endmill shape at the
intersection of the line EF and the chain dotted arc.
To draw the second elevation the cursor is moved to the point S
and set on the line AB by means of the FIND program, button 7.
Drive mode can then be used to move the cursor up 43 mm. and
then along to the right 44 mm.,finally down to the line AB
by using the 90° control mode and sitting the cursor on the
line. Fig. 3.19 shows the Drive mode patch on the menu.
Digitizing point A will move the cursor 10 mm. to the left and
1 mm. up from its old position, and digitizing poinL B will
move the cursor 100 mm. to the left and 1 mm. up. Digitizing
the 'ENTER' square enters the new position of the cursor in the
data.
- 52 -
103
102
10
B A 1
-103 -102 -10 -1 NTER 1 10 102 103
-1
-10
-102
103.
figure 3.19 Drive Mode Patch
The lines HI, IJ and KL, Fig. 3.18, are digitized by the
control 90 and FIND facilities. Next the top hall- of the
elevation can be mirrored about the line AB to produce the
bottom half in a symmetrical picture. As well as ensuring
that the elevation is symmetrical about the centre line the
mirroring feature means that only half the elevation need be
digitized.
A fillet program was written to draw the small radii in the
corners of Fig. 3.18. The idea is that the user can indicate
which two lines to draw the fillet between, the approximate
centre of the fillet and type in the radius of the fillet.
The program will then construct and enter in the data the cir-
cular arc. Four different fillets are provided, depending on
whether the user wants to truncate the original lines or not.
Fig. 3.20(a) shows the original lines, 3.20(b) the first line
truncated, 3.20(c) the second line truncated, 3.20(d) both
lines truncated and 3.,20(e) neither of.the lines truncated.
Point 1 is used to locate the first line, point 2 to give the
approximate centre of the fillet and choose the correct arc out
of the four possibilities, Fig. 3.20(f), and point 3 is used
- 53 -
to indicate the second line to be truncated. The truncations
can be done automatically by the program, as is all the co-
ordinate geometry calculation necessary, all the user has to
do is to indicate which lines are to be used, by digitizing
the three points labelled 1, 2 and 3 in Fig. 3.20.
2
3
(a) (b)
kl
2x
1
(e)
(f)
Fig. 3.20 Fillets
Dimension Symbols
The dimension symbols,;Fig. 3.21, as used in Fig. 3.18 are con-
structed and placed on, the drawing automatically by a specially
written symbol overlay, in the same way that tapped holes and
endmill shapes are. Three different types of dimensions are
allowed for, horizontal lines, Fig. 3.21(a), vertical lines,
Fig. 3.21(b) and skew lines, Fig.
used in Chapter 6, size and shape definitions. When the user
3.21(c). The distinction is
- 54. -
wishes to place a symbol on the drawing, firstly .point 1,
Fig. 3.21(a) is indicated, then point 2. Point 3 is used to
place the arrow heads in a convenient place. Finally the numbers
are typed in on the keyboard. The program will then construct
the three lines, the arrow heads and position the alphanumerics
suitably between the arrow heads.
(a) horizontal
(b) vertical
(c) skew
Fig. 3.21 Three types of dimension symbols
File Squares
There are 100 file squares on the menu provided for the user
to store data in. As the drawing is being built up it is stored
in a random access file called the workspace and menu squares
labelled 'FILE TO WORKSPACE' and 'WORKSPACE TO FILE' are provided
- 55 -
for the user to access the file squares. Digitizing 'WORKSPACE
to file' and then any one of the 100 file squares will transfer
the workspace, i.e. the drawing so far, to the indicated file
square, overwriting the previous contents of that square. The
opposite command, 'FILE TO WORKSPACE' takes the contents of the
digitized file square and adds it to the workspace. This makes
it a very simple and quick operation to merge two drawings to-
gether. An often used'drawing, such as a standard title block
or heading can be created once only and very quickly added to
any drawing that requires it. A command 'CLEAR WORKSPACE' will
erase the drawing from the workspace and enable a fresh start
to be made. As a complex drawing is built up the user may wish
to change the last parts drawn, and editing programs are
provided for doing this. However an alternative procedure exists
for removing the last part of a drawing. If the user is satis-
fied with the drawing at one particular stage he can save it in
one of the file squares by digitizing a 'WORKSPACE TO FILE'
command. Any subsequent additions to the workspace can be
removed by a 'CLEAR WORKSPACE' and a 'FILE TO WORKSAPCE' to bring
back the original drawing. This is often much quicker and more
convenient than using the editor program to remove individual
lines.
Macros
A macro facility exists which enables the user to select a par-
ticular file and to place it in the workspace so that it occupies
a particular place on the drawing. The command 'FILE TO WORK-
SPACE' does a straight copy of the drawing into the workspace,
whereas the macro program can be arranged to perform a translation
and a rotation and a scaling, or only one of those operations
on the file square before it is added to the workspace.
Further Work and Additions
The digitized drawing in the back cover is not quite complete,
and the drafting system would benefit from a little more
development and some more constructional techniques. For ex-
ample the four scroll recesses shown as A-A in Fig. 3.2'i are
meant to be identical. One of the recesses was digitized by
- 56 -
using the '3 POINT ARC MODE' and the find circle facility,
button 5 and looks quite acceptable. However it was found
difficult and inconvenient to digitize all four by eye so that
they looked identical. A useful feature would be a program which
enabled the user to draw a box around any part of the picture
and to extract all the lines inside that box and use them as
a separate macro. Thus once one of the scroll recesses has
been digitized, then it could be rotated about the centre point
by 90° and placed in the new position. This would ensure that
all four recesses are identical.
I
Fig. 3.22 Scroll Recesses
- 57 -
Line and Symbol Editors
Some powerful editing programs have been incorporated in the
system, for both line and symbol editing. The line editor
asks the user to digitize a point close to the line to be
edited, then the editor searches for the nearest line and
continously refreshes the line on the display, whilst asking
the user what is to be done with the line. Continually
refreshing the line has the effect of highlighting the line
under consideration, so that it becomes quite obvious which
line is under consideration. The options provided by the
editor include changing the line type, from say solid to chain
dotted, changing the pen number, changing the level of the
line, deleting the line, moving on to the next line or exiting.
The symbol overlay performs the same functions on symbols,
except that in this case rather than refreshing the complete
symbol the bounding rectangle is continually displayed.
Other Geometrical Constructions
Other geometrical constructions available include the ability
to draw parallel lines, draw a line tangential to a circle
and set the cursor to a given angle such as 30 or 45° to the
horizontal. Alphanumerics can be easily inputted by
digitizing a line to determine the starting point and the
angle of inclination, then typing in the characters on the
keyboard. The height of the alphanumerics is also easily
changed. When using an existing drawing as a starting point
this can be fixed on to the digitizer and the bug used to
trace out the existing centre lines as a starting point. To
ensure that the axes are aligned with any other drawings
on the disk a skew control is available, whereby all the
digitized coordinates are operated on by a rotation matrix
before being stored. This means that centre lines of
drawings placed on the digitizer need not necessari]y line
up with the digitizer,Axes.
Chapter 4
DESIGN RETRIEVAL
One problem particularly relevant to established engineering
firms is that of accessing and retrieving relevant design
data. After a considerable amount of design experience has
been built up, the shear physical volume presents a deterrent
to design retrieval, unless an efficient filing system is
employed. Suppose that a designer wishes to design a new
component, and he knows that something similar has been done
previously, but does not know exactly where to find it.
Using an appropriate coding system he might code the proposed
design and arrive at a code number such as 100406, say. This
would imply that the component was similar to another having
a code of 100380, but very different from a component with a
code of 900380. Retrieving data classified under such a coding
system represents a fairly easy programming task for a computer.
A lot of knowledge and experience has been gained with such
programs and they represent something at which the computer
is very good(7)
Library System:
Part of the disk- storage space was used as a library for a
limited volume data base. Each file in the data base is
described by an eleven-digit code number, typed in by the
user, and an internal file number. Two techniques were used
to give a reasonably fast retrieval time, one was a binary
search, and the other was to split the code number, or key
into three different 'levels'. '
Binary Search:
When we have a list of numbers in numeriert; order, dnd we wish
to search it to see if a given numbel., KM, is present in the
- 59 -
list, first we compare KEY1 with the number in the middle of
the list. If KEY1 is greater than this entry, then we can
discard the upper half of the table and split the lower half
into two, and so on until we either find a matching entry, or
the search area becomes zero.
Key = 500
Top 10
Middle 400 Top 400 Top 400
Middle 505
Middle 600 Bottom 600
--------- ---------- Bottom 905 Bottom 905
Figure 4.1 Binary Search
Levels:
Supposing the list of code numbers is as in Figure 4.2. If this
becomes very long it is advantageous to split it up into three
separate levels and search each independently, as in Figure
4.3a and b. This means that the lists are not in strict
numerical order, but only in order over a restricted range.
To facilitate searching the first entry in the lists always
contains the total number of entries in that list.
- 60 -
100 400
100410
100420
100520
100521
200600 '
200 700
900700
900700
900710
900800
Figure 4.2: List of Code Numbers
KEY1 KEY2 KEY3 FILE NUMBER
10 04 00 1
10 04 10 2
10 04 20 3
10 05 20 4
10 05 21 5
20 06 00 6
20 07 00 7
90 07 00 8
90 07 10 9
90 08 00 10
Figure 4.3a: Initial Splitting into Levels
•
- 61 -
KEY1 START KEY2
END KEY2 KEY2 START
KEY3, END KEY3 KEY3 FILE NUMBER
3 - 6 - - 10
10 1 2 04 1 3 00 1
20 3 4 05 4 5 10 2
90 5 6 06 6 6 20 3
07 7 7 20 4
07 8 9 21 5
08 10 10 00 6
00 7
00 8
10 9
00 10
Figure 4.3b: Final Library Lists
Coding Systems:
The value of the above sort of library system will depend to
a large extent on the coding system employed. If a component
is wrongly coded then it is as good as lost in the data.
Before we can say that a component with a code of 100406 is
similar to a component with a code of 100380 but different
from 900380, we must have some criterion or method for grouping
like components together. This field of study is called Group
Technology(8)
How the components are coded should depend upon what use is
to be made of the retrieved data. For design purposes we
wish to classify components according to their function,
which is largely related to their external and internal shape,
material and so on. The OPITZ classification system is one
which does this(8,9).
.If we wish to classify components according to how they are
made, then a different coding system should be employed.
Figure 4.4 shows a list of measurable component parameters
which can be expected to influence the manufacture of small
- 62 -
turned components.
Diameter
Length
External turned shape
Number of external turned diameters
External turned features
Internal turned shape
Number of internal turned diameters
Internal turned features
Raw material
Raw material original form
Machine used
Number of operations
Figure 4.4: Measurable Component Parameters
The code consists of an eleven-digit number, with each digit
measuring one parameter of the component. The first, or most
significant digit, should measure the parameter having most
influence on the production process, and the eleventh, or least
significant, should measure the least important parameter.
To devise and test a suitable coding system data was gathered
on 100 quotations for components to be produced on a range of
NC lathes(10). If the coding system is accurate we would expect components with the same code number, made of the same
material on the same machine to have the same cycle time.
Figure 4.5 shows a plot of code number, expressed es a real
decimal number,against cycle time, which shows that the code
numbers are not continuous, but tend to group together quite
naturally into distinct groups or families, and that there
appears to be a large variation in cycle times within each
group. Bearing in mind that the cycle times were only estimates
and that many of the components involved more than one operation,
- sometmes on different machines, a better cycle time-code
number correlation might be obtained by considering each
- 63 -
operation separately, rather than the overall production
time. To arrive at Fig. 4.5 a program was written to read
the component parameters and give each a value between 0
and 9. The digits were then arranged in an arbitrary
order and a correlation coefficient (11) calculated between
the code number and cycle time for all 100 components. The
digits were then rearranged in approximately 6! different
ways, and the combination with the highest correlation
coefficient, Fig. 4.6 taken as the answer. The groupings
may be somewhat artificial, but Fig. 4.6 does tend to show
that the code numbers tend to come in discreet values rather
than all possible values. This may be all that is required
for group technology or a rather unsophisticated design
retrieval system, but the grouping and code numbers may have
no meaning for other purposes.
Fig. 4.7 shows a representative sample of the components studied,
and has been included to show the general nature of the
drawings under consideration. Any computer draughting
system would have to be capable of constructing the drawings
of Fig. 4.7 as a mimimum requirement.
Code
Number 4 I
Cycle Tillie
63.0 T
53.7 1
CORRELATION COEFFICIENT = 0.677 00
cD
cn
x 43. 3
33.0
22.7
12.3
X
X XA
X
2.03 lx
x
XXX Xgx XXX
X
x
xx X X
X X Xx XX XX .x
XX
2.33E10 3.55E10 4.77E10 5.99E10 7.21E10 8.43E10
425
25.c50
2 5075
75100 3
100150
150 225
225;:300 6
300.450
450600
>600
Figure 4.6
1st 2nd 3rd 4th
5th 6th •
Number of
Internal Material
Diameters
Diameter
Number
of
Operations
0 -
1 1 1
2 2
3 3
4 . 4
5 5
6 6
7 7
8 8
9 8
' Length
0 <50
1 50(100
2 100(150
3 150200
4 200(300
5 300450
6 450600
7 600.050
8 750,c1000
9 >1000
Number of
External
Diameters
0 -
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 >8
0 -
1 1
2 2
3 3
4 14
5 5
6 6
7 7
8 8
9 >8
0 -
1 Cast Iron
2 Mild Steel
3 Carbon Steel
4 Alloy Steel ..■
5 Aluminium
6 Brass
7 Magnesium
8 -
9 -
Figure 4.6
7th 8th 9th
10th 11th
External Internal Internal
External
Features Features Machine Shape Shape
0 None
1 Threads
2 Grooves
3 Recesses
4 1+2
5 1+3
6 2+3
7 1+2+3
8 -
J
0 None
1 I
Threads
2 Grooves
2 Recesses
4 1+2
5 1+3
6 2+3
7 1+2+3
8 -
9 -
0 2D Auto
1 BM 350
2 BM 75/250
3 BM 50/2
4 3A Auto
5 3M Auto
6 N°5 Senior
7 N°2 Flash Cap
8 N°8 Preopt
9 N°4 Preopt
0 Solid
1 •H
Recilinear
2 a) 82 6 U
Taper Turned
3 Contour Turned
4 0
T 8 c19 ,-.1)
Rectilinear
5 Taper Turned
6 Contour Turned
7 _
8
go 0 c.) H
g li
M 8
Rectilinear
Taper. Turned
9 Contour Turned
0
Pdc.a
tion
al
lb De
viat
ions
Rectilinear
1 Taper Turned
2 Contour Turned
3 (I) ,a o
0 ..i ri I:10 p_. .p . cr)
Rectilinear
4 Taper Turned
5 Contour Turned
6 u) ro (ll
r-I, .r1 ri4 4) cn
. Rectilinear
7 Taper Turned
8 . Contour Turned
9
0 U)
Keyway
0.875"
- 67 -
/ /
3.43"
9m311.
Figure 4.7 Representative Sample of Components Studied
5 0 0 cv
- 68 -
CNI
2
7'
N-CO
I 25j"
Figure. L1.7 Representative Sample of Components Studies
- 69 -
6 7/• u 16
.343
1.297
Co CO
Figure 4.7 Representative Sample of Components Studied
- 70 -
Chapter 5
. DESIGN. ANALYSIS. CALCULATIONS
Chapter 3 showed how the computer could be used to con-
struct shapes, consisting of lines and circles, which are
"of interest to the Mechanical Engineer. Whilst this is
useful in itself the computer can be programmed to operate
on these shapes and provide the designer with some accurate
numerical information about the shapes he is interested in.
By programming a computer in this way it is possible to
obtain information which would not normally be available
without a computer. The rest of this chapter describes
which calculation the computer has been programmed to
perform, and how the algorithms were developed.
Area Calculations
Suppose an area is defined by its bounding lines, Figure
5.1, it is not too difficult to write a program to cal-
culate the enclosed area of such a shape. Points 1 and 6
in Figure 5.1 have the same coordinates.
Each of the lines in Figure 5.1 can be' regarded as one
element of the boundary. To calculate the enclosed area
one can calculate the area underneath each element and the
y
X
' Figure 5.1: Bounded Area
X axis and apply an appropriate sign convention such that
the enclosed area is given by the sum of the contributions
- 71 -
of each element. If the points are entered in the data in a strict order, such that we move in, say, a clockwise direction from the first point to the last, Figure 5.2 shows that if xn+ 1 < xn, then the contribution of that element should be negative.
11111111111111111 (a) Positive Areas (b) Negative Areas Figure 5.2: Sign convention for Areas
Centre of Gravity
To find the centre of gravity of the shape, we can use the same technique as for the areas, i.e. consider each line as one element, calculate the centre of gravity for that element and apply a suitable sign convention. Summing the moments about the X axis of each element will give the Y coordinate of the shapes centre of gravity, and moments about the Y axis will yield the X coordinate.
3 + X23
+ X34
• X12
-+ X45
1,6
1,6
(a) Negative Contribution (b) Positive Contribution Figure 5.3: X Centre of Gravity
- 72 -
(a) Negative Contribution (b) Positive Contribution
Figure 5.4: Y Centre of Gravity
The coordinates calculated for each element are always
positive and sign convention is applied to the area, as
in Figure 5.2.
Extension to Circles
The ability to process straight lines only is a fairly
heavy restriction and an extension to include circles and
parts of circles as geometrical elements is desirable. The
only difficulty here is that the contribution that a circle
makes will change as the curve changes quadrant. Since we
require moments about X and Y axes it is necessary to res-
trict circular elements to arcs occupying no more than one
quadrant, Figure 5.5.
(a) (b)
(c)
(d)
Figure 5.5: Circular elements (a) and (c) negative contribution, (h) and (d) positive contribution
- 73 -
Data Preparation
The calculations above require the data to be in a fixed and
rigid format. The data points must be ordered so as to traverse
the boundary in a clockwise direction, and no arc is permitted
to occupy more than one quadrant. These are quite rigid res-
trictions and they would rarely, if ever, be satisfied by data
digitized by a user opdrating the computer in a natural
manner. Also the data presented to the calculations programs
would often be the result of an editing process, for example
the user might want to try one particular shape and then modify
that shape by using the editing program to delete lines and
insert new ones. This is an important application of the com-
puter's power, but such editing procedures will rapidly upset
any order with which the data was originally structured. Any
one particular shape may be described as a series of straight
lines and displayed on the screen. If the same lines are
entered in the data in a different order and displayed on the
screen, then the user would see the same picture and not be able to detect any difference. However the calculations programs
would not necessarily give the correct answer.
So to overcome this problem a second program, overlay BOUND, was
written and developed by the author to take the input data, ar-
ranged in any order, and convert it to that required by the
calculation program. This also forms a good opportunity to
check that the data is sensible. Fig. 5.6 shows the types of
shapes of interest, composed of a solid outer boundary and two
holes.
Fig. 5.6 Shapes of interest
Each line in the data must belong to a boundary, and every
point in the data must be duplicated, once for the end of one
line and again at a coincident point marking the start of the
next line. If these conditions are not met, as for example
2a 2b
line 1
line 2 4a 4b a
- 74 -
Fig. 5.7, then such cases are treated as errors and shapes are
not passed on to the calculations programs.
Figure 5.7 Illegal Shape
Overlay BOUND
This overlay takes the raw data from file 1 and transfers the
lines and circles into file 2. It then scans file 2 and puts
the data items into file 5 in a definate clockwise sequence.
Fig. 5.10 gives the flow chart. Fig. 5.8 might represent the
data in file 1, i.e. the picture as seen by the user.
Figure 5.8 Area to be calculated
When this data is store in file 2 each line is stored as a
separate start and end, Fig. 5.9, so that although points la
and 4b, 2a and lb etc. have the same coordinates they exist indep-
endently in the data. The start of a line, i.e. points labelled
Ta' are given an I code of 1 and the points labelled lb' are
•lb
la
3a
3b
Figure 5.9 First splitting points
given an I code of 2. This makes the data in file 2 fully com-
patable with the original data in file 1 as far as the display
Store Found
Element
Set Error Flag
Found
LCo to Start of
WKSP
Split Circles Into Quadrants and Store Lines and Circles in
File 2
oundary Closed
9
Look for Another Point with same X,Y
Take Other End of Element
Flag Point as Used
Choose Starting Element, i.e., Line or Circle to Traverse Boundary Clockwise
Look for two Unused Points with Minimum
X Coord
Store End of Boundary Marker in File 5
N
All Y ata Points,
Used
Set Error 1 Flag ,
Calculations-)
EXIT 7,)
Any Errors
- 75 -
Figure 5.10 Flow Chart for Overlay sound
- 76 -
programs are concerned. The next step is for the program to find
the two points with the minimum x and y coordinates, points la
and 4b in Fig. 5.9. This will give the program the addresses of
line 1 and line 2.
Suppose line 2 is discarded and line 1 considered, starting from
point la the program automatically finds the other end of the
line, point lb. It then looks for another point with the same
coordinates, i.e. point 2a. This takes the programme on to the
next line in the sequence and so automatically to point 2b. Next
a point having the same coordinates as 2b, i.e. 3a is looked for,
and so on until point 4b is reached, at which time the solid outer
boundary is closed, and the program will look for any holes.
The one bit flag IYFG is used to flag points once they have been
considered by the program, so that they are not used twice.
Considering line 1 rather than line 2 has meant that the boun-
dary is traversed in a clockwise direction, but considering line
2 and discarding line 1 would mean that the boundary is tra-
versed in an anticlockwise direction. The choice is determined
by the gradients of line 1 and line 2. To go in a clockwise
direction the line with the maximum increment in the Y direction
is chosen.
When finding the two points la and 4b the program looks for
the minimum x coordinate first. If there are more than two
points with the minimum x coordinate, such as points la, 4b,
lb and 2a in Fig. 5.9 then the Y coordinates are checked and
the pair with the minimum y coordinate taken as the answer.
Editing the Picture
The user can quite easily change Fig. 5.8 by using the line
editor program and arrive at, say Fig. 5.11.
Fig. 5.71 Edited shape
- 77 -
To arrive at Fig. 5.11 one line has been deleted and four new
ones inserted. These new ones will be placed at the end of the
data, so destroying any original sequence of data. The BOUND
overlay was designed to allow this to happen without affecting
the calculations program. When the new lines are digitized
by eye it is unlikely that they will match up with the old
-coordinates exactly. It is not easy to digitize the start and
end points of a line to a 1/10 of a millimetre by eye, so when
the overlay BOUND searches for points having the same coordin-
ates a degree of error is introduced. Rather than expect the
points to coincide exactly, the program tests if the distance
between the points is less than an error figure. These two
programs illustrate quite well a technique of using one program
to perform a calculation using a rigid data structure, and
accept data in a form which it is convenient for the user to
input.
Balancing
It is possible to program the computer to calculate the req-
uired position of a hole in order to move the centre of grav-
ity of a shape to a particular place. The user specifies
where he wants to move the centre of gravity to, gives a line
along which the centre of the balancing circle is to be placed,
and types in the radius of the hole. The computer will then
position the circle and display the results. If they are
unsatisfactory then the user can try again with a different
sized hole. Here the computer is being used to analyse the
creative input of the user, and it is up to the user to judge
the results.
- 78 -
Accuracy
The programs and algorithms described in this chapter perform
their calculations on numbers stored inside the computers
memory and give very little arithmetic error. However, perform-
ing the calculations is only half the story, indeed, the easiest
half. The answers given by the area calculation programs will
only be as accurate as the data fed into them, never more, and
since the object of this research is to discover ways of inputting
data into the machine graphically, it is the errors in the data
preparation stages which must be considered.
The coordinates fed into the calculations programs come from
a digitizer, the coordinates from which are read to an accuracy
of 0.1 mm. This will set one limit to the accuracy, but there
are others. As an experiment, a clean sheet of paper was taken
and a square 10 cm by 10 cm drawn the a T square, set square
and a sharp pencil, in the same way a draughtsman would. This
sheet of paper was then taped onto the digitizer and the square
carefully digitized into the computer, by eye. Corrections
were made for skew, as allowed for in the programs, so that it
did not matter if the drawing was not perfectly aligned with
the digitizer's axes, and the area was then calculated. Instead
of the exT:ected 10,000 mm2, the answer was 9906 mm2. The errors
come not from the calculations program but from the method of
preparing the data. The numbers passed on to the calculations
program did not describe a square 10 cm by 10 cm, but something
very close to it. The 1 % error represents about the best that
can be achieved by using raw digitizing and careful drawing.
Whilst this is quite acceptable for straight drawing production,
and for most design calculations, it is not good enough for
describing components for manufacture on numerically controlled
machines. Quite often the sizes are specified to, say 2.000"3.0.001
or about 5 x 10-4 s
error, and there is not much hope of careful
drawing, and raw digitizing ever achieving this. The techniques
described so far can describe the outline shapes well enough,
but a fundamentally different technique is required to descrii:.e
sizes to any greater accuracy. The way a draughtsman does this
is to firstly draw out the required shape, to scale, and then
write on the dimensions in figures , using standard drawing
- 79 -
practise, as illustrated in Figure 3.21.
The next chapter describes some programs which use the same
technique of digitizing the shape and then typing in the
numbers to describe the sizes, in an effort to improve the
accuracy of using graphical methods to input components to a
computer.
- 80 -
Chapter 6
_SIZEAND--SHAPE -DEFINITIONS
Once a shape has been digitized into the computer, then
the programs of the last chapter can analyse it. For a
large number of applidations it may be accurate enough to
trace out a scale drawing and to use the digitized co-
ordinates directly in the calculations. But in a large
number of cases this will not be the case. Simple tracing
of a drawing will not be sufficient to describe a shape
for an NC program. In such cases sizes are regularly
specified to 1/1000th of an inch, and no scale drawing is
going to be that accurate. Even if it were then one could
not be expected to digitize the drawing by eye that accur-
ately.
The techniques used to generate engineering drawings
described in Chapter 3 are only suitable to describe the
SHAPE of a component, and something else is needed to specify
the SIZE of the component. In practice this is done by
using DIMENSION symbols on the drawing, Figure 6.1. The
distances between the lines on the drawing will not neces-
sarily bear any relationship to the numbers in the dimension
symbol.
CO
0 0 cr)
350.2
(a)
(b)
Figure 6.1: Two shapes drawn to different scales come out the same size
- 81
If a computer program existed to associate the dimension
symbols with the digitized shape, and could alter the
shape so that the distances between the lines on the drawing
corresponded to the numbers typed into the dimension symbol,
then one would have a very natural and easy to use method
of describing shapes in a form which the computer could deal
.with. The following section describes three "CLEAN UP" over-
lays which will do this, for geometry restricted to linear
dimensions and straight lines only.
The Clean Up Programs
Figure 6.2 shows the data which describes the shape of Figure
6.1a. This would normally be in the workspace or file 1.
X
1 1000 1000
2 1050 1000
2 - 1050 1050
2 1000 1050
2 1000 1000
4 4.0 8.0 3 Bounding Rectangle 3
6 350.2 1.0
6 5.0 1.0
5 1000 1000
5 1050 1000
5 1025 990
--4 4.0 8.0 3 Bounding Rectangle 3
_ 6 300.6 -1.0
6 5.0 1.0
5 1000 1000
5 1000 1050
5 990 1025
Figure 6.2
- 82 -
Figure 6.3 shows the data in the required form.
I X
1 1000 1000
2 1350.2 1000
2 1350.2 1300.6
2 . .1000 1300.6
2 1000 1000
Figure 6.3 Required form of the data
The data in Figure 6.3 is the required answer, and this can
be passed on to any other program in the system.
Detailed Description of Author's Algorithm
The author developed a set of three programs, CLEAN1, CLEAN2
and CLEAN3, to read in the data in the form of Fig. 6.2 and
output the data in the form of Fig. 6.3, and the following
paragraphs describe how the progi,ams work and how they were
developed.
Cross Referenced Lists
The key to the author's algorithm and method is the generation
of a cross reference list which associates each dimension symbol
with the address of the data points on each end, and also with
other dimension symbols. Every dimension symbol has two arrow
heads, so we need a separate cross reference list for each
arrow head, so there will be two lists for each dimension symbol.
Since it is impossible to predict how many data points, or for
that matter how many other arrow heads, will be associated with
any particular arrow head, Fig. 6.4, the cross reference file
must be a sequential one, with variable length records.
Suppose one end of a dimension line is fixed, then knowing the
distance between arrow heads the other end can be established.
A great simplication is effected if we recognise that most of
the dimensio7 are orthogonal, i.e. operate only on either X er
- 83 -
ra
Fig. 6.4 Several arrow heads on one line
Y coordinate, accordingly a flag is used in the dimension
symbol to mark the dimension arrows as either horizontal,
vertical or skew.
The first overlay CLEAN1 scans the input data and extracts
lines and dimension symbols. The input is taken from file 1,
the line data goes into file 2 and the dimension symbols to file
3. The second overlay CLEAN2 generates the connection list by
comparing the coordinates of the data points with those of the
dimension symbol arrow heads. As well as knowing which dimension
symbol a point belongs to it is also necessary to know which end,
or arrow head to use. End one points are given negative addresses
and end two points are given positive addresses to separate
them. Every point in the data requires two dimensions to locate
it in space, arr every dimension symbol must have some points to
operate on. Overlay CLEAN2 will check this and produce an
error message if these conditions are not fulfilled.
- 84 -
To draw a triangle only three things are needed, the length
of the three sides being sufficient. However the data struc-
ture used in these programs requires six things to be fixed viz.
the X and Y coordinates of the three vertices. The missing
three data items are accounted for by recognising that if a
rotation and translation matrix is applied to a solid body its'
shape does not change. Therefore three of the coordinates are
arbitrary, representing the origin of coordinates and the angle
of inclination of the shape.
Overlay CLEAN3 is the program which actually alters the co-
ordinates. The first dimension arrow head is taken as fixed,
hence established, and also the angle of inclination of the
arrow is fixed. Next the overlay looks for a dimension symbol
with one end established and will try to establish the other end.
Two one bit flags in the data structure I code (IXF and IYF) are
used to show when one of the coordinates has been fixed. Also
file 3 contains two flags, one for each arrow head, to show
when one end of a dimension line is fixed. CLEAN3 works its way
down the cross reference list, file 4, looking for dimension
arrows to treat in this way.
Skew dimensions pose a problem, since the coordinates they
operate on cannot be calculated directly, all that is known is
that the data point is set on a circle of known centre and radius,
Fig. 6.5.
Fig. 6.5 A triangle constructed with compasses
So when a skew dimension line is processed the program generates a
construction circle and enters it into the data. Two of the bit
flags packed into the I code are used at this stage; MBIT is set
to show that the data is modified by
- 85 -
a circle, the next record being used to store the address
of the construction circle and ICN bit is set to show that
the circle is a construction circle, and not part of the
original data. In fig. 6.6 the required point is calculated
from the intersection of two circles, and there are two possible
answers, Fig. 6.6. To find the correct answer the calculation
is done first with the original data, correct shape but wrong
size and a criterion such as largest largest X or smallest x,
. largest Y or smallest y selected by the program, and then the
calculation performed with the correct sizes.
Fig. 6.6 Two possible answers
When the overlay CLEAN3 can no longer establish any Points
the algorithm finishes, then checks that all data points have
been established, and gives an error message if this is not the
case. Fig. 6.7 shows a four bar chain, which is not a rigid
shape. The only points that can be established are those on
the arbitrary origin and the program will pick this up.
Fig. 6.7 Four‘bar chain
Size and Shane Editing
By regarding size and shape definitions as two entirely separate
processes, it is easy to write a program to change the numbers
- 86 -
on the dimension symbol, and so generate an entirely new
shape with one command.
Evaluation of Author's Algorithm
The three programs were originally conceived as an interface
between the engineering drawing programs and the geometrical
calculation programs. ,They enable the user to digitize a two
dimensional shape to any degree of accuracy, regardless of
digitizer or human limitations, the limit being the accuracy to
which the computer can do arithmetic and store numbers. The
technique works well for shapes consisting of straight lines
and linear dimensions, since all the data is inputted by the
user in a purely graphical form. However the shapes which the
program can deal with are somewhat restricted, and some dif-
ficult programming would be involved to extend the algorithm to
include circles and arcs with all the possible combinations of
tangency, etc.
- 87 -
Chapter 7
N.C. TAPES
Numerically controlled machine tools have an electronic
control system which can position the cutting tool at a
-point whose coordinates are known. How many directions the
tool can move in depends on the type of tool, and varies
from a basic two axis drilling machine, where only X and Y
coordinates are specified, to a 5 axis milling machine where
the tool can be programmed to move along X, Y and Z axes
and also to rotate about an axis.
Program for a milling machine
Fig. 7.1 shows the form of commands which a simple N.C.
milling machine might accept, Figure 7.2 illustrates a shape
which might be cut on the machine, and Figure 7.3 a control
program for doing this. Figure 7.3 is the form in which the
data must be presented to the milling machine. In practice
the format would be different, since it is usually possible
to move along two axes simultaneously.
The coordinate data refers to the centre of the cutting tool,
and the dimensions of the tool must be allowed for when writing
COMMAND ACTION
-- 1 INCREMENT X
2 DECREMENT X
3 INCREMENT Y•
4 DECREMENT Y
5 RAISE TOOL
6 LOWER TOOL
Figure 7.1. Commands to a milling machine
the control program. The-calculations for the very simple
component of Figure 7.2 are manageable, but soon become un-
wieldy for shapes of any complexity. So it is helpful to
have a computer program to calculate the tool path required
to cut out a particular component.
- 88 -
0 0 r71
0
50 100
I>
Figure 7.2. Shape to be cut
COMMAND DATA
5 30
1 50
3 50
6 25
3 100
1 100
4 100
2 100
5 25
Figure 7.3. Possible control program
Two stages are required in the process. The first is to
describe the outline geometry of the shape to be cut and the
second is to specify the`tool path along the shape. Figure
7.4 shows a possible program of thy. form. Several such pro-
grams have been in use for a number of year's.
In Figure 7.4 a language is used to describe the geometry
of the part and also the path of the tool. This would be the
P2 1D3 -L2
L4 .P1 P4
_21
90
f,J Ll..
P1 = 55, 55
P2 = 55, 145
P3 = 145, 145
P4 = 145, 55
Ll = P1, P2
L2 = P2, P3
L3 = P3, P4
L4 = P4, P1
55
.
LO 0
- 89 -
TOOL DIA = 10
TOOL UP = 30
GO TO Pl, TANTO Ll
TOOL DOWN = 25
GO PAST L2, ALONG Ll
GO PAST L3, ALONG L2
GO PAST L4, ALONG L3
GO PAST Ll, ALONG'L4
TOOL UP = 25
END
Figure 7.4. Possible. Part Program
input to the computer program, and the output produced by this would be similar to Figure 7.3. This control tape would be fed to the N.C. machine, having been punched out by the com-
'puter. This form of language is useful when shapes having
- 90 -
complex geometries have to be cut, as all the tool offsetting
can be done by the program and the chances of producing error
freetapes is increased. However a fair degree of skill is
needed to write Figure 7.4, and it may be possible to make the
computer do more of the work, and simplify the data input
stage for the user.
Interactive Graphics
If it were possible to use interactive graphics to describe
either the geometry of the part, or the required tool paths,
then a more natural method of communicating with the computer
would exist. At least two systems exist which use interactive
graphics to specify tool paths around previously described
components (15, 16). Davies has published work on a graphical
NC post processor which was designed to work on shapes similar
to Fig. 7.2 (16). The user is required to define the outline
geometry to be cut in a language which generates 'K curves',
one curve for each solid boundary. Once the language input
has been written it is then typed into the computer. The
computer can then display the shape to be cut on the screen.
Not only does the component have the correct shape but the size
is also correct, since all the numbers were typed into the com-
puter in terms of characters. Half of the NC tape generation.
process is now complete, and all that remains is to select a
suitable tool size and specify the sequence of cuts. This is
the point at which interactive graphics enters. Displayed on
the screen is the shape to be cut and a small circle repres-
enting the milling cutter. The user can then "drive" the milling
cutter around any of the lines on the component. This technique
of specifying the cutting tool paths visually rather than sym-
bolically, as in a language, makes it easier to spot gross
errors in the program and increases the chances of producing
error free tapes (15) and the system works quite well for 21
dimensional milling problems.
Extension to NC Lathes
The same techniques could, at first sight, be applied to NC
lathes to generate control, tapes. However lathes differ from
milling machines in sevoral important respects. Often millin
- 91 -
machines use only one cutter at a time, and the effect of
cutter radius is not a dominant one. In manufacturing, say
an aircraft wing surface, the major problem is defining the
shape of the surface mathematically, and a computer program
represents the most practical approach. With a milling
machine the final cut shape depends largely on the motion of
the cutting tool and not very much on the shape of the cutting
tool.
NC lathes have facilities for using several different tools
on more than one turret and any one particular job may call
for frequent tool changes. Shapes cut out on a lathe are
usually of a simple geometry. The most involved mathematics
is likely to be line-circle tangency calculations, or feed/
speed combinations for thread cutting, most of which can be
looked up in standard tables. More emphasis is placed on how
the components are cut, i.e. the production engineering aspects,
rather than defining their geometry. What tools to use, and
in which order become more important considerations in dealing
with NC lathes than defining the geometry of components to be
manufactured. Furthermore the shape of the tool has as much
influence on the final cut shape as the motion of the tool,
form tools being a good example of this.
To write an interactive graphics package to generate NC tapes
for a lathe is not so straightforward, or necessarily as
profitable, as a package for milling machines. The chief dif-
ficulty in generating a tape by hand is the tool offset calc-
ulations which can involve some heavy coordinate geometry,
best left to a computer. A part program of the type of Figure
7.4 can handle this without too much difficulty. Deciding
which tools to use and how to cut a particular job reauires a
considerable degree of skill and experience which may not be
possible to build into a program. With a little practice it
is quite a routine matter to economically write programs such
as Figure 7.4;howeyer there is one particular problem concern-
ing NC lathes which the computer can solve, and that is of
collision avoidance. With an NC lathe having two turrets, each
turret having up to six tools on it, the programmer has to
ensure that the turrets do not collide with each other instead
- 92 -
of cutting the workpiece. In order to change cutting tools the
turret is withdrawn from the workpiece and indexed round to
the next tool. The programmer has to remember the current pos-
ition of the cutting tool and has to ensure that the turret is
retracted far enough from the workpiece for the indexing tool
to clear any obstructions, including the second turret. It is
very easy to get this wrong when writing an NC program.
A Machine Simulator
Supposing a control tape has been written for a particular
job, either by hand or using a part programming and language
approach. The next step is to determine whether the tape is
accurate or not, as regarding dimensions and tool paths. With
two turrets cutting simultaneously there is a great danger of
collisions taking place between turrets and the machine.
Trying out an untested program on the lathe can produce some
expensive scrap and machine collisions. The control tape has
been written, the operations of the machine are known, so it
is perfectly possible to predict what a particular tape will
do without having to run it on the NC machine. This is an
ideal task for a computer, everything is predictable and can
be built into a program mathematically. Figure 7.5 shows a flow
chart for the simulator. A large part has been coded, but a
good deal of work remains to be done on this.
It is the author's opinion that computer graphics is best used
at the end of the tape preparation process, to check out a tape
before it is run on an NC machine, rather than use computer
graphics at the start of the tape production process, where
the problems are far less predictable and the solutions require
more skill and judgement. The input to start generating the
control tape would be a language of the type of Figure 7.4 and
the output would be a control tape which can be fed first into
the simulator and then, if it is error free, to the machine tool.
Computer graphics plays a part in the simulator, displaying the
movements of the machine.
The components illustrated in Figure 4.7 are very typical of
items cut on an NC lathe, and it is not too difficult to write
a'program to drive an NC lathe to cut out these shapes. All the
- 93 -
geometry is fairly straightforward, and tables can be obtained
from the lathe manufacturers to perform the tool offset calcul-
ations incurred wherever the cutting tool changes direction.
After a little practice, an accurate program to cut out any one
of the shapes in Figure 4.7 can be written in a day or two by
a trained technician, and all the computer is needed for is to
punch out the actual control paper tape after the programmer
has typed in the program via a teletype.
However, it is very easy to make an error in the program,
either through typing errors, like inserting an extra zero on
the end of a dimension, or through underestimating tool sizes
and the clearance required between different turrets. Testing
and proving a new tape can result in expensive collisions between
the tools and either the workpiece or the lathe itself. Indeed,
more often than not, there will be errors of some sort in a
new program, and it would be helpful if these could be detected
and corrected before the control tape is run on the lathe. This
is an ideal problem for the computer, since it is not difficult
to write a computer program to simulate the movements of the lathe,
and to read in the control tape and plot out the movements of
the cutting tools on a display screen, and to check for any
possible tool collisions, before they can happen on the actual
lathe. Since the main difficulty in generating NC control tapes
for parts like aircraft wing surfaces, or involute pumps, is to
describe the component mathematically, and to define the required
cutter movements, large computer programs such as APT have been
developed to satisfy this need. The computer then plays a large
part in the initial NC tape production process. But for the
components in Figure 4.7, all turned on an NC lathe, this" is
not the case, The problem is not in defining the geometry or
of generating an NC tape in the first instance, the problem is
in proving the tape after it has been generated. Here is where
the computer can make a contribution, at the end of the tape
production process rather than t the beginning. It is very
helpful to have the cutter movements displayed visually, as it
is much easier to spot gross errors in a picture than in a
program listing.
START )
Y
Plot Movements of Tool Tips
Any Collisions i>
Error Message
Fetch Tool Shapes from Library
Read in Tool
Numbers
- 94 -
Figure 7.5
- 95 -
Chapter 8
CONCLUSIONS
General
The main point of this thesis is that computers can only cont-
ribute to the design process in so far as the ideas and shapes
of interest to the designer can be expressed in a form which
c an be accepted by the computer. However the computer does
have a definite contribution to make to the design process.
The generation of NC tapes for complex shapes by using lang-
uages such as APT is well known and the computer represents the
most, and indeed in some cases the only, practical solution to
the problem. But there are other areas of general engineering
design where the computer can improve on existing methods,
such as visualization of solid components before manufacture,
retrieval of existing components and engineering drawing, where
the computer can be used as an automated pen, as explained
earlier in this thesis. Also design type calculations, such
as areas, can be performed on complex shapes. To fully exploit
the potential of the computer it is important to use data input
techniques suitable to the application, Figure 8.1 gives a
table of data input techniques and their relative suitability
for different applications.
Producing Engineering Drawings by Computer
A digitizer and minicomputer can provide facilities for gener-
ating conventional engineering detail drawings. Often one of
the most tedious and dull aspects of the design-production sys-
tem is the detailed drawing stage. Some of the advantages of
computer generated drawings over manual methods are
1 Repeatability
// Descriptions of commonly used Items such as tapped holes need
only be programmed into the computer once and can be reproduced
countless times with the minimum pf effort.
- 96 -
2 Standardization of Drawing Practice
Two different draughtsmen using the same computer system
will automatically produce the same symbols for conventional
shapes, since they are defined by the computer programmer
and can be made to conform to existing standards, e.g. BS 308.
3 Avoidance of Duplication
If the same component has to be drawn on several different
sheets, then it can be drawn once and stored as a macro before
being placed in the drawing. The macro need only be constructed
once, and can then be used several times.
4 Speed and Accuracy
The computer can be used to draw lines much faster than by
hand, for example several holes lying on a common pitch circle
can be constructed using only one comman to the computer.
Generation of alphanumerics is also a situation where the
computer scores heavily over manual methods. It is much
quicker to type in a list of alphanumeric characters on a
keyboard and watch the machine construct and display each
character than it would be for a draughtsman to draw each
character either free hand or with a stencil.
5 Combining Drawings
It is quite a simple matter to program into the computer
a facility for merging two drawings contained in separate
files. Thus items like standard title blocks, boarders
and headings need only be constructed once and reproduced
on many drawings.
6 Editing Changes
Modifying a drawing already on a computer system is also
very efficient since the Qxisting drawing can be changed
by the editing programs very quickly.
It is feasible for a computer draughting system to generate,
store permanently and plot out engineering drawings of the
type used by many mechanical engineering concerns. A digitizer
.and minicomputer can be programmed to provide an effective
- 97 -
an effective and fast automated draughting aid which
can be operated by people with no technical knowledge of
computers. Once the designer has a clear idea of what he
is doing computer aided draughting can greatly speed up the
production of good quality drawings. However much initial
design work is done by a designer sitting at a drawing
board and changing and redrawing parts of the design. A
good deal of design work is done with a rubber. This may
mean that the computer should only be used near the end of the
design process, when all that needs to be done is to produce
final detailed drawings of each component and the assembly
of drawings. It is envisaged that the most economical method
of using automated draughting would be for the designer to
do nearly all the preliminary drawings in a semi-rough manner
using conventional paper and pencil. Once the design is more
or less frozen then the computer can be used to produce good
quality drawings. The original semi-rough drawings can be
placed on the digitizer and copied into the computer very
quickly. Thc detailed drawing can then be completed by adding
all the dimensions and alphanumerics, title blocks etc.
Generation of NC Tapes
The one major advantage of a digitizer is that existing
rough drawings can be layed out on it's large flat surface
and the drawing traced in. The draughting system developed
by the author works well in this respect and uses the same
techniques of describing shape and size as a draughtsman, that
is the shapes are correctly proportioned but drawn to a
limited accuracy and the correct dimensions indicated by
dimension symbols. In the author's case the numbers on .the
symbols were typed in from the keyboard. However it would
be desirable to use the computer system to generate NC tapes
as well as engineering drawings, if only to obtain the maxi-
mum benefit from the compiter. The software developed by the
author provides an effective draughting system and can also
be used for design type calculations on geometrical shapes.
But one large problem concerning the direct generation of
NC tapes is the accuracy of the coordinates used to describe
the shape. Coordinates which are perfectly acceptable to
- 98 -
plot out an engineering drawing are not necessarily accurate
enough to generate an NC tape. The programs described in
chapter six overcome this limitation for simple shapes used
in the calculations programs, where the geometry is quite
restricted. Rather than start with a draughting system and
attempt to extend it to produce NC tapes, better results would
be obtained by starting with a system designed to generate
NC tapes and then extend it to produce engineering drawings.
Coordinate data which is accurate enough for NC tapes is
certainly accurate enough for engineering drawings, but not
vice versa. The critical decision is how to input and display
the dimensions of the drawing. If the coordinate data is to
be used directly for NC tape production, and there is no
reason why it should not be, then the dimensions displayed
on the drawing should be calculated by the computer as the
difference between the two coordinates. This dimension is
displayed on the screen and the user then has a chance to
amend the dimension by using the line editor to displace the
coordinates by a typed amount. When constructing a drawing
the centre lines would be digitized arbitarily and the digitizer
used to point to the starting line, then the cursor moved
by typing in distances on the keyboard. All the dimensioning
is done automatically by the software. The user would indicate
which two points to dimension, where to place the dimension
arrow and the software would calculate the size as a difference
between coordinates, then display the result according to
conventional drawing practice. This technique would ensure
that the coordinate data is suitable both for drawings and
NC tapes.
- 99 -
I
-
ANALYSIS PROGRAMS e.g. MASS BALANCES
3D NC
TAPES
ENGINEERING DRAWINGS
2 OR 21 D TAPES
VISUALIZ-ATION OF SOLID OBJEM-
PUNCHING NUMBERS ON CARDS
4 1 1 1 1
LANGUAGES LIKE APT
1 4 2 4 1
DIGITIZING 1 1 4 1 2
VOLUME PRIMITIVES
1 2 3 2 4
KEY:- 1 Unsuitable
. 2 Can make some contribution
3 Large contribution
4 Ideally suited
Fig. 8.1 Applications of different Input techniques
- 100 -
Limitations and Advantages of a Digitizer
A digitizer provides a very effective means of inputting pict-
ures to a computer and can be used by people who have no know-
ledge of programming, and proves to be ideal for describing
engineering drawings. Systems exist, such as MEDALS (28) which
attempt to produce engineering drawings by using an input lang-
uage to define all the lines in the drawifig. These can become
very cumbersome for drawings of any complexity and in addition
require a knowledge of programming. A digitizer has the advant-
age that the input is done entirely by pictures and is easy to
use. However it is not suitable, on its own, to describe shapes
accurately enough for manufacturing purposes. To aid accuarate
digitizing a grid system can be used, whereby the computer rounds
off the digitized coordinates to the nearest, say 1 cm, if the
grid spacing is set at 1 cm. It is quite easy to estimate by
eye to the nearest centimetre, and ensure that accurate straight
lines, either horizontal or vertical are digitized. This is
useful in printed circuit board and civil engineering applicat-
ions, but sizes of mechanical engineering components are regul-
arly specified to 1 /1000th of an inch, and a grid spacing of
1/1000th of an inch does not mean much. Chapter 6 shows how
a digitizer can be programmed to define shapes to any accuracy,
however the shapes are limited to straight lines and linear
dimensions. Sutherland has used a simalar concept in the
"Sketchpad" system. A digitizer is good for tracing drawings
to a limited accuracy, but a language technique is better for
defining accurately sized objects for manufacturing purposes.
Future Work
The one big problem in this sort of CAD is to express the shapes
and ideas which are of interest in a form which the computer
can accept. If this can be done, then more than half the problem
is solved. To generate and construct engineering drawings a
very open and loose meth-C; of inputting data is required, and a
digitizer provides this. As far as NC tapes are concerned,
then a language such as APT provides the best means of describing
the component, and graphics.has a part to play in the end of
the process, to check out what a given tape will do. 'Volume
- 101 -
primitives are a good method of describing solid shapes and
aiding their visualization. So different input techniques are
desirable for different applications, and whilst the computer
can indeed make a contribution to each phase of the design and
production process, it will only be a contribution, and is
better done by several independent programs rather than one
Large computer system which only employs one method of input-
ting data (20). Reference (4) describes a complete system for
the design and manufacture of cams. In this case only one
type of component is being considered and several simplifying
assumptions can be made to produce a complete software package.
Combining several input techniques into a system may well
prove to be advantageous. Volume primitives could be used to
construct a three dimensional picture of a component to aid
visualization of what the shape should look like. Also proj-
ections of the solid object can be generated and used as a
basis for an engineering drawing. A language such as APT
Should be used to create NC tapes, and graphics used to check
out a tape.
Hardware notes
The preparation of data by interactive graphics often requires
a large number of commands, with several seconds delay between
them, each one of which needs little computer power to execute.
This would suggest that a dedicated minicomputer would be a
more proctical system than running such programs on a terminal
to a time sharing system. One of the most frequent commands
used in the draughting system is 'WINDOW' which involves eras-
ing the entire screen and redisplaying the picture anyway,
so selective erasure is not of any great value and a refresh
type of display offers no particular advantage for the work discussed in this thesis. The extra computer hardware required to continually refresh the -image on the screen is not justified
and the author found a minicomputer with a disk and a storage
tube display was entirely adequate.
Limitations of CAD
The computer is only ,a tool and like all tools, must be used
- 102 -
properly to extract the best from it. The type of problem
which is suitable for computer application is very specific
and fairly easily recognised. Within the limitations of the
machine a computer can be a very powerful aid for the designer,
providing him with information which he would not normally have
without using a computer. However once one attempts to stretch
the machine's limits severe problems can be encountered.
Consider two problems, firstly to design, say, a motor car
engine and secondly to calculate the geometrical properties such
as area, centre of gravity and second moment of area of any
defined polygon. The first problem requires years of experience
in engine design, most of which is acquired by a trial and
error intuitive approach. The final overall design may be the
result of a compromise between several conflicting require-
metns. The overall design process involves considerable skill
on the part of the designer and many of the factors upon which
decisions are based may not be measurable or even definable.
If it looks right it is right. The second problem, however, is
totally different in nature. The steps involved are all math-
ematical in nature and are easily analysed as such. There is
only one right answer and the offered answers can be easily
tested For simple shapes the calculations can be done without
much trouble by hand, using a calculator. However for complic-
ated shapes, such as are encountered in practice, the steps
become very tedious to perform by hand and the chances of making
mistakes becomes high.
Any problems which can be defined, and have a definite or "closed"
solution, such as calculating the geometrical properties of a
shape is in principle a good task for a computer. It is some-
thing which a human would find very tedious and boring, but
which a computer can do quickly and easily. Problems such as
the first, which have many possible solutions, each of different
amounts of "goodness" and,are "open" in nature are not good
problems. for a computer. Thus "design a new motor car engine"
is not a realistic.command to give a CAD system, whereas
calculate the centreof gravity of the following shape" is a
realistic command. Somewhere between the two extremes is a
class of problems which, while possible to solve on a computer,
- 103 -
would be better done by hand. So the division of labour
between the man and the machine is worth looking at, as illus-
trated by the cross hatching algorithms discussed earlier.
- 1014 -
REFERENCES
1. BESANT, C.B. et al. "CADMAC - II A fully interactive
computer aided design system", Journal of CAD, Vol. 4,
No. 5, 1972.
2. HAMLYN, A.D. Ph.D. Thesis, Imperial College, 1974.
.3. HATVANY, J. "The use of CAD/CAM systems in manufac-
ture", CAD 74 International Conference on Computers
in Engineering and Building Design, Imperial College,
September 1974.
4. STOCKMAN, P. and WOLLNER, G. "Combination of CAD and
CAM in machine tool manufacture", Proceedings of the
15th International Machine Tool Design and Research
Conference, Birmingham University, September 1974.
5. APT Reference manual, Control Data Corporation Pub-
lication Number 1731360.
6. GRINDLEY, R.E. Ph.D. Thesis, Imperial College, 1973.
7. Codasyl Systems Committee. "Feature Analysis of
generalized data base management systems", May 1971.
8. GALLAGHER, C.C., and KNIGHT, W.A. "Group Technology",
Butterworth and Co., 1973.
9. OPITZ, H. "Workpiece statistics and manufacture of
family workpieces", V.D.I. Zeitschrift Vol. 106, No.
26, September 1964, pp. 1268-1278, M.T.I.R.A. Trans-
lation T146.
10. ALFRED HERBERT Ltd. Private Communication, 1974.
11. BOWKER and LIEBERMAN. "Engineering Statistics",
Prentice Hall Inc., 1972.
12. BS 308, Parts I, II and III "Engineering Drawing .
Practice", British Standards Institute, 1972.
13. International Conference on Computer Aided Geometric
Design (CAGD) 1st, University of. UTAH, 1974, "Com-
puter Aided Geometric Design". Edited by BARNMILL
and RIESENFELD.
14. SABIN, M., Editor of "Programming Techniques in
Computer Aided Design".
- 105 -
15. CREMERIUS, J., "APT/IGS: State of the aret in NC
"graphics", International Conference on programming
languages for machine tools, IFIP/IFAC, 2nd, Budapest,
1973, edited by J. HATVANY, page 87.
16. DAVIES, K.J., "GNC - A graphical NC processor", Inter-
national Conference on programming languages for machine
tools, IFIP/IFAC, 2nd Budapest, 1973, edited by J.
HATVANY, page 51.
17. WIRELESS WORLD, July 1976 Edition.
18. FORREST, A.R., "Computational Geometry - Achievements
and problems". International Conference on Computer
Aided Geometric Design 1st, University of Utah, 1974.
19. JEBB, A., BESANT, C.B. and EDNEY, R.C., "The application
of CAD techniqueS to machine tool component design pro-
duction and manufacture". Proceedings of the 15th Inter-
national Machine Tool Design and Research Conference,
Birmingham University, September 1974.
20. OKINO, N. ,KAKAZU, Y. and KUBO, H., "TIPS - 1; Technical
information processing system for computer aided design,
drawing and manufacturing", International Conference on
programming languages for machine tools, IFIP/IFAC, 2nd,
Budapest, 1973, edited by J. HATVANY, page 141.
21. HOGLUND, I. and BERG, H. 'LSI CIRCUIT DESIGN'. Computer
Aided Design Journal, Volume 8, Number 3, July 1976.
22. BOLMSTEDT, U.and JERNQUIST, A. 'Simulation of the steady-
state and dynamic behaviour of multiple effect evaporation
plants'. Computer Aided Design Journal, Volume 8, Number
3, July 1976.
23. HUTCHINSON, H.P. and LEESLEY, M.E. 'A balanced approach
to process design by computer'. Computer Aided Design
Journal, Volume 5, Number 4, October 1973.
24. ICI Central Management Services, Wilmslow, Chesire,
Private Communication
25. HOSKING, K.H. 'Automatic printed circuit board routing
with intermediate control of the tracking: APRICOT'.
Computer Aided Design Journal Voluw. 8, Number 3, July 1976.
- 106 -
26. SADEGHI, M.M. and GOULD, S.S. 'A comparison of two para-metric surface patch methods'. Computer Aided Design
Journal, Volume 6, Number 4, October 1974.
27. C. YI. Ph.D. Thesis, Imperial College 1977.
28. CAD Centre Scene. Computer Aided Design Journal,
Volume 5, Number 3, July 1973.
- 107 -
GLOSSARY
Gives a brief definition of technical terms used in this
thesis.
APT Automatically Programmed Tools.
Large computer program developed at
MIT since 1957. Allows shapes like
aircraft wings to be described mathema-
tically and generates a control tape for
an NC machine tool.
BATCH SYSTEMS Refers to a method of running a computer
system. A number of jobs are fed into the
machine at a time and some time later the
answers come back - not necessarily in the
order the programs were inputted. No action
is taken by the user between job input and
answers out.
BLOCK One physical unit of disk storage space.
Also can mean an area of core storage.
BUG A device used in conjunction with a digiti-
zer which can be used to point to a par-
ticular place on the digitizer.
CYCLE TIME The time required for a machine tool to
manufacture a particular component.
DEDICATED COMPUTER A computer which runs only one program for
most of its working life - often wired up
permanently to special peripherals, e.g. a
mini used to control an NC machine.
DIGITIZER A large flat surface and a moveable bug,
whose X, Y coordinates on the surface can
be read into the computer.
FILE All -CIM information between end of file
markers.
I/O Input and Output - ways of getting data in
and out of the computer.
- 108 -
INTERACTIVE Opposite of a batch system - the computer
PROGRAM asks for a command, executes it then
comes back for another command. Typically
one minute between commands.
MAIN FRAME Large computer installation usually requi-
COMPUTER ring a permanent staff to run and operate
it, e,g. IBM 360 and 370 families.
MENU A list of commands which the computer will
accept, from which the user may choose.
MICRO PROCESSOR A basic arithmatic unit capable of low level
computing and program execution. Needs
extra electronics to feed data in and out.
Very cheap.
MINI COMPUTER A small computer which can be easily tai-
lored to a user's requirements, e.g. PDP 11
family. Needs little operator intervention
for simple tasks.
OVERLAY SYSTEM A method of running and controlling a large
program on a small computer.
PERIPHERAL A device by which a computer communicates
to the outside world, or stores data on,
e.g. card reader, line printer, disk drive.
RECORD A set of data items which are always found
together and processed together.
REFRESH Continually send picture information to a
display device in order that the picture
remains visible.
SCRATH FILES . Files on disk used for temporary storage
only - can be deleted when the program has
finished.
STORAGE TUBE A graphical output device which can display
permanently a line sent once by the computer.
SYMBOLS Graphical shapes constructed from several
lines and/or circles which are treated as
one unit.
TIME SHARING Opposite of a dedicated machine. Several
different programs are being processed at the
same time. Each user has the illusion that
- 109 -
he has the machine to himself.
WINDOW
A small area of the working surface
selected by the user for magnification.
- 110 -
APPENDIX I
The Medcap System
Resident Common Blocks
(a) COMMON /PLTORG/
OX, OY Plotter origin coordinates
(b) COMMON /KINMAT/
IKST Not used any more
IRKIN Not used
(c) COMMON
NFILE 1
NFILE 2
OXY(2)
XYL(2)
IPLAST
ICELL
/CALCOM/
To be used for plotting files in batch
mode on the Calcomp drum plotter
(d) COMMON /PLTSET/
FTYPE(10) Used for Calcomp plotter
(e) COMMON /MESAGE/
MESS(50) Stores messages in ASCII for display
REAL MESS on the screen
(f) COMMON /PARAN/
FIPX, FIPY Input origin, real table coords
CANG, SANG Cosine and sine of input skew angle
FISCL Input scale
GR Grid factor
XWNDO, YWNDO Current window coordinates
OPSCL Output scale
CURANG, Cl, C Current'crsor. angle
(g) COMMON
/MENU /
MNUM
Digitized menu number
MTYPE Menu type number - 1 command
2 level
3 file
4 symbol
NC Type of cursor control in operation
NCORD Absolute or relative coordinage flag
NCON Cursor control in-out flag, if = 0
no control
NSQU Digitized menu square number, unmaped.
IDRIV Drive mode flag
N Button number
NSUB Overlay entry point
NOV Overlay number
(h) COMMON
/SUBOV/
ISUB
Overlay entry point
(i) COMMON
/GENRL/
GEN(10)
Reserved for user
(j) COMMON /USER/
BUFFER (256) Reserved for user I/O buffers
(k) COMMON /SYMBOL/
ISFLAG Symbol active flag, if = 0 not active
NSYM Symbol number
NENTS TOtal number of record entries
X, Y Digitized points
XSM(l5), Symbol data YSYM(15)
(1) COMMON
MAC(9)
XFLAG (4)
YFLAG (4)
COST
SINT
/MACRO/
Used for macro processing
- 112 -
(m) COMMON /FILE/
IBI (128) Input buffer
IBO (128) Output buffer
NREC (12) Number of blocks in scratch files
NIB Block currently occupying input buffer
NOB Block currently occupying output buffer
IFCI File currently using input buffer
IFCO File currently using output buffer
IBUSED Not used '
LOVSED Bounding rectangle tested against
current window flag
IFSTAT (12) Scratch file status
(n) COMMON /MS2/
Used by filing system
(o) COMMON /FIND/
IRFIN1 Record number of first found point
LABF1 Label of first found point
IRFIN2 Record number of second found point
LABF2 Label of second point
IFTYPE Specifies search type
= 1 Finds a point
= 2 Sits cursor on nearest line
= 3 Finds intersection of two lines
IGOT Success flag, = 0 point not found
(p) COMMON /MIRROR/
LABM1 Marks end of workspace
LABM2 Not used
IRMIR Internal record counter
RMLIN (2,2) Line about which mirroring occurs (
(q) COMMON /ICNOW/
Current I code parameters ready for packing
LTYPE Line type
.IPN Pen number
MBIT Modifier bit
ICN Construction lines hit
- 113 --
IYF Y Flat bit
IXF X Flag bit
LEVNUM Level number
LABEL Unique label
(r) COMMON /ICGOT/
I codes unpacked by last call to a GETREC
subroutine
(s) COMMON /REC/
IREC (12) Record counters for the 12 scratch files
(t) COMMON /FILHND/
IONDIR Control Flag for OVFIL overlay
LIFSID Specifies which scratch file for DISALL
to display
LEVCOM Level processing flag = 1 input new level
= 2 display level
= 3 ignore level
IRDIS Internal record counter for DISALL overlay
IERR Error flat for FORTRAN OTS routines
LIBRST Library opened/closed flag
IPEN Pen up/down flag = 2 down
= 3 up
XT, YT Trailing origin
XTY, YTR PL- evious trailing origin
(u) COMMON
PTX, PTY, PTSCL
IMODE
IFLAG (5)
SPARE (4)
/PLOTER/
Specifies window transformation before
file is plotted
Output device flag = 1 Screen
= 2 Flat bed plotter
= 3 File.on disc
Flags used by DISALL
Not used
- 114 -
Data Structures
Each data structure is given a type number.
Type 1
One integer and one real.
Record :- VAL, INT ; 64 records per block
-EOD :- VAL = - 1E28
Packing:- DIMENSION BLOCK (128), VAL (64), INT (64)
EQUIVALENCE (BLOCK (1), VAL (1))
EQUIVALENCE (BLOCK (65), INT (1)) Type 2
Mixed integers and real. Used to store dimension
information for cleaning routines.
Record :- ; 16 records per block VAL
IHOR
IFE(2)
IFE(2)
XD(1)
XD(2)
YD ( 2 )
YD(1)
YD(2)
EOD :- VAL = -1E28
Packing:- DIMENSION BLOCK (128), DT2 (8, 16) IDT2 (8, 16)
EQUIVALENCE (BLOCK (1), DT2 (1, 2)), (BLOCK (1),
IDT2 (2, 1))
- 115 -
Type 3
Cross reference for dimensions and data points.
Record :- Record number
Length of record
Number of data points, end 1
Number of data points, end 2
Number of dimensions, end 1
Number of dimensions, end 2
Address of the other dimen-
sion symbols are negative
for end 1 and positive for
end 2 of the other symbols
INUM
NVAR
IDT(1)
IDT(2)
IDIM(2)"
IDIM(2)
Address of
data end 1
Address of
dimensions end 1
Address of
data end 2
Address of
dimensions end 2
Variable number of records per block, all integer.
E.O.D INUM = 0
Packing:- Starts with first word of first block and fills
up file sequentially, spanning block boundaries.
Type 4
This is the basic data structure for graphical entities,
consisting of 4 variables per record.
Record :- I, X, Y, LABEL ; 30 records per block
E.O.D. :- I = 0
Packing:- DIMENSION BLOCK (128), I(30), X(30), Y(30), LABEL(30)
DIMENSION BR(4),(LBR(2)
EQUIVALENCE (BLOCK (1), Ian, (BLOCK (31), X(1))
EQUIVALENCE (BLOCK (61), Y(1)), (BLOCK (91), LABEL (I))
EQUIVALENCE (BLOCK (121), BR(1)) , (BLOCK (125), LBR(I))
EQUIVALENCE (BLOCK (128), LEND)
X( 63 )
Y(63)
IEND
- 116 -
1(30)
.X(30)
Y(30)
LABEL (30)
XMIN YMIN XMAX YMAX LBR(1). LBR(2)
2,- ......-- ...--- .- „- IEND
)
I codes, Packed as -below, integers
X coordinate, real variables
Y coordinate, real variables
Unique label given to each record
End of data flag
E.O.D. :- Flag gives position of end of data if = 0
then not in this block.
Type 5
Two real variables.
Record :- X, Y ; 63 records per block
E.O.D. :- X = - 1E28 Packing:- DIMENSION BLOCK (1 98), X(63), Y(63)
EQUIVALENCE (BLOCK (1), X(1)), (BLOCK (64), Y(1))
EQUIVALENCE (BLOCK (128), IEND)
If the block contains the end of data, then
IEND = record number of the E.O.D., otherwise
IEND =
- 117 -
I Code Packing
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Variable ,Bits
Range
LTYPE
15, 14
O - 3
IPN
13, 12
O - 3
MBIT
11
O - 1
ICN
10
O - 1
IYF
9
O - 1
IXF
8
O - 1
LEVNUM
7 - 4
1 - 15
I 3 - 0
O - 15
I Codes
0 End of data
1 Start of a line
2 Point on a line
3 Symbol bounding rectangle
4 Start of a symbol
5 Coordinate data of a symbol, mirrorable
and rotatable
6 Non-coordinate symbol data
7 Plotter window block
first record PTX, PTY
second record PTSCL, -
8 Curve fitted point
9 Deleted entry
10 Centre of gravity
- 118 -
Symbol Formats
All symbols have the same structure.
X
NSYM NENTS
3 . XMIN YMIN
3
XMAX YMAX
5 5
6 6
NYSM - Symbol number
NENTS - Number of records in the symbol
XMIN, YMIN XMAX, YMAX Symbol bounding rectangle
Symbol Numbers
NYSM SYMBOL
1 Complete circles
2 Arcs of circles
3 Alphanumerics
4 Dimension lines
5 Angular dimensions
Circles
from start to end.
X
Always go clockwise
I
4 1 or 2 6
3 XMIN YMIN
3 XMAX YMAX
5 1 START
5 / CENTRE
5 END
119 -
Alphanumerics
X I 4 3.0 FNENTS
3 XMIN YMIN
3 XMAX YMAX
5 X1 Yl
5 • X2 Y2
6 ANSIZ FNCHAR
6 AL1 .
6 . .
ANSIZ = Height of the alphanumerics
FNCHAR = Number of characters
X2, Y2
Xl, Y1
Dimension Lines
X I
4 4.0 8.0
3 XMIN YMIN
3 XMAX YMAX
6 SIZE HOR
6 FNCHAR FDEC
5 X1 Y1
5 X2 Y2
5 X3 Y3
X2, Y2) Xl, Y1
SIZE
X3, Y3
•
- 120 -
SIZE = Number typed in
HOR = -1 for vertical arrow and numbers
= 0 for skew 11
= 1 for horizontal fi 11
FNCHAR, FDEC = Format with which SIZE was typed.
Angular dimensions
•
X I
4 5.0 8.0
3 XMIN YMIN
3 XMAX YMAX
6 ANGLE
6 FNCHAR FDEC
5 X1 Yl
5 X2 Y2
5 X3 Y3.
- 121 -
APPENDIX II
Component Statistics and Coding System
The code adopted consists of an 11 digit number,
• arranged in the following manner.
•
DIGIT PARAMETER
1st or Most Significant Maximum external diameter
2nd Number of operations
3rd Length
4th Number of external diameters
5th Number of internal diameters
6th Material
7th External features
8th Internal features
9th Machine
10th Internal shape
11th External shape
- 122 -
Component Statistics
all operation times.
Frequency
Represents sum total of
Time
1.55 50
4.65 19
7.75 6
10.85 8
13.95 3
17.05 2
20.15 1
23.25 1
26.35 0
29.45 0
32.55 1
35.65 1
38.75 0
41.85 0
44.95 2
48.05 0
51.15 0
54.25 0
57.35 0
60.45 1
There were 95 points, reduced to 20 classes with a class
interval of 3.1 minutes.
(
51.00 n CYCLE TIMES
43.35
34.85
N
26.35
17.85
9.35 .
.85 I t
8.7 18.0 i 1 27.3 36.3
% 45.6 54.9
r--1 i 61.0
- 124 -
Length to Diameter Ratio
Overall length of component divided by the maximum
diameter.
L/D Frequency
0.223 16
0.671 15
1.119 12
1.56 4
2.01 2
2.46 10
2.91 2
3.35 2
3.80 3
4.25 9
4.70 1
5.14 0
5.59 0
6.04 0
6.49 4
6.94 1
7.38 0
7.83 0
8.28 1
8.73 3
The class interval is 0.44 with 85 points.
16.0
LENGTH/DIAMETER RATIO
13.6
10.9
8.26-
5.60-
2.93 -
0.26
1.26 2.60 3.94 5.28 6.62 7.96
- 126 -
Maximum Diameter
Overall diameter of component in mm.
Diameter Frequency
13.1 36
39.3 13
65.5 12
91.7 6
117.9 4
144.1 3
170.3 2
196.5 2
222.7 0
248.9 1
275.1 0
301.3 0
327.5 2
353.7 1
379.9 2
406.1 1
432.3 0
458.5 1
484.7 0
510.9 1
The number of points is 87, reduced to 20 classes, with
a class interval of 26.2.
37.0
31.4
25.2
19.1
■ ......
MAXIMUM DIAMETER
12.9
6.7
0.6 i- r-------1 t t t I -_-_, r--Tt r--7
i
73.83
152.2
230.6
309.0
387.4
465.8 523.3
- 128 -
Internal Shape
Number
0
Proportion of total
0.21
Meaning
Without bore or blind hole
' Rectilinear
• Taper turned 725 mm
3 Contour turned 725 mm
5
6
7
8
Rectilinear
Taper Turned
Contour Turned
Rectilinear
Taper Turned
9 Contour Turned
cA •,--1 • w S4 C:1 C-t -P • O >~ 0 A CD
0 H 0 •H < U 3
to (1) ••-( S-4 S.-1 • O -P
• (1) 0
H 0 H C.) 0 < a) -P
0.68
0.09
0.01 0.0
0.0
0.0
0.01
0.0
0.0
1
2
- I
- 129 -
Internal Features
Meaning Proportion Number
0
1
2
NONE
THREADS
GROOVES < 25 mm WIDE
of total
0.63
0.13
0.05
3 RECESSED 0.02 BORES > 25 mm
1 + 2 0.13
5 1 + 3 0.02
6 2 + 3 0.02
7 1 + 2 +3 0.0
8 .0 9 0.0
•
- 130 -
Number of Internal Diameters
Proportion Number 5 0.05 4 0.02 3 0.30 2 0.20 1 0.22 0 0.21
- 131 -
External Features
Meaning Proportion Number 0 NONE 0.40 1 THREADS 0.20
FUNCTIONAL 0.20 GROOVE
3 RECESS 0.01 TURNING
4 1 + 2 0.16 5 1 + 3 0.00 6 2 + 3 0.03 7 1 + 2 + 3 0.0 8 9
- 132 -
Number of External Diameters
Number Proportion of Total
6 0.02
5 0.01
4 0.06
3 0.23
2 0.31
1 0.24
0 0.13
- 133 -
External Shape
Rotational
Number
0
1
2
3
4
5
6
7
8
9
Meaning
Rectilinear
• Taper turned > 25 mm Face
Contour turned > 25 mm Face
Rectilinear 0
H 'H Tapered
b0 4-3 .v-1
cnv-1 0 X
Rectilinear
Tapered
Contoured
Proportion . of total
0.78
0.03
Contoured
0.02
0.09
0.00
0.00
0.07
0.01
0.00
0.00
134 -
Number of Operations
Proportion of Total Number
5 0.01
4 0.03
3 0.05
2 0.45
1 0.46
7 135 -
Material Groupings
Number Proportion of Total Material
Unrecorded 0 0.11
Cast Iron 1 0.13
Mild Steel 2 0.29
Carbon Steel 3 0.17
Alloy Steels 4 0.12
Aluminium and Alloys 5 0.11
Brass 6 0.06
Magnesium 7 0.02
- 136 -
Machine Groupings
Machine Number Proportion of Total
No. 4 PREOPT 9 0.03
No. 8 PREOPT 8 0.01
No. 2 FLASH CAP 7 0.01
No. 5 SENIOR 6 0.04
3M AUTO 5
0.22
3A AUTO 4 0.03
BM 50/2 3 0.31
BM 75/250 2 0.19
BM 350 1 0.05
2D AUTO 0 0.11
- 137 -
APPENDIX III
Geometrical Elements
Areas
The formulae for calculating the contribution of each
element has a built in sign convention.
Straight lines
x
h = yr14.1 - yn
b = xn+1 - xn
aix = xn h + bh 7—
if yn+.1 > y, then answer is taken as negative.
y
b = yn+1 Yn
h = x n+1 xn h a. = b + yn
h iy 2
x
if xn+1 xn' then answer is negative.
Circles
All arcs are restricted to only one quadrant.
+ 1,k
xn+l'Yn+1
xn,Yn
xn+1 'Yn+1 1:,k
x ,y n n
a. iy
- 138 -
By taking a typical element and integrating;
a1 plk jr2 - (y-k)2 . -
x 2
r2 tan Y_Iy-k)2
Y.7 Yn+11 + t (y-]
Y=5/11
a degenerate case occurs when
r2 = (y-k)2, at which point the tangent is Tr/2, with an
appropriate sign depending on which quadrant the arc is in.
[(-2„ ( + aiy 2 - (x-'1)
2
-2
tan-1( x-1 /c/r2 - (x-1)2
x=xn-l-h
Total Area
For the whole body
n AT = or a .
iy 1=1
the sign convention will then yield the enclosed area.
2
+ (x-1) K=Y. n
- 139 -
Centre of Gravity .
xn+f'Yn+1
Taking moments about the x axis,
x=x+1 2
YGI . aiy = Lt n Y— ox 2
Sx+0 x=x
hence
2 1 1.13
2h bh
hy w - 'GI a. 6 + yn 2 + 2n iy
where h = xn+1 - x n
b = yn4.1 - yn
The sign convention is applied only to the area.
x
h = yn.1.1 yn
b = xn+1 - x n
2 = 1 b2h bh xn h
xGi a. ' 6— "n 2 + 2- 1 X
- r2 2. tan -1
(.\,/ r2 - (y-k )2
y-k
- 140 -
Circles
a. + + 1,k
xGi
X =1
r2 (y-k) (y-k)
3
Gi 2 a 3 ix
+ t (y-k) (± /r2
- (y-k)2 )
yn+h
+ 2. (y-}(- )1
+ 1,k
YG±T a x
Yn
3 1 YGi - 2 a.
- (x-t) r
2 (x3t)
+ k (x-t) (i r2 (x-t)2)
- k r2 tan x-1 -1
+ k2 (x--R,) +1
For the whole body, moments about each axis gives
n
Nr •E (y . . AT • -GT = 1+1 Gi a ly)
n AT
. xGT = E(X..a ) Gx
i+1 I i