g-nff [-v] [-i] [-x _rt_debug_] [-X _nmg_debug_] [-e _error_file_] [-D _dist_tol_] [-a _abs_tol_] [-r _rel_tol_] [-n _norm_tol_] -o _output.nff_ _database.g_ _object_ ...
G-NFF(1)
NAME
g-nff - BRL-CAD to Neutral File Format (NFF) translator
On this page
SYNOPSIS
DESCRIPTION
g-nff converts the specified geometry object(s) from a BRL-CAD database.g file to the Neutral File Format (NFF). Each region is evaluated with the NMG boolean routines, triangulated, and written as a set of NFF polygons tagged with the region’s color. g-nff also computes a bounding box for the geometry and emits a default 45-degree view, light, and 512x512 resolution into the output so the result can be rendered directly.
OPTIONS
- -o output.nff
-
Specify the output NFF file name. This option is required.
- -i
-
Treat the output as being in inches. The default is millimeters.
- -a abs_tol
-
Specify the absolute tessellation tolerance in millimeters. Setting this disables the relative tolerance.
- -r rel_tol
-
Specify the relative tessellation tolerance as a fraction of the bounding box diagonal. The default is 0.01.
- -n norm_tol
-
Specify the surface normal tessellation tolerance in degrees. Setting this disables the relative tolerance.
- -D dist_tol
-
Specify the calculational distance tolerance in millimeters used when deciding whether two points are coincident.
- -e error_file
-
Redirect error messages to error_file instead of standard error.
- -v
-
Enable verbose progress reporting.
- -x rt_debug
-
Set the librt debug flags (given as a hexadecimal value).
- -X nmg_debug
-
Set the libnmg debug flags (given as a hexadecimal value).
- -h, -?
-
Print the usage message and exit.
EXAMPLES
g-nff -a 0.5 -o engine.nff engine.g block piston
Tessellates the block and piston regions from engine.g using a 0.5 mm absolute tolerance and writes the triangulated geometry, together with a default view and light, to engine.nff, ready to be passed to an NFF-capable renderer.
SEE ALSO
brlcad(1), g-obj(1), g-stl(1), g-vrml(1), g-x3d(1)
AUTHOR
BRL-CAD Team
COPYRIGHT
This software is Copyright (c) 1989-2026 by the United States Government as represented by U.S. Army Research Laboratory.
BUG REPORTS
Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org