This page is currently under construction.

MGED's New Graphical User Interface




Getting Started

mged [-c] [-d display] [-h] [-r] [-x#] [-X#] [database [command]]

The -c (Classic MGED) option causes MGED to start in the style of previous versions of MGED, that is, by prompting the user to select a display manager to attach and by remaining attached to the tty. Without this option MGED will detach itself from the tty and bring up the new GUI. The -d option provides a way to specify a display string. This string is expected to be in the same format as the X DISPLAY environment variable. The -h option causes the help message to print out. The -r option causes the database to be read-only (i.e. no editing allowed). The -x and -X options provide a way for the user to specify the debug level of librt and libbu, respectively. Note that if MGED is started by redirecting stdin or stdout, MGED will not enter interactive mode. Similarly, if MGED is started with a command, that command will be executed and MGED will exit. If the user starts MGED in ''Classic'' mode, the new GUI is still available via the gui command. There can be many instances of the GUI running at the same time. Each instance of the GUI owns four display manager windows (panes) and by default each of these panes has its view initialized as follows:

PaneAzimuth and Elevation
upper left0 90
upper right35 25
lower left0 0
lower right90 0

All four panes can be displayed simultaneously, or a single large pane containing the active pane can be displayed (look in the ''Modes'' menu). The active pane is the pane that is controlled by the GUI. The active pane can be changed from the ''Settings'' menu, or by certain key or mouse button actions. Essentially, any key sequence or mouse button action that will pop up an MGED menu in the pane will cause the active pane to move to the pane wherein this action occurred. For example, alt-f will pop up the file menu and make this pane the active pane. Similarly, alt-Button1 will pop up the ''Settings'' menu and alt-Button2 will pop up the ''Modes'' menu.

The new GUI also provides ''Help on Context''. This is always available via the right mouse button (i.e. button 3). The user can right mouse click on some feature of the GUI and a message window pops up with information about the feature. This behavior works everywhere except in the drawing panes (i.e. display manager windows) where a right mouse button is bound to ''zoom 2.0''.

There are many new features and improvements in MGED providing greater access to its underlying power. The single greatest improvement to MGED is the incorporation of Tcl/Tk. Tcl (tool command language) is an interpreted command language that can be embedded into an application providing the application with an interpreter as well as a built-in command language. Tk is an extension to Tcl for building GUI's. Incorporating Tcl/Tk into MGED gives the user the ability to develop their own commands and GUI's. Other new features are: command line editing similar to tcsh, multiple display managers opened simultaneously, shareable resources among display managers, view axes, model axes, edit axes, rubber banding for zoom or raytracing, support for color schemes, frame buffer support for display managers, snap to grid for accuracy with the mouse, query rays for interrogating the geometry, and improved solid/object/combination selection from among displayed geometry.




Command Window

The main function of the command window is to allow the user to enter commands. The command window supports command line editing and command history. The two supported command line edit modes are emacs and vi. Look under File/ Preferences/Command_Line_Edit to change the edit mode.

There are also two command interpretation modes. One is where MGED performs object name matching (i.e. globbing against the database) before passing the command line to MGED's built-in Tcl interpreter. This is the same behavior seen in previous releases. The other command interpretation mode (Tcl Evaluation) passes the command line directly to the Tcl interpreter. Look under File/Preferences/ Special_Characters to change the interpretation mode.

The command window also supports cut and paste as well as text scrolling. The default bindings for these operations are similar to those found in typical X Window applications such as xterm. For example:

Key-Button SequenceAction
ButtonPress-1begin text selection
ButtonRelease-1end text selection
Button1-Motionadd to text selection
Shift-Button1modify text selection
Double-Button-1select word
Triple-Button-1select line
ButtonPress-2begin text operation
ButtonRelease-2paste text
Button2-Motionscroll text

Note - If motion was detected while Button2 was being pressed, no text will be pasted. In this case, it is assumed that scrolling was the intended operation. Of course, the user can also scroll the window using the scrollbar.



Panes (Display Manager Windows)

A pane is a place wherein solids/objects are drawn. Here the user can interact, via the mouse and/or keyboard, with the panes view or with solids/objects that are being edited. The user can also access menus from the menu bar from within the pane.

Shift Grips

MGED offers the user a unified mouse-based interface for "grabbing" things and manipulating them. Since it was built for compatibility on top of the older interface:

Mouse ButtonView Operation
Mouse buttonView operation
Button-1Zoom out
Button-2Recenter view at the specified point
Button-3Zoom in

it uses the modifier keys: Shift, Control, and Alt. This use of modified mouse clicks to grab things is called the "shift-grip" interface. The Shift and Control keys are assigned in combinations to the three basic transformation operations as follows:

Modifier KeyTransformation Operation
ShiftTranslate
CtrlRotate
Shift & CtrlScale

and the Alt key is assigned the meaning "constrained transformation," which is described below. Thus, in general, holding the Shift key and a mouse button down and moving the mouse drags things around on the screen. The Control key and a mouse button allow one to rotate things, and the combination of Shift, Control, and a mouse button allow one to expand and contract things. These general functionalities are consistent throughout MGED, providing a unified interface. The precise meanings of "drag things around," "rotate things," and "expand and contract things" depends on the operating context.

When one is merely viewing geometry the shift grips apply by default to the view itself. Thus they amount to panning, rotating, and zooming the eye relative to the geometry being displayed. When one is in solid-edit or matrix-edit mode (what used to be called object-edit mode), the shift grips apply by default to the model parameters. In this case, they modify the location, orientation, or size of object features or entire objects in the database.

The default behaviors in the viewing and editing modes may be overridden by the "Transform" item in the "Settings" menu. This allows the user to specify that the shift grips should transform the view, the model parameters (if one is currently editing a solid or matrix) or the angle-distance cursor (in which case the mouse may be used to position the ADC, to change its angles, and to expand and contract its distance ticks). The behavior of the shift grips may be further changed by the "Rotate About" item in the "Settings" menu, which allows the user to specify the point about which shift-grip rotations should be performed. The choices include the view center, the eye, the model origin, and an object's key point.

CONSTRAINED TRANSFORMATIONS

When the Alt key is held down along with either of the Shift and Control keys the transformations are constrained to a particular axis. For such constrained transformations the mouse buttons have the following meanings:

Mouse ButtonAxis
Button-1x
Button-2y
Button-3z

Thus, if the view is being transformed, Alt-Shift-Button-1 allows one to drag the objects being viewed left to right along the view-x axis. Similarly, if the model parameters are being transformed, Alt-Ctrl-Button-2 allows one to rotate the object about a line passing through the rotate-about point (as described above) and parallel to a y-axis. The coordinate system to which these transformations are constrained may be specified by the "Constraint Coords" item in the "Settings" menu, which allows the selection of any one of the model, view, and object coordinate systems.

Besides the default mouse button bindings described above, the user can access the ''Settings'' menu with alt-Button1 and the ''Modes'' menu with alt-Button2.

Default Key Bindings

MGED offers the user ''short cuts'' to much of the functionality available via the menus as well as the command line interface. The table below lists the default key bindings:
Key SequenceBehavior
atoggle angle distance cursor (ADC)
etoggle edit axes
mtoggle model axes
vtoggle view axes
iadvance illumination pointer forward
Iadvance illumination pointer backward
psimulate mouse press (i.e. to pick a solid)
0zero knobs
xrate rotate about x axis
yrate rotate about y axis
zrate rotate about z axis
Xrate rotate about x axis
Yrate rotate about y axis
Zrate rotate about z axis
3view - ae 35 25
4view - ae 45 45
ffront view
ttop view
bbottom view
lleft view
rright view
Rrear view
senter solid illumination state
oenter object illumination state
qreject edit
uzero knobs and sliders
< F1 >toggle depthcue
< F2 >toggle zclipping
< F3 >toggle perspective
< F4 >toggle zbuffer
< F5 >toggle lighting
< F6 >toggle perspective angle
< F7 >toggle faceplate
< F8 >toggle Faceplate GUI
< F9 >toggle keystroke forwarding
< F12 >zero knobs
< Left >rotate about y axis
< Right >rotate about y axis
< Down >rotate about x axis
< Up >rotate about x axis
< Shift-Left >translate in X direction
< Shift-Right >translate in X direction
< Shift-Down >translate in Z direction
< Shift-Up >translate in Z direction
< Control-Shift-Left >rotate about z axis
< Control-Shift-Right >rotate about z axis
< Control-Shift-Down >translate in Y direction
< Control-Shift-Up >translate in Y direction
< Control-n >goto next view
< Control-p >goto previous view
< Control-t >toggle between the current view and the last view

Besides the default key bindings listed above, the user can access menu items with ''alt-key'' sequences. For example, the ''File'' menu can be popped up with alt-f. The raytrace control panel can then be popped up by typing ''r'' (i.e. ''R'' is underlined in the ''Raytrace..." menu item).




Control Panels

ADC Control Panel
The ADC Control Panel is a tool for setting ADC parameters.
Grid Control Panel
The Grid Control Panel is a tool for setting grid parameters.
Query Ray Control Panel
The Query Ray Control Panel is a tool for setting query ray parameters.
Raytrace Control Panel
The Raytrace Control Panel is a tool for setting raytrace parameters.
AnimMate Control Panel
The Animmate Control Panel is a tool for building animation scripts. The AnimMate tutorial is a good place to learn about this control panel.
Solid Editor
The Solid Editor is a tool for editing solids.
Solid Editor (Internal)
The Solid Editor is a tool for editing MGED's internal solid (i.e. held in es_int while in solid edit state). The internal solid is the in-memory copy of a solid that is being edited.
Combination Editor
Color Editor
The Color Editor is a tool for specifying colors in either RGB or HSV.



Status Bar

The status bar contains two lines for displaying information about the state of the active pane. The first line contains information about the view center, view size, local units, azimuth, elevation, twist, and rate of rotation about the x, y and z axes. The second line can contain several different things depending on the state. If the angle distance cursor is being drawn, information about its parameters are displayed. Specifically, angle 1, angle 2, tick distance, center and delta are displayed. Otherwise, if in the VIEWING state, the frames per second is displayed. If in SOL PICK or OBJ PICK state, the full path of the illuminated solid is displayed. If in OBJ PATH state, the full path of the previously selected solid is displayed along with an indication of which matrix along the path will be edited. And finally, if in either SOL EDIT or OBJ EDIT state the keypoint is displayed.




Menu Bar