## "Fossies" - the Fresh Open Source Software Archive

As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) TeX and LaTeX source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 \chapter{PERIPHERAL DEVICES}
2
3 Before we discuss the features of MGED, we will introduce
4 the hardware devices used to implement them.
5 These devices are the tools of the trade'' for the MGED user.
6 We will discuss only basic operational characteristics here.
7 Specific use of these devices will be covered in the later sections
8 on the viewing and editing features of MGED.
9
10 \section{Joystick}
11
12 The joystick is a mechanical device used to do rotations in MGED.
13 Any movement left or right rotates the display about the
14 X-axis.  Any movement up or down rotates the display
15 about the Y-axis.  When the joystick top is twisted in a clockwise or
16 counterclockwise direction, the display rotates about the Z-axis.
17 Any combination motion of the joystick will produce a combined''
18 rotation about the appropriate axes.
19 As implemented on the Vector General hardware,
20 all of these motions have a spring return to a null center position.
21
22 \section{Button Box}
23
24 The button box contains a collection of buttons.
25 On each button is a light that can be lit under program control.
26 Pressing a button sends a press'' event to MGED,
27 and results in an action occurring, or a condition being set.
28 The exact functions assigned to these buttons will be discussed
29 in the sections on viewing the display and on editing.
30
31 \subsection{Vector General Buttons}
32
33 \begin{figure}
34 \centering \includegraphics{fig-vg-buttons.ps}
35 \caption{Vector General Button Assignments}
36 \label{vg-buttons}
37 \end{figure}
38
39 \begin{figure}
40 \centering \includegraphics{fig-sgi-buttons.ps}
41 \caption{Silicon Graphics Button Assignments}
42 \label{sgi-buttons}
43 \end{figure}
44
45 % \gluein 4.5in by 4.5in, Vector General Button Assignments, vg-buttons.
46 % XXX \gluein 4.5in by 4in, Megatek Dial and Button Box, mg-buttons.
47 The Vector General has thirty-two buttons.
48 Figure \ref{vg-buttons} depicts the functions programmed
49 for each button.
50 The buttons in the shaded area are used for editing while the
51 rest are used for viewing the display.
52
53 \subsection{Megatek Buttons}
54
55 \begin{figure}[tbp]
56 \begin{tabular}{rl}
57 Button  & Function\\
58  \\
59 1       & View Mode:  Restores View \\
60         & Edit Mode:  Translation in the Object-Edit mode \\
61 2       & View Mode:  Saves View \\
62         & Edit Mode:  Translation in the Object-Edit mode \\
63 3 \\
64         & Edit Mode:  Saves the model being displayed on the screen \\
65 4       & Off:        Viewing mode \\
66         & On:         Edit mode \\
67 5       & View Mode:  Resets View \\
68         & Edit Mode:  Scaling in the Object-Edit mode \\
69 6 \\
70         & Edit Mode:  Rotation in the Object-Edit mode \\
71 7       & View Mode:  Angle/Distance Cursor \\
72         & Edit Mode:  Translation in the Object-Edit mode \\
73 8 \\
74         & Edit Mode:  Rejects display and returns to Viewing display \\
75 9       & View Mode:  Bottom View \\
76         & Edit Mode:  Scaling in the Solid-Edit mode \\
77 10      & View Mode:  Left View \\
78         & Edit Mode:  Rotation in the Solid-Edit mode \\
79 11      & View Mode:  Rear View \\
80         & Edit Mode:  Translation in the Solid-Edit mode \\
81 12      & View Mode:  90, 90 View \\
82         & Edit Mode:  Restores Edit mode menu \\
83 13      & View Mode:  Top View \\
84         & Edit Mode:  Transfers from Viewing to Solid Pick \\
85 14      & View Mode:  Right View \\
86         & Edit Mode:  Transfers from Viewing to Object Pick \\
87 15      & View Mode:  Front View \\
88  \\
89 16      & View Mode:  35/45 View
90 \end{tabular}
91 \caption{Megatek Buttons \label{mg-button-table} }
92 \end{figure}
93
94 The Megatek button box
95 is a general purpose input/output device that communicates with
96 MGED through an intelligent control unit.  The device has eight
97 rotatable knobs and 16 buttons with lights.
98 % XXX See Figure \ref{mg-buttons}.
99 The buttons'' and knobs'' of the Megateks are located in the same box.
100 There are not enough buttons to have just one assigned meaning, hence
101 most buttons have dual functions.
102 To toggle the functions of the buttons,
103 use the upper right button (toggle button).
104 When the light on this button is ON, the functions listed on the RIGHT above
105 each button is the current function.
106 When the light on the toggle'' button is OFF, the functions labeled on the
107 LEFT are then in effect.
108 The left/right meaning of these buttons is grouped generally according to
109 viewing functions on the left and editing functions on the right.
110
111 Figure \ref{mg-button-table}
112 summarizes the uses of the buttons.
113 Depressing the button switches the light on and off.  Many of these serve a
114 dual role depending upon the selected mode - viewing or editing.  The mode is
115 selected by depressing button 4.  If light 4 is off, the system is performing
116 in the viewing mode, and the commands shown in the top half of the table are
117 executed.  If light 4 is on, the system is performing in the edit mode, and
118 the commands shown in the bottom half are executed.
119
120 \subsection{Silicon Graphics Buttons}
121
122 The button box layout for the SGI Iris is given
123 in Figure \ref{sgi-buttons}.
124 Note that the right'' button shows you the right side of the
125 model, as if you were looking in from the left.
126 To achieve the customary draftsman views, this function
127 goes on the left.
128
129 The upper left button is the {\bf help} key.
130 If this button is held down, and any other button (or knob)
131 is activated, a descriptive string is displayed in the eight character
132 LED display on the button box.
133 The upper right button is used to reset all the knobs to zero.
134 This is useful to halt a runaway rotation or zoom operation.
135
136 %\begin{figure}[tbp]
137 %{\tt \begin{verbatim}
138 %          |---------|---------|---------|---------|
139 %          |         |         |         |  Zero   |
140 %          |  Help   |   ADC   | Reset   |  Knobs  |
141 %|---------|---------|---------|---------|---------|---------|
142 %|   Obj   |   Obj   |   Obj   |   Obj   |         |  Save   |
143 %|  Scale  | ScaleX  | ScaleY  | ScaleZ  | empty   |  View   |
144 %|---------|---------|---------|---------|---------|---------|
145 %|   Obj   |   Obj   |   Obj   |   Obj   |         | Restore |
146 %| TransX  | TransY  | TransXY | Rotate  | empty   |  View   |
147 %|---------|---------|---------|---------|---------|---------|
148 %|  Solid  |  Solid  |  Solid  |  Solid  |   Obj   | Solid   |
149 %|  Trans  |   Rot   |  Scale  |  Menu   |  Pick   | Pick    |
150 %|---------|---------|---------|---------|---------|---------|
151 %| REJECT  | Bottom  |  Top    |  Rear   |  90,90  | ACCEPT  |
152 %|---------|---------|---------|---------|---------|---------|
153 %          |  Right  |  Front  |  Left   |  35,25  |
154 %          |---------|---------|---------|---------|
155 %\end{verbatim} }
156 %\caption{Silicon Graphics Button Layout \label{XXsgi-buttons} }
157 %\end{figure}
158
159 \section{Knobs (Dials)}
160
161 The knobs (or control dials) are used to send digital information
162 to the computer.
163 As a knob is turned, a succession of numbers are available for
164 use by the computer.
165 The knobs can be used to rotate a displayed object about the x, y, or z
166 axis, translate the object along the x or y axis, and change the size of the
167 view.  Action performed by these knobs is continuous and is initiated by
168 turning the knob in the proper direction and terminated by turning the knob
169 in the opposite direction.
170
171 \subsection{Vector General Knobs}
172
173 \begin{figure}
174 \centering \includegraphics{fig-vg-knobs.ps}
175 \caption{Vector General Knob Assignments}
176 \label{vg-knobs}
177 \end{figure}
178
179 \begin{figure}
180 \centering \includegraphics{fig-sgi-knobs.ps}
181 \caption{Silicon Graphics Knob Assignments}
182 \label{sgi-knobs}
183 \end{figure}
184
185 % \gluein 4.5in by 3.5in, Vector General Knobs, vg-knobs.
186 % \gluein 4.5in by 3.5in, Silicon Graphics Knobs, sgi-knobs.
187 Figure \ref{vg-knobs} depicts the functions assigned to each of the ten knobs.
188 The exact functions of each of these knobs will be discussed in
189 the angle distance cursor section and in the viewing features section.
190
191 \subsection{Megatek Knobs}
192
193 The buttons'' and knobs'' of the Megateks are located in the same box.
194 % XXX as shown in Figure \ref{mg-buttons}.
195 There are not enough knobs to have ONE assigned meaning, hence
196 three knobs have dual functions.
197 The second function of the first three knobs is only in effect when
198 the angle-distance cursor (ADC) is on the screen.
199
200 \subsection{Silicon Graphics Knobs}
201
202 Figure \ref{sgi-knobs} depicts the functions assigned to the
203 eight knobs on the Silicon Graphics knob box.
204 In normal operation, the left knobs provide rotations,
205 and the right knobs provide translations and zooming.
206 When the angle/distance cursor is activated, some of the
207 knobs are redefined.
208
209 \section{Mouse or Data Tablet}
210
211 Moving the mouse or the data tablet pen'' causes a cursor
212 on the screen to move.
213 The screen X-Y coordinates of the cursor can be sensed by MGED
214 at any time.
215 Clicking one of the mouse buttons,
216 or depressing the tip of the pen, results in MGED receiving
218 The meaning of this mouse event depends on the current editing mode
219 and which portion of the display faceplate that the cursor is located
220 in.
221
222 Below is a list of some of the functions the mouse is used for in MGED;
223 \begin{itemize}
224 \item
225 Selecting editing menus, edit functions (move faces, move edges
226 etc.) and viewing functions (selected from main edit menu); move
227 pointer to appropriate edit function and press center mouse button.
228 \item
229 Pointing functions; interactively positioning solid primitive
230 relative to other solids with positioning or size update being
231 displayed at the same time, position pointer where required and click
232 center mouse button.
233 \item
234 Scaling of view size; enlarge or reduce for a more detailed view of
235 object, left button shrinks view size, right button enlarges view
236 size.
237 \item
238 During the solid or object illuminate phase of editing,
239 the screen is divided into
240 invisible horizontal sections.
241 The available selections are scanned by moving the mouse up and down.
242 \item
243 When MGED is is the viewing state,
244 and a mouse event is received which is not in the menu area of the faceplate,
245 the point at which the cursor is pointing at will be translated to become
246 the center of the current view.
247 By pointing and clicking the center mouse button,
248 the center of the viewing cube
249 can be moved to allow close-up viewing of different areas in your
250 model.
251 \end{itemize}
252
253 \subsection{Vector General Data Tablet}
254
255 Position information is entered using a pen-like stylus.
256 The distance this pen is from the tablet is important.
257 If the pen tip is within one half inch of the tablet surface, the cursor
258 location on the screen corresponds to the X,Y location of the
259 pen on the tablet.  This condition is called the near'' position.
260 If the pen is more than one half inch from the tablet surface, the
261 cursor remains located in the center of the screen.
262 When the pen is pressed against the tablet surface,
263 the pressure switch is activated and a mouse'' event
264 is sent to MGED.
265
266 \subsection{Megatek Data Tablet}
267
268 Some Megatek systems enter position data on the data tablet
269 using a pen-like stylus.
270 If the tip of the stylus is
271 within one-half inch of the surface of the tablet, a star'' corresponding
272 to this location is displayed on the display screen.  If the tip is moved
273 more than one-half inch from the surface, the position of the star remains
274 fixed.  When the stylus is pressed against the tablet surface, the pressure
275 switch is activated and a mouse'' event is sent MGED.
276
277 Other Megatek data tablets have a mouse instead of a pen.
278 This mouse has four buttons on it.
279 The yellow (top) button is used during illumination and editing just as the
280 pen on the Vector General terminals.
281 However, in the viewing mode, when pushed, the point which it was pointing
282 at will be drawn at the center of the screen.
283 The blue (bottom) button has this same function at ALL times and is used
284 to slew'' the display during editing.
285 The white (left) and the green (right) buttons on the mouse are used for
286 zooming the display at a fixed rate.
287 The white button will zoom out and the green button will zoom in.
288
289 \subsection{Silicon Graphics Mouse}
290
291 The left and right mouse buttons are used for binary (2x) zooming,
292 and the center mouse button is used for all other MGED mouse functions.
293
294 On the Silicon Graphics 3-D workstations, MGED can be run directly,
295 or it can be run under the window manager MEX.  In both cases,
296 MGED opens two windows, one outlined in white for all text interaction,
297 and one outlined in yellow for all graphics display.
298 When running MGED directly (without MEX), all mouse events are
299 sent the MGED, regardless of where the mouse is pointing.
300 In order to shift emphasis between the graphics and text windows,
301 the smaller one can be enlarged by pointing the cursor within the
302 boundaries of the smaller window, and pressing the center button.
303 This enlarges that window, and reduces the size of the other window.
304
305 When MEX is running, it is necessary to follow the MEX convention of
306 moving the cursor into the desired window, and clicking the right mouse
307 button, to attach'' all input to that window.
308 This has the unfortunate consequence of requiring a lot of extra
309 mouse clicking, because the graphics window needs to be attached
310 when using the buttons, knobs, and mouse, while the text window
311 needs to be attached in order to enter keyboard commands.
312
313 On the Silicon Graphics 4-D workstations running 4Sight,
314 mouse events are sent to MGED only when the cursor is within the
315 boundaries of the MGED graphics window.
316
317 \subsection{Sun Workstation Mouse}
318
319 On the Sun workstation, MGED must be run in a {\bf suntools} window.
320 The main consequence of this is that mouse events are sent to MGED
321 only when the cursor is within the boundaries of the MGED graphics window
322 on the screen.
323 The left and right mouse buttons are used for binary (2x) zooming,
324 and the center mouse button is used for all other MGED mouse functions.
325
326 \section{Keyboard}
327
328 The keyboard is used to issue commands and supply parameters to MGED.
329 It is also used to login and logout of the UNIX system, and to
330 run other UNIX programs.
331 All characters typed on the keyboard,
332 with the exception of the user's password, are displayed (echoed) on the
333 monitor.
334 In this text, all input typed by the user is
335 shown in {\em italics}, while all literal MGED output
336 is shown in {\tt typewriter font}.
337 All entries are
338 terminated by depressing the RETURN key.
339 This action immediately precedes the execution of the directive.
340 In most cases, lower case letters
341 must be used.  A space must be used between the command and its
342 arguments.
343 Embedded blanks are not allowed.
344 Entering Control/H causes cursor to backspace and erase entered
345 information.
346 An MGED command is interrupted by entering Control/C.
347 End-of-File is sent to MGED by entering Control/D.
348 The graphics editor displays the prompt
349 \begin{verbatim}
350     mged>
351 \end{verbatim}
352 on the display whenever it is ready to accept a command from the keyboard.
353
354 \chapter{OPERATING INSTRUCTIONS}
355
356 \section{Entering the Graphics Editor}
357
358 Type {\em mged filename}, e.g.:
359 \begin{verbatim}
360      mged s_axle.g
361      mged shaft.g
362      mged fred.g
363 \end{verbatim}
364 where the filename is the name of the UNIX file in which
365 your object description data is stored.
366 It is conventional that the
367 extension .g'' on the filename
368 signifies a graphics file, and is a good practice, but is not required.
369 If the named database does not already exist,
370 MGED will ask if it should create a new database.
372
373 {\tt \begin{verse}
374 \% {\em mged new.g} \\
375 BRL-CAD Release 3.0 Graphics Editor (MGED) \\
376 \ \ \ \ Tue Sep 6 02:52:55 EDT 1988 \\
377 \ \ \ \ mike@video:/cad/mged.4d \\
378 new.g: No such file or directory \\
379 Create new database (y|n)[n]? {\em y} \\
380 attach (nu|tek|tek4109|ps|plot|sgi)[nu]? {\em sgi} \\
381 ATTACHING sgi (SGI 4d) \\
382 Untitled MGED Database (units=mm) \\
383 mged>
384 \end{verse} }
385 Here, the {\em italic} type indicates the user's response:
386 {\em y} instructs MGED to create the new database, and
387 {\em sgi} instructs MGED to attach to a window
388 on the Silicon Graphics (SGI) workstation.
389
390 Directives to the graphics editor are made by
391 \begin{enumerate}
392 \item entering information from the keyboard,
393 shown here in the text by the use of {\em italics},
394 \item using the stylus to select items from
396 \item pressing buttons and twisting knobs on the
397 function control box (press, twist).
398 \end{enumerate}
399
400 The prompt for a command is {\tt mged>}.
401
402 \subsection{Running MGED on a Silicon Graphics}
403
404 When running MGED from the console of a Silicon Graphics workstation,
405 MGED retains the text window from which it was started,
406 and opens a second window for the graphics display.
407 By default, the graphics window is quite large, and the text window
408 is rather small.
409
410 On the SGI 3-d workstations,
411 should you wish to have a large text window to scan printed output, move
412 the mouse pointer into the text window and click the center mouse button.
413 Use the reverse procedure to regain a large graphics window, i.e.,
414 move the mouse pointer into the graphics window
415 and click the center mouse button.
416
417 \subsection{Running MGED on a Tektronix}
418
419 To run MGED on the tek4014 class of terminals one needs to have TWO
420 terminals - the graphics terminal (4014 or one which emulates a 4014) and
421 another terminal to enter commands on.
422
423 The procedure is as follows:
424 \begin{enumerate}
425 \item login on the graphics terminal
426 \item enter {\em tty} to find out which terminal number has been assigned
427 \item  enter {\em sleep 32000} to put the graphics terminal in sleep mode
428 \item  login on the other terminal
429 \item  enter {\em mged file} to execute MGED
430 \item  enter {\em tek} to select the tek4014 device processor
431 \item  enter the tty value found in step 2.
432 \item  perform editing
433 \item  enter {\em q} to quit MGED
434 \item  enter control-c on the graphics terminal to end the sleep mode
435 \item  logout on both terminals
436 \end{enumerate}
437
438 Since there are no knobs or buttons on the tek4014 class of terminals, one
439 is forced to use the {\em press} and {\em knob} commands to emulate these
440 peripherals.
441 Other commands which can/should be used are:
442
443 \begin{tabular}{rl}
444 ill     & put up a desired path \\
445 center  & slew the display \\
446 size    & zoom the display \\
447 sed     & solid edit immediately
448 \end{tabular}
449
450 The main force behind the writing of a driver for the tek4014 terminals
451 was to allow the use of the Teletype 5620 terminals.
452 These graphic terminals have an internal processor and different windows
453 can be set up which represent different terminals.
454 Hence two terminals are NOT necessary.
455 The use of the Teletype 5620 terminals is then the same as the procedure
456 outlined above, except each window represents a terminal.
457
459
460 The default MGED faceplate is shown in Figure \ref{faceplate}.
461 If the BUTTON MENU area on the screen is selected with the mouse,
462 then the pop-up button menu appears, as shown in Figure \ref{buttonmenu}.
463 This menu can be very useful in reducing the amount of hand motion
464 between the mouse and the button box.
465
467
468 Modeling practices using MGED can be quite individual.  The following is a
470 style as you become more familiar with MGED.
471
472 First of all, decide how you want to represent your model, including the
473 amount of detail, types of solids and regions necessary.  Have an accurate
474 sketch or engineering drawing available, so that you can easily transfer its
475 information into the types of primitive solids necessary to create your model.
476 Where possible it is recommended to start with a large block solid and
477 subtract'' pieces from it.  In this way you avoid errors with abutting
478 faces of a collection of solids unioned'' together.
479
480 Next the solids are created using the
481 {\em make}, {\em cp}, {\em mirror} or {\em in}
482 commands.  Depending on the complexity of the model, the solids may be
483 created in the desired location or created at the origin and later
484 translated to the desired location.  Creation at the origin provides
485 an opportunity to take advantage of possible symmetries in the geometry.
486 Once all the solids are finished it is time to create the region[s],
487 which will describe (to MGED) how to combine the solids to represent
488 the model.
489
490 The region[s] are then given the desired item/air code (if this is
491 necessary, otherwise leave it as the system default value), and material
492 codes.  The regions are then put onto a group, usually for functionality only.
493 A group has no operations as such (like union [u], intersection [+] or
494 difference [-]) and is just a collection of objects for convenient naming
495 of a whole screen or collection of objects.