G_LINT(1)

NAME
g_lint - a BRL-CAD geometry checker

SYNOPSIS
g_lint [ options ] model.g objects ...

DESCRIPTION
G_lint uses librt(3) to fire an array of parallel rays at the specified objects in the database model.g and reports overlaps, vacuums, and potential problems with air regions. By default, the output consists of single-line reports, each of which contains a tag identifying the report type and then other data as appropriate for that type report. Unless the -p option is specified, the exact formats are:

overlap r1 r2 length x_in y_in z_in x_out y_out z_out
    Consecutive partitions overlap by more than tol (see the -t option). The data reported are the names of the two regions involved, the length of the overlap along the ray, and the model coordinates of the ray's entry into and exit from the overlap.

air_contiguous r1 a1 r2 a2 x y z
    Consecutive partitions have unlike (nonzero) air codes and the space between them is less than tol (see the -t option). The data reported are the names and air codes of the two regions involved and the model coordinates of the point of contiguity.

air_unconfined r1 (s1) r2 (s2) length x1 y1 z1 x2 y2 z2
    A partition with nonzero air code follows or precedes another partition and the space between them is more than tol (see the -t option). The data reported are the names of the two regions (and solids) involved, the length of the gap along the ray, and the model coordinates of the ray's exiting the first partition and entering the second.

air_first r a x y z
    The first partition has a nonzero air code. The data reported are the name and air code of the region involved and the model coordinates of the ray's entering the partition.

air_last r a x y z
    The last partition has a nonzero air code. The data reported are the name and air code of the region involved and the model coordinates of the ray's exiting the partition.

vacuum r1 (s1) r2 (s2) length x1 y1 z1 x2 y2 z2
    The space between consecutive partitions is more than tol (see the -t option). The data reported are the names of the two regions (and solids) involved, the length of the gap along the ray, and the model coordinates of the ray's exiting the first partition and entering the second.

  Command-line options

-a az
    Sets the azimuth from which to fire rays to az degrees. The default is 0.

-c  Specifies that one ray should be fired from the center of each grid cell. By default, g_lint fires a ray from one random point in each cell.

-e el
    Sets the elevation from which to fire rays to el degrees. The default is 0.

-g gridsize
    Sets the width and height of each grid cell to gridsize millimeters. The default is 100 mm.

-o  Causes g_lint to include in each report the model coordinates of the ray origination point. These appear between the tag and the rest of the data.

-p  Causes g_lint to produce its reports as plot3(5) drawing commands instead of ASCII text. This is useful in conjunction with the ``overlay'' command of mged.

-r bits
    Specifies which types of reports to produce. If, after an optional minus sign, bits begins with either ``0x'' or ``0X'', the remainder is interpreted in hexadecimal. Otherwise, if bits begins with ``0'', the remainder is interpreted in octal. Otherwise, bits is interpreted in decimal. The meaning of the individual bits is as follows:
     1 overlaps
     2 contiguous unlike airs
     4 unconfined airs
     8 air first on rays
    16 air last on rays
    32 vacuums.
    If there was no initial minus sign, then bits specifies which report types to produce. The minus sign implies complementation: when it is present, bits specifies which report types not to produce. The default is 1.

-s  Causes g_lint to collect all the overlap reports and sort them before printing them. The reports for a given pair of regions are printed contiguously, and the clusters of reports for the various pairs of regions appear in order of decreasing cumulative overlap length. By default, g_lint reports overlaps immediately and in the order of their discovery.

-t tol
    Sets the tolerance for overlaps, contiguous and unconfined airs, and vacuums to tol millimeters. The default is 0.

-u  Sets the useair member of the rt_i structure to 1, which causes librt to report partitions containing air. It is also set implicitly if any air-related reports have been specified. By default, librt ignores air regions.

-x bits
    Sets the g_lint debug flags to bits. See the -r option for more details. Note that some of the report types have no corresponding diagnostics.

EXAMPLE
The command

g_lint -a 35 -e 25 -c -g 1 -r 31 -t 0.01 kitchen.g appliances

fires a ray every millimeter and produces overlap reports and every type of air-related report, but no vacuum reports.

SEE ALSO
mged(1), librt(3), strtoul(3), plot3(5)

AUTHOR
Paul Tanenbaum

SOURCE
The U. S. Army Research Laboratory
Aberdeen Proving Ground, Maryland 21005-5068 USA

BUG REPORTS
Reports of bugs should be submitted via the cadbug.sh shell script. Alternatively, bugs or problems may be submitted by electronic mail to <devs@brlcad.org>.