Lines and cylinders are graphical representations which can be used to visualize 1-D elements in CMGUI - including line elements at the edges of 2-D faces or 3-D elements. From Cmgui v3.0, cylinders are just a variant of lines specified by changing the Line shape to 'circle extrusion' combined with line scaling options; in previous versions of Cmgui, cylinders were a separate graphics type.
In general, lines are used to visualize the basic shape of a mesh. Note in very old versions of Cmgui lines were automatically created when region 'groups' were read from file, but this is no longer the case: all graphics must be intentionally created by the user (see the scene editor).
If you wish to create lines in the graphics window, you first need to read a model containing line elements. As an example go to the file menu in CMGUI and select Read, then Node file. Read in cube.exnode from the example a2 directory. Then using the Read and Elements file menu options, read in cube.exelem from the same directory. Select the Graphics Scene Editor menu item and select the region you wish to create graphics for from the list at the left; in the example it is the root region "/". Click on add and select lines. A default coordinate field will automatically be chosen, which is the minimum needed for lines graphics. If you now create a graphics window (using the Graphics menu item 3-D window) you will see this cube rendered in 1 pixel thick lines using the default (white) material.
Figure 1: The lines graphics created for a cube mesh. This mesh was created by reading the cube.exnode and cube.exelem files from example a2. Note that the example a2 com file creates cylinders to visualize the cube mesh.
The tessellation option in the scene editor controls the number of line segments used along the line element to approximate a curve or control visualisation of the data field along it. With 'circle extrusion' line shape (cylinders) the Circle Divisions option on the tessellation controls the number of line segments around the cylinder with higher numbers better approximating a circle. (Prior to Cmgui v3.0 Cylinder graphics had a Circle discretization value for this purpose.) (Figure 2).
Lines have relatively few settings for altering their appearance (Figure 2). The following settings are available for lines:
In addition to these settings there is a command line setting that can be very useful when using line based visualizations: gfx modify window 1 set perturb_lines. This command helps to prevent the "dotted lines" effect that occurs when lines and surfaces interfere.
Note: if no lines appear, you may not have added faces (and lines) to the mesh - try the gfx define faces command.
Figure 2: The scene editor settings available for a lines graphical setting.
Since Cmgui v3.0 cylinders are just lines using additional 'line shape' options shared with streamlines graphics, currently restricted to 'line' or 'circle extrusion' with equal scaling in all lateral directions. Note when choosing a line shape other than the default 'line', the resulting graphics scale with the model as you zoom in, whereas 'line' shape gives constant thickness in screen space.
Options controlling the visualisation with 'circle extrusion' line shape: