'\" t
.\"     Title: LINT
.\"    Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL-NS Stylesheets v1.76.1 <http://docbook.sf.net/>
.\"      Date: 08/28/2023
.\"    Manual: BRL-CAD User Commands
.\"    Source: BRL-CAD
.\"  Language: English
.\"
.TH "LINT" "nged" "08/28/2023" "BRL\-CAD" "BRL\-CAD User Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
lint \- Detect and report problems with subsets or all of a \&.g database\&.
.SH "SYNOPSIS"
.HP \w'\fBlint\fR\ 'u
\fBlint\fR [\-h] [\-C] [\-M] [\-I] [\-F\ "filters"] [\fIObjectName\fR]
.SH "DESCRIPTION"
.PP
The \*(Aqlint\*(Aq command analyzes the currently open geometry database (or a subset of that database if object names are supplied as arguments) and searches for a variety of problems know to sometimes occur\&. By default all defect types are searched for \- if one or more of the options enabling a search for a specific type of problem are supplied, only those searches will be performed\&.
.SH "OPTIONS"
.PP
\fB\-h\fR
.RS 4
Print help message\&.
.RE
.PP
\fB\-C\fR, \fB\-\-cyclic\fR
.RS 4
Check for full paths that are cyclic \- i\&.e\&. a situation where a high level object incorporates in its definition tree a reference to itself\&. Such definitions are always considered invalid, and are sometimes problematic for tools working with geometry hierarchy\&.
.RE
.PP
\fB\-M\fR, \fB\-\-missing\fR
.RS 4
Check for references to objects or files that are missing (not present in the database or on the file system\&.) Primarily this is a check for comb objects referring to missing objects, but it will also check for and report invalid object and file references in extrude and dsp primitives\&.
.RE
.PP
\fB\-I\fR, \fB\-\-invalid\fR
.RS 4
Check for shapes in the database that do not satisfy one or more properties required for them to be valid definitions, where correcting the problem requires a change to the object\*(Aqs definition\&. (As of this writing the only implemented check is for BoT object solidity, but many more are possible and planned\&.) (Objects invalid due to missing objects are potentially valid without the necessity of changing the object\*(Aqs own definition \- e\&.g\&. the missing object/file can be added\&. That category of error can be searched for with the
\fB\-M\fR
check\&.)
.RE
.PP
\fB\-F\fR, \fB\-\-filter\fR
.RS 4
Apply search command style filters to the set of objects to be tested\&. Allows, (for example) a user to test only brep objects and not bot objects or only objects matching a particular name pattern\&. Does not impact the checks for missing or cylic geometry \- the underlying search mechanism assumes inputs do not have those particular categories of problem and thus can\*(Aqt be reliably applied in those cases\&.
.RE
.SH "EXAMPLES"
.PP
\fBExample\ \&1.\ \&Examine entire database for all defect categories\fR
.PP

mged>\fBlint\fR
.sp
.if n \{\
.RS 4
.\}
.nf
Checking for cyclic paths\&.\&.\&.
Checking for references to non\-extant objects\&.\&.\&.
Checking for invalid objects\&.\&.\&.
Found cyclic paths:
  /c1/c2/c1
  /c2/c1/c2
Found references to missing objects:
  invalid_dsp_missing_binary_obj\&.s/missing_binary_object\&.s
  invalid_dsp_missing_file\&.s/missing_file\&.data
  invalid_extrude_missing_sketch\&.s/missing_sketch\&.s
  missingentry\&.c/missing\&.s
Found invalid objects:
  nonsolid\&.bot[bot] failed solidity test, but BoT type is RT_BOT_SOLID

      
.fi
.if n \{\
.RE
.\}
.sp

.PP
\fBExample\ \&2.\ \&Check the validity of a single geometry object\fR
.PP

mged>\fBlint \-I nonsolid\&.bot\fR
.sp
.if n \{\
.RS 4
.\}
.nf
Checking for invalid objects\&.\&.\&.
Found invalid objects:
  nonsolid\&.bot[bot] failed solidity test, but BoT type is RT_BOT_SOLID

      
.fi
.if n \{\
.RE
.\}
.sp

.PP
\fBExample\ \&3.\ \&Examine all non-BoT objects in the database matching the name pattern "*_1.*" for invalidity\fR
.PP

mged>\fBlint \-F "! \-type bot \-name *_1\&.*"\fR
.sp
.if n \{\
.RS 4
.\}
.nf
Checking for invalid objects\&.\&.\&.
Found invalid objects:
  Brep_1\&.s[brep] failed OpenNURBS validity test
brep\&.m_L[27] loop is not valid\&.
	end of brep\&.m_T[loop\&.m_ti[5]=147]=(0,\-1\&.309) and start 
	of brep\&.m_T[loop\&.m_ti[6]=148]=(0,\-5\&.63995e\-08) do not match\&.
brep\&.m_F[25] face is not valid\&.
	brep\&.m_L[face\&.m_li[0]=27] is not valid\&.
ON_Brep\&.m_F[25] is invalid\&.

      
.fi
.if n \{\
.RE
.\}
.sp

.SH "AUTHOR"
.PP
BRL\-CAD Team
.SH "BUG REPORTS"
.PP
Reports of bugs or problems should be submitted via electronic mail to
devs@brlcad\&.org
