grid vname parameter [value]
GRID(nged)
NAME
grid - control the display grid and snap-to-grid behavior
On this page
SYNOPSIS
DESCRIPTION
The grid command controls the view grid: a regular overlay of horizontal and vertical lines drawn on the display to aid in alignment and measurement. It also controls snap-to-grid behavior, which constrains view center movement to the nearest grid intersection.
The first argument vname is the name of the view to configure. The second argument parameter specifies which grid attribute to get or set. If a value is provided it sets the attribute; if omitted the current value is returned.
Parameters
| Parameter | Value | Description |
|---|---|---|
|
|
Get or set the grid line color as three integers (0–255). With no value, returns current color. |
|
|
Enable ( |
|
|
Enable ( |
|
float |
Get or set the horizontal grid resolution (spacing) in the current working units. |
|
float |
Get or set the vertical grid resolution (spacing) in the current working units. |
|
integer |
Get or set the major grid line interval (horizontal): a major line is drawn every N minor lines. |
|
integer |
Get or set the major grid line interval (vertical). |
|
(none) |
Snap the current view center to the nearest grid intersection. Takes no value argument. |
EXAMPLES
mged> grid default draw 1
Turns on grid display for the view named default.
mged> grid default rh 10 mged> grid default rv 10
Sets horizontal and vertical grid spacing to 10 units in the current working units.
mged> grid default snap 1
Enables snap-to-grid for the default view. The view center will snap to the nearest grid point during interactive navigation.
mged> grid default color 0 200 0
Sets the grid line color to green (R=0, G=200, B=0).
mged> grid default rh
Returns the current horizontal grid resolution in working units, for example: 10.
mged> grid default vsnap
Moves the view center to the nearest grid intersection.
SEE ALSO
view(nged), center(nged)
AUTHOR
BRL-CAD Team
BUG REPORTS
Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org