"Fossies" - the Fresh Open Source Software Archive

Member "brlcad-7.32.4/doc/mged/t1.tex" (29 Jul 2021, 15812 Bytes) of package /linux/misc/brlcad-7.32.4.tar.bz2:


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{TUTORIALS}
    2 Eleven tutorials with illustrations are provided to give the user a
    3 step-by-step walk-through of the basic capabilities of the graphics
    4 editor. Standard login and logout procedures should be followed prior to
    5 beginning and after ending the tutorials.
    6 
    7 Tutorial one describes accessing of each of the MGED states.
    8 Tutorials two through six describe the use of
    9 {\bf SOL EDIT}
   10 (solid edit) to alter the shapes of several primitives (solids).
   11 Tutorials seven and eight describe the use of
   12 {\bf OBJ EDIT}
   13 (object edit) to alter the shape of objects (which are made of other objects
   14 and ultimately solids).
   15 Tutorial nine describes the use of
   16 {\bf OBJ PATH}
   17 (object matrix selection) control the extent of the effects of an object edit.
   18 Tutorial ten describes the use of the viewing functions.
   19 Tutorial eleven describes the construction of an object from solids and
   20 other objects.
   21 
   22 Each of the tutorials will use the solids contained the MGED database called
   23 ``prim.g''.
   24 These can be obtained by making a copy of ``db/prim.g''
   25 from the BRL-CAD Package distribution tree.  It is important to make
   26 a copy of the database and work with that, rather than using the
   27 supplied one.  Changes made during the editing process are written
   28 to the database when they are {\sl accepted}.
   29 
   30 The first tutorial shows a sample invocation dialogue.  All other
   31 tutorials start at the first MGED prompt ({\tt mged> }). If the user
   32 wishes to continue from one tutorial to the next without leaving MGED, issue
   33 the {\bf press reset} command before starting each tutorial.
   34 User input will be shown in an
   35 {\em emphasized} font, and MGED output will appear in a {\tt typewriter}
   36 font.  If the user input is shown on the same line as a prompt, the
   37 input is literal.  If the user input is shown on a line by itself,
   38 it is a directive, and is entered in an appropriate fashion.
   39 
   40 \section{States Within the Edit Process}
   41 
   42 In this tutorial, the user will invoke MGED on a file called ``prim.g'';
   43 attach a {\sl display manager\/}; explore the various MGED states;
   44 and finally, exit MGED.  A MGED database has a treelike structure.  The
   45 leaves are the individual solids, and the other nodes are groupings
   46 of those solids.  The solid editing functions are concerned with defining
   47 and modifying the leaves, and the object editing functions operate
   48 on groups, which are Boolean combinations of solids.  One useful mental
   49 model is to envision solid editing as operating directly on a leaf and
   50 object editing as operating on the arc connecting a pair of nodes.  The
   51 object edit will affect everything below the selected arc (this is why
   52 there is an additional state transition when object editing).
   53 
   54 \subsection{Viewing State}
   55 
   56 The first task is to invoke MGED.  This tutorial will assume the user
   57 has a copy of the ``prim.g'' database in the current directory.
   58 
   59 \noindent
   60 {\tt \$ }{\em mged prim.g}\\
   61 {\tt BRL-CAD Release 3.0 Graphics Editor (MGED) Compilation 82}\\
   62 {\tt Thu Sep 22 08:08:39 EDT 1988}\\
   63 {\tt mike@video.brl.mil:/cad/.mged.4d2}\\
   64 
   65 \noindent
   66 {\tt attach (nu|tek|tek4109|ps|plot|sgi)[nu]? }{\em sgi}\\
   67 {\tt ATTACHING sgi (SGI 4d)}\\
   68 {\tt Primitive Objects (units=mm)}\\
   69 {\tt mged> }\\
   70 
   71 The first three lines give information about which version of MGED is running,
   72 when it was compiled, and who compiled it.  The next line is the display
   73 manager attach prompt.  This prompt provides a list of available display
   74 managers, then shows what the default will be (selected if the user answers
   75 with a carriage return).  In this case, the Silicon Graphics 4d display
   76 manager was selected, as is noted by the following line.
   77 Next the title of the database and
   78 the unit of measurement used in the database are printed,
   79 and finally, the first prompt is issued.
   80 At this point MGED has loaded ``prim.g''; attached the SGI display;
   81 and is awaiting commands.  Attaching a display also causes what
   82 is known as the MGED {\sl faceplate} to be drawn on the graphics display.
   83 
   84 The faceplate has several features of interest.  In the upper left corner
   85 of the display, is a box which always shows the current MGED {\sl state}.
   86 This can be one of six states:  {\bf VIEWING}, {\bf SOL PICK},
   87 {\bf SOL EDIT}, {\bf OBJ PICK}, {\bf OBJ PATH}, or {\bf OBJ EDIT}.
   88 
   89 Immediately below, is the menu area.  The only menu item initially shown is
   90 one labeled {\bf BUTTON MENU}.  This menu item toggles the display of the
   91 button menu entries when {\sl selected} (more on selection later).
   92 
   93 At the bottom of the display are two status lines.  The first line
   94 contains information about the current view.
   95 The entry labeled {\bf cent=} gives the {\sl model space} coordinates
   96 of the dot in the center of the display.
   97 The entry labeled {\bf sz=} reflects the current size in model units of
   98 the {\sl viewing cube}.  The viewing cube is a mathematical construct
   99 centered on the dot in the center of the display.  The {\bf ang=}
  100 display shows the current rate of rotation in each of the three axes.
  101 The bottom line is used for several kinds of information.
  102 In the {\bf VIEWING} state, it displays the title of the database.
  103 
  104 \noindent
  105 {\tt mged>\ }{\em e arb8}\\
  106 {\tt vectorized in 0 sec}\\
  107 {\tt mged>\ }{\em size 12}\\
  108 {\tt mged> }\\
  109 
  110 \begin{figure}
  111 \centering \includegraphics{t1-top-vw.ps}
  112 \caption{``arb8'' Top View.}
  113 \label{t1-top-vw}
  114 \end{figure}
  115 
  116 The {\bf e} command causes the named object(s) -- a solid named ``arb8''
  117 in this case
  118 -- to be displayed, and the {\bf size} command sets the size of the
  119 viewing cube. Figure \ref{t1-top-vw} shows what the display currently
  120 looks like.  In this view, the X-axis is to the right, the Y-axis points
  121 up, and the Z-axis is perpendicular to (poking out of) the screen.
  122 
  123 \noindent
  124 {\em Twist the {\bf Y ROT} knob clockwise and back.}\\
  125 {\em Twist the {\bf X ROT} knob counterclockwise and back.}\\
  126 
  127 These knobs, along with the {\bf Z ROT} knob, rotate the viewing cube.
  128 Use of the rotation
  129 knobs allows the user to view the model from any orientation.
  130 Turning a knob clockwise causes a rotation in the positive direction,
  131 while turning a knob counterclockwise causes a negative rotation
  132 (right-hand rule).  The knobs are rate based, not position based;
  133 once a rotation has been started, it will continue until the
  134 knob is returned to zero (or the {\bf zeroknobs} button is pressed).
  135 Rotations are about the viewing cube (screen) axes, not the model axes.
  136 Systems without knobs can use the {\bf knob} command.
  137 
  138 \noindent
  139 {\em Move the mouse (or pen) until the cursor is in the {\bf BUTTON MENU}
  140 block and then press the middle mouse button (depress the pen).}\\
  141 
  142 \begin{figure}
  143 \centering \includegraphics{t1-rot-vw.ps}
  144 \caption{``arb8'' Rotated View.}
  145 \label{t1-rot-vw}
  146 \end{figure}
  147 
  148 Pressing the middle mouse button (or the pen) {\sl selects} something.
  149 When the cursor is inside the menu area, a selection
  150 causes the event described by the menu item to occur.
  151 Selecting {\bf BUTTON MENU} causes the button menu to appear on the left
  152 side of the screen. The {\bf BUTTON MENU} menu item is
  153 a toggle; subsequent selection of this item will cause the button menu
  154 to disappear.
  155 Figure \ref{t1-rot-vw} shows the new display.
  156 
  157 \noindent
  158 {\em Move the cursor from the menu area to a point near the
  159 upper left corner of the solid and select it (press the center mouse
  160 button).}\\
  161 
  162 In the {\bf VIEWING} state, making a selection while outside of the menu
  163 area will move the selected point to the center of the display.  Look
  164 carefully at the center of the display; the point just selected is now
  165 located at the center dot. Use the {\bf center} command to reset any
  166 translations made with the mouse.
  167 
  168 \noindent
  169 {\tt mged> }{\em center 0 0 0}\\
  170 {\tt mged> }\\
  171 
  172 From the {\bf VIEWING} state, the user will normally transition to either the
  173 {\bf SOL PICK} or {\bf OBJ PICK} state.
  174 The {\bf SOL PICK} state is selected by:
  175 \begin{itemize}
  176 \item Selecting the {\bf Solid Illum} button menu entry, or,
  177 \item Pressing the {\bf sill} button (this button may be labeled
  178 using some variation of ``Solid Illum''), or,
  179 \item Typing {\bf press sill}.
  180 \end{itemize}
  181 Similar entries ({\bf Object Illum}) and ({\bf oill}) exist for transitioning
  182 into the {\bf OBJ PICK} state.
  183 In general, the {\bf press} command is the basic mechanism (type
  184 {\bf press help} for a list of available commands).  Most of the press
  185 commands have been mapped onto a button box if it is available,
  186  and some of the
  187 most common are also mapped into the {\bf BUTTON MENU} so they can
  188 accessed without letting go of the mouse.
  189 
  190 \subsection{Solid Pick State}
  191 
  192 \noindent
  193 {\em Place MGED in the {\bf SOL PICK} state using one of the
  194 above mechanisms.}\\
  195 
  196 \begin{figure}
  197 \centering \includegraphics{t1-sol-pk.ps}
  198 \caption{MGED In Solid Pick State.}
  199 \label{t1-sol-pk}
  200 \end{figure}
  201 
  202 Upon entering the {\bf SOL PICK} state, the display will look similar to
  203 Figure \ref{t1-sol-pk}.  The {\bf SOL PICK} state used to select which
  204 of the displayed solids is to be edited.  Note that the color of the
  205 solid has changed from red to white.  The screen is divided into as many
  206 horizontal zones as there are solids displayed, and each zone is
  207 assigned to one solid.  As the mouse is moved vertically through each
  208 zone, the corresponding solid is highlighted (``illuminated'') by
  209 drawing it in white.   In this instance, there is only one solid being
  210 displayed, so this state is relatively uninteresting.
  211 If the system being used has no mouse, there is no reason to enter the
  212 {\bf SOL PICK} state.  The user will instead transition directly to
  213 the {\bf SOL EDIT} state using the {\bf sed} command.
  214 
  215 \noindent
  216 {\tt mged> }{\em press reject}\\
  217 {\tt mged> }{\em e ellg}\\
  218 {\tt mged> }\\
  219 {\em Press the {\bf sill} button}\\
  220 
  221 \begin{figure}
  222 \centering \includegraphics{t1-2s-pk.ps}
  223 \caption{MGED In Solid Pick with Two Solids.}
  224 \label{t1-2s-pk}
  225 \end{figure}
  226 
  227 Note that the first action taken was to {\sl reject} the edit.  Any time MGED
  228 is not in the {\bf VIEWING} state, a {\sl reject} command (via
  229 {\bf press}, button, or mouse) discards all editing changes accumulated
  230 since the last transition out of the {\bf VIEWING} state, and places
  231 MGED in the {\bf VIEWING} state.
  232 The display should now look similar to Figure \ref{t1-2s-pk}.
  233 Notice that one solid is white and
  234 the name of that solid is displayed in the upper left corner of the
  235 display, as well as in the bottom status line. The solid to be edited is
  236 selected by moving the mouse up and down until the zone corresponding to
  237 the desired solid is reached. Once the appropriate zone is reached, select it.
  238 This selects a solid, and once a solid is selected,
  239 MGED enters the {\bf SOL EDIT} state.
  240 
  241 \subsection{Solid Edit State}
  242 
  243 \noindent
  244 {\tt mged> }{\em d ellg}\\
  245 {\tt mged> }\\
  246 {\em Select the solid called ``arb8''.}\\
  247 
  248 \begin{figure}
  249 \centering \includegraphics{t1-sol-ed.ps}
  250 \caption{Solid Edit State.}
  251 \label{t1-sol-ed}
  252 \end{figure}
  253 
  254 The {\bf d} command removes something from the display.  In this
  255 case, the solid ``ellg'' was removed to reduce clutter.
  256 The display should now look like Figure \ref{t1-sol-ed}.
  257 When MGED enters the solid edit state, the following occurs:
  258 \begin{itemize}
  259 \item The solid selected for editing remains illuminated,
  260 \item The solid is labeled,
  261 \item The coordinates (or dimensions) associated with the labels,
  262 and other information is displayed to the right of the menu area,.
  263 \item If the solid is a member of one or more groups, a similar set
  264 of coordinates called the {\sl PATH} is displayed immediately below
  265 the first set of coordinates,
  266 \item The {\bf *SOLID EDIT*} menu is displayed, and,
  267 \item A solid specific edit menu (in this case the {\bf ARB MENU})
  268 is displayed.
  269 \end{itemize}
  270 
  271 The {\bf *SOLID EDIT*} menu provides access to generic operations (translation, rotation
  272 and scaling) common to all solids.
  273 The solid specific edit menu is a list of solid type specific editing operations.
  274 Selecting one of the solid specific edit menus causes a submenu with solid type specific
  275 choices to be displayed.  To remove this submenu, select either the
  276 {\bf RETURN} item in the submenu, or the {\bf edit menu} item in the
  277 {\bf *SOLID EDIT*} menu.
  278 
  279 It is in this state that the solid is altered to meet the modeler's
  280 requirements. The shape, positioning, and orientation of the solid is
  281 changed using numeric keyboard input, positioning of the mouse, or by
  282 use of the knobs.  Once the solid has been altered, the edit is
  283 either accepted or rejected.  Accepting the edit causes all changes
  284 made to be written to the database; rejecting the edit ``throws them
  285 away''. Either operation will terminate the edit session and return MGED
  286 to the {\bf VIEWING} state.
  287 
  288 \noindent
  289 {\em Reject the edit.}\\
  290 
  291 \subsection{Object Pick State}
  292 
  293 \noindent
  294 {\em Place MGED in the {\bf OBJ PICK} state.}\\
  295 
  296 \begin{figure}
  297 \centering \includegraphics{t1-obj-pk.ps}
  298 \caption{Object Pick State.}
  299 \label{t1-obj-pk}
  300 \end{figure}
  301 
  302 Figure \ref{t1-obj-pk} shows what the display looks like when in the
  303 {\bf OBJ PICK} state. As with the {\bf SOL PICK} state, a single solid is
  304 selected.  This solid becomes the reference solid for the object edit.
  305 In the {\bf OBJ PICK} state, the solid will be shown
  306 as a member of one or more objects.  Less obvious is the fact that the
  307 local axes associated with the selected solid are the axes used for the
  308 entire object during the object edit.
  309 
  310 \subsection{Object Path State}
  311 
  312 \noindent
  313 {\em Select ``arb8''.}\\
  314 
  315 \begin{figure}
  316 \centering \includegraphics{t1-obj-ph.ps}
  317 \caption{Object Path Selection State.}
  318 \label{t1-obj-ph}
  319 \end{figure}
  320 
  321 MGED transitions into the {\bf OBJ PATH} state once a solid has been
  322 picked from {\bf OBJ PICK}. Figure \ref{t1-obj-ph} is the display in
  323 the {\bf OBJ PATH} state.  When in this state the extent of the editing
  324 operation is set.  Everything below the editing point is affected by the
  325 edit.  The editing point is shown by the {\sl MATRIX} label in the
  326 display.  It is shown as {\bf [MATRIX]} in the upper left part of the
  327 display and as {\bf \_\_MATRIX\_\_} in the second status line.  The editing
  328 point is chosen with the same mechanism used by {\bf SOL PICK} and
  329 {\bf OBJ PICK}.  This time, there is one horizontal zone for each node in
  330 the path between the root and selected leaf.  Moving the mouse up and down
  331 moves the editing point up and down in the tree.  Once again, having a
  332 simple database and only one object in view makes for a relatively
  333 uninteresting situation.
  334 
  335 \subsection{Object Edit State}
  336 
  337 \noindent
  338 {\em Select the editing point above ``arb8''.}\\
  339 
  340 \begin{figure}
  341 \centering \includegraphics{t1-obj-ed.ps}
  342 \caption{Object Edit State.}
  343 \label{t1-obj-ed}
  344 \end{figure}
  345 
  346 MGED is now in the {\bf OBJ EDIT} state and the display should look like
  347 Figure \ref{t1-obj-ed}.
  348 When MGED enters the object edit state, the following occurs:
  349 \begin{itemize}
  350 \item The reference solid remains illuminated,
  351 \item The reference solid is labeled,
  352 \item The information associated with the labels is displayed to the right
  353 of the menu area, and
  354 \item The {\bf *OBJ EDIT*} menu is displayed.
  355 \end{itemize}
  356 
  357 The {\bf OBJ EDIT} state is used to modify the
  358 Homogeneous Transform Matrix selected during the {\bf OBJ PATH} state.
  359 Permissible operations include uniform and affine scaling of the objects,
  360 as well as translation and rotation.
  361 As with the {\bf SOL EDIT} state, MGED accepts changes entered using
  362 the keyboard, mouse or knobs.
  363 
  364 This concludes the first tutorial.  Examples of the appearance of MGED
  365 in each of the six states have been given, along with some idea of what
  366 each of the states is used for.  All that remains is to reject the current
  367 edit, and exit MGED.  Strictly speaking the {\bf q} command could be entered
  368 directly, but doing so, can become a dangerous habit.
  369 
  370 \noindent
  371 {\em Select {\bf REJECT Edit} using the mouse.}\\
  372 {\em Press the {\bf reject} button.}\\
  373 {\tt mged> }{\em d arb8}\\
  374 {\tt mged> }{\em q}\\
  375 {\tt \$ }\\