Comput. & Graphics. Vol. I. pp. 257-262. Pergamon Press, 1975. Printed in Great Britain
AN INTERAC'HVE DESIGN SYSTEM TO BE TAUGHT 3D GRAPHICAL-MATHEMATICAL PROCEDURES* DONALD V. STEWARDand MARIONJ. STEDWELL Nuclear Energy Division,General ElectricCompany,San Jose, California95125,U.S.A. Abstract--A designer doing 3D mechanical layout needs to mix graphical and mathematical operations, as for example: point to a 3D object displayed on the screen and use its location to compute a position to insert another object. It would be desirable to teach complex new procedures to the system by performingthe procedure once. This would free the designer to develop procedures tailored to his own needs without relying on programmingsupport. Thus new design applications could be readily generated. We are presently completing such a system.
Early ventures in interactive graphics using large computers and refresh displays were so expensive as not to be cost effective except in the defense industry, or in a very few free enterprise businesses which could write off the costs against savings on very expensive operations. Inexpensive electronics with mini-computers and storage tube displays brought the cost down by an order of magnitude and opened up new applications which could afford interactive graphics. The first commercial firms offering such equipment provided software to sell these systems for use in the 2D layout of integrated circuits and printed circuits, making 2D mechanical drawings, or 3D programming of individual machine parts. Since this market was large enough initially to sustain these firms, they showed little interest in the apparently more difficult problem of 3D mechanical layout of systems involving many parts. Now that more firms are competing for the IC-PC business and the market is beginning to show the costs of competition, more interest is beginning to be given to the potentially larger market for 3D mechanical layout. As we could not afford to wait for the vendors to supply what we needed, we set out to develop our own interactive graphics system which would enhance our ability to do mechanical layout in three-dimensions. Presently a designer must make many time-consuming sketches to determine the consequences of each decision in the layout process, i.e. see what space is available to lay in the next piece of equipment, etc. It was felt that with an interactive graphics system we could shorten from days to minutes the time between when a designer makes a decision and when he sees the consequences. Thus, the designer would be better able to maintain the momentum of his planning process and would also be able to try many more ideas in the same period of time. The resulting improvements in the design might well be expected to pary for the cost of the interactive graphics equipment. We developed our software in FORTRAN, using a Tektronix 4010 storage tube graphics terminal tied through an 8K Nova computer into a Honeywell 6000 time share system. The graphics terminal and Nova cost us *Paper presented at the Conference on Computer Graphics and Interactive Techniques, 15-17 July 1974, sponsored by the University of Colorado ComputingCenter and ACM/SIGGRAPH.
$15,000. We are now acquiring a stand-alone system with mini-computer, disc storage, graphics terminal and I/O peripherals on which to run this software. This equipment cost us about $150,000. We have determined that to do 3D mechanical layout effectively we need a system which permits the user: (1) To construct objects in 3D from: lines, arcs, various solid primatives (such as boxes, cyclinders and elbows) and other constructed objects. (2) To develop a hierarchial structure of objects, as in a parts explosion. (3) To refer to and manipulate any part in the hierarchy. (4) To store and retrieve the exact position of objects. (5) To DIE (that is, to sketch by Digitizing, then to upgrade the sketch to a final drawing by Identifying components and moving them to Explicitly located positions). (6) To compute the location of one object relative to another. (7) To perform various mathematical calculations on graphical and non-graphical data. (8) To develop his own graphical and mathematical procedures by performing the steps once while the computer memorizes them. (9) To develop and do those basic constructions normally performed by a draftsman, such as draw a line through a point at an angle with a line, or tangent to a circle, etc. To satisfy these needs, we have developed a program structure which we believe to be both very simple and very powerful. It can also be tailored to specific individual needs by the use of procedures. To discuss this structure let us consider a common task which requires the interaction between graphical objects, mathematical operations and the human designer (such an example will be considered in greater detail below). The designer identifies an object, say the shaft of a pump by pointing to it on the display with the cursor. This brings the 3D location of the reference point of the object from the data file into the 'location stack'. Now he can transfer the x, y or z coordinates into the 'arithmetic stack', where he can work with them like on a desk calculator, to compute new x, y, z coordinates of where some other object, for instance
257
258
D. V. STEWARDand M. J. STEDWELL Table 1. Command structure Operands OPERATOR STACK
OBJECT STACK
CALL IDENTIFY OBJECT
X X TRANSFER Y A or A Y
transfer between x,y,z in location stack and arithmetic stack
Z
use object use object use object
modifiedby ROTATE & STRETCH
use location~ use location)
LINE CIRCLE ARC
use 2 locations use 3 locations use 3 locations
BOX CYLINDER ELBOW
use 2 locations use 2 locations
(modifiedby RADIUS) (modifiedby RADIUS)
use 2 lines
a motor, is to be located. These new coordinates are then put back into the 'location stack'. The identification of the motor is typed into the 'object stack'. Now performing the Insert command he causes the object in the 'object stack' to be inserted at the location in the 'location stack'. The use of these stacks representing the various types of operands gives us a great amount of versatility because objects and locations can each be defined in a number of different ways, and once defined they can be used in a number of different operations. Table 1 shows the various ways objects and locations can be defined and used. An object can be defined: (1) by typing its name (Call), or (2) by pointing the cursor to it on the display (Identify Object). A location can be defined: (1) as the coordinates of the reference point of an object pointed to with the cursor (Identify Location), or (2) by typing the exact x, y, z coordinates (Explicit), or (3) by pointing to a location on the display which is then projected onto a pre-defined plane (Digitize), or (4) by transferring computed results from the arithmetic stack (Transfer AX, AY, or AZ). Once the object and location have been defined in their
MOTOR-PUMP MOTOR BASE FACE/~x L IN~
Jr/
i PUMP
SHAFT ~' BSG L " ACYL EN~£E~N[}EN°/OE~O
END END
RADIUS 0.375 EXPLICIT 0,0,0, EXPLICIT 2.5,0,0
2 SASE ~ "
i MSG''-~ SHAFT
4 FACE#~x 5 LINE~,x END END END END 6 END END
. . . . . . BASE
j
[ + cue~R
MOTOR
PUMP
Fig. 1. respective stacks, the Insert command will insert the objects at that location, or the Move command will move the specific occurance of the object to that location. Insert or Move can be modified with a Stretch along either of the 3 axes, or a Rotate about each of the 3 axes. Performing the Delete command causes the occurance of the object to be removed.
Construct and save SHAFT ACTIVATE NEW
HIERARCHY STACK
reference point of object at cursor type x,y,z project cursor onto plane
EXPLICIT DIGITIZE
INSERT MOVE ERASE
ARITHMETIC STACK
type name object at cursor
IDENTIFY LOCATION
Z
LOCATION STACK X,Y,Z
(This initiates the construction of a new object in the Active File.) (This causes a 0.375 radius, 2.5 in. long cylinder to be inserted in the Active File. The two EXPLICIT
Aninteractivedesignsystemto be taught 3Dgraphical-mathematicalprocedures CYLINDER SAVE SHAFT
commands give the end points of the cylinder.) (This transfers the object built in the Active File with reference point 0,0,0 to the Working File under the name SHAFT, where it can then be used to build objects.)
Construct and save HOUSING (The motor housing is built from a cylinder of radius 6 in. and length 12 in. in the same manner as the shaft.) Construct and save BASE ACTIVATE NEW EXPLICIT 0,0,0 STRETCH 12,5,12 BOX SAVE BASE
(This causes a unit box stretched to 12, 5 and 12in. in x, y and z respectively with its reference point at the back, left, bottom corner to be inserted into the Active File, then saved in the Working File under the name BASE.)
Construct and save MOTOR ACTIVATE NEW CALL BASE EXPLICIT 0,0,0 INSERT CALL HOUSING EXPLICIT 0,11,6 INSERT CALL SHAFT EXPLICIT 12,11,6 INSERT SAVE MOTOR
(The MOTOR is assembled from the BASE, HOUSING, and SHAFT by inserting them at the correctly located explicit locations. We here show the user assuming the responsibility for determining where the reference points of these components should be located. We will show another approach when we assemble the MOTOR and PUMP.)
Construct and save PUMP (This is done similarly to the MOTOR, but with different sizes and positions. Alternatively he could create the PUMP by stretching and moving parts of a copy of MOTOR and saving it as PUMP.) Construct MOTOR-PUMP assembly ACTIVATE .NEW CALL MOTOR EXPLICIT 0,0,0 INSERT CALL PUMP EXPLICIT 20,0,0 INSERT PROCEDURE some Function Key (This command and the I's makes the following sequence of commands up to END a procedure. Thereafter these same commands can be performed
259
260
I IDENTIFY BOTH
I IDENTIFY LOCATION
IIDENTIFY LOCATION
TRANSFER XA
TRANSFER 2XA
D. V. STEWARDand M. J. STEDWELL by EXECUTE followed by the same Function Key used to define the procedure) (The user points the cursor at some part of the PUMP. Assume he happens to be pointing somewhere in the BASE. The system does not know whether he wishes to refer to the BASE, the whole PUMP, etc., so it lists the full hierarchy of what is being pointed at and asks the user to indicate which level he wants. (See hierarchy tree in Fig. 1.) 1. PUMP 2. BASE 3. BOX 4. FACE 5. LINE 6. END (The user responds with 1 for PUMP. The system then identifies BOTH the LOCATION of the reference point of the PUMP, which it puts into the Location Stack, and the OBJECT (i.e. PUMP) which it puts a reference to into the Object Stack.) (The user points the cursor at the end of the PUMP-SHAFT. The system responds with:) 1. PUMP 2. SHAFT 3. CYLINDER 4. END (The user responds with 4 for END. The system then identifies the LOCATION of the END of the PUMPSHAFT and puts it on the top of the Location Stack, pushing the previous values on the stack down.) (The user points the cursor at the end of the MOTOR-SHAFT. The system responds with:) 1. MOTOR 2. SHAFT 3. CYLINDER 4. END (The user responds with 4 for END and the location of the END of the MOTOR-SHAFT is pushed onto the Location Stack, the earlier values being pushed down.) (Transfers the x value at the top of the Location Stack to the top of the Arithmetic Stack.) (Transfer the x value of the 2nd location on the Location Stack to the Arithmetic Stack pushing the previous value down.) (Subtract value on top of Arithmetic Stack from 2nd value on Arithmetic
261
An interactivedesignsystemto be taught 3D graphical-mathematicalprocedures Stack and replace both with the result,) TRANSFER 3XA (Transfers x value of 3rd location on Location Stack to top of Arithmetic Stack, pushing down previous result. + (Adds top two values on Arithmetic Stack and replaces them with result.) TRANSFER A3X (Transfers top of Arithmetic Stack to replace x value of 3rd location on Location Stack.) (The same is done to the y and z values in the Location Stack.) 2 POP LOCATION (Removes the top two locations from the Location Stack, leaving on the top of the Location Stack the location to which the reference point of the PUMP is to be moved.) MOVE (Moves the PUMP so that the end of the shafts touch.) END (Ends the procedure definition.) SAVE MOTOR-PUMP The structure of the files is shown in Fig. 2. AC-Iv[ FILT )[)ErT BEING dLllLT
i
H{~DER
',,,'0PI1 F:E[ OBGECT nh r h F
• HOFOF-PJ,P~
(~lt
'IOTrIp
---p___
-II.-.-
"']TRR
- -
-~i
.....
('H I Pl!'lP
H4US:N,
...... =
!!
==
HEDNER
~!Ol[iP ~ -
-
,ALL HI i %:'i ',
i
~-~LL S'AFT LRLL !.,~SE ,,EADrn - 7,,,,:
i -.,t
~
~+~
B~21:'~ prL'~l ~:NE A:~C-CIRCLE ~m:' -'11
:~LJND[R
] -..ii---i
i
]
bDL[ Lr~[!13[ k
i
Cr, kE rr~
i
HEAGEP
-tJ
"l TI?:-P i'~: ~
I [
.....
interaction between graphical and arithmetic operations to create his design. His design capability is greatly enhanced by his ability to build new objects from objects he has already built. Admittedly the process we showed in this example is a bit tedious. We have used the most fundamental operations of the machine, which we designed for their generality rather than their convenience. However, we are making provision for the user to develop convenient procedures for most any specific functions he may wish to define. For example, the PROCEDURE command above begins the definition of a sequence of commands ending with END as a procedure, which can thereafter be executed at any time by: EXECUTE followed by the same Function Key used to define the procedure. The I's label the commands which are to be inputs when the procedure is executed. All remaining commands are considered constant. Thus, when this procedure is executed it will stop for the user to point the cursor at the object to be moved, and at the location of the two objects which are used to compute the amount to be moved. (He will also be asked to select the proper level in the hierarchy each time he points the cursor.) This we call the generation and use of 'Do After Me' procedures.
Fig.2. We will illustrate how this system is used by presenting an example of building a motor and a pump, then putting them together into an assembly. We go into detail only the first time each type of step is presented. See Fig. 1. The underlined commands correspond to single function keys. Names are typed on a typewriter keyboard. The conditions and numbers in the stacks, user prompts, and the hierarchy lists will be displayed on an alphanumeric refresh scope. This simple example shows how the designer requires
,
s,'f .Z --
U,V --
E E
[
.........
i '.-E?
/
0
Fig.3.
" ~ V I E W
CENTER
262
D. V. STEWARDand M. J. STEDWELL
Figure 3 shows the geometry of the view. The designer can control the following parameters of his view: 1. the x,y,z location of the object center; 2. the u,v position on his display where the object center will be projected; 3. the 0 and ~ angles which define the direction of his eye from the object center; and 4. the eye distance of his eye from the object center. If we think of the display as a plane perpendicular to the eye line between the object center and the eye, then any point in space x,y,z is seen on the display where a line between the point and the eye intersects the display. Digitized points are projected onto a plane through the object center and perpendicular to the eye line. The use of stacks to record operators and operands makes it very easy to have the system remember a sequence of operations so they may be repeated later. The only thing the designer must do besides perform the operations once is to label those inputs which he wants to be changed each time the procedure is used. All other inputs are treated as constants. This 'Do After Me' procedure capability has not as yet been implemented. Provision will be made for a software implemented virtual
memory for swapping stacks between core and disc so that the designer need not worry about memory requirements and so that his procedures can use other procedures, etc. The 'Do After Me' procedure capability is particularly important since it is not possible for a programmer to anticipate all of the procedures that would help a designer in his work. Thus, we will give the designer the capability of building procedures as he needs them. The designer may use 'Do After Me' to make a special procedure to cover some unique design problem where he wants to vary just certain parameters in a complicated design process. It is also intended that the capabilities for 'Do After Me' procedures and for graphical-mathematical operations will allow us to develop the constructions very quickly. In summary, we have developed an interactive graphics system that is simple in construction, but very powerful in the ways that it can be used and applied to product design. The system is unique in that we have or will include: (1) 3D hierarchial object structure, (2) 'Do After Me' procedure creation (3) graphical-calculationalinteraction.