g-off [-v] [-d] [-x _rt_debug_] [-X _nmg_debug_] [-a _abs_tol_] [-r _rel_tol_] [-n _norm_tol_] [-p _prefix_] [-P _ncpu_] _database.g_ _object_...
G-OFF(1)
NAME
g-off - convert BRL-CAD geometry to polygonal surface files
On this page
SYNOPSIS
DESCRIPTION
g-off reads one or more object regions from a BRL-CAD database database.g, tessellates them into NMG (n-Manifold Geometry) form by evaluating the Boolean tree of each region, and writes the resulting polygonal surfaces out.
Each successfully converted region is written as a separate psurf (polygonal surface) file with a .pss extension, listing the unique vertices (converted from millimeters to centimeters) followed by the per-face vertex indices. A companion figure file with a .fig extension is written alongside, naming the segments, recording any region color, and joining the segments together. The base name of these output files is derived from the database name and the region names, optionally with a user-supplied prefix.
Conversion is performed via the NMG Boolean evaluator, so regions that contain geometry the tessellator cannot resolve are reported as failed and skipped; a summary count of attempted versus converted regions is printed when finished. See gqa(1) and facetize for related tessellation-based tools.
OPTIONS
- -v
-
Enable verbose output, reporting each region as it is processed and each output file as it is written.
- -d
-
Also write each converted region as a UNIX-plot debugging file with a .plot3 extension, colored to match the region’s material color.
- -a abs_tol
-
Absolute tessellation tolerance, in millimeters. Default is 0.0 (disabled).
- -r rel_tol
-
Relative tessellation tolerance, expressed as a fraction of the bounding box. Default is 0.01.
- -n norm_tol
-
Surface normal tessellation tolerance, in degrees. Default is 0.0 (disabled).
- -p prefix
-
String prepended to every generated output file name.
- -P ncpu
-
Number of CPUs to use. Default is 1.
- -x rt_debug
-
Set the librt debug flag (hexadecimal).
- -X nmg_debug
-
Set the NMG debug flag (hexadecimal).
- -h, -?
-
Print the usage message and exit.
EXAMPLES
g-off -r 0.005 -p out_ have.g component1 component2
Tessellates the regions component1 and component2 from have.g using a relative tolerance of 0.005, writing the figure file out_have.fig together with one .pss psurf file per region (for example out_component1.pss). Tightening the relative tolerance yields a finer-grained polygonal approximation of curved surfaces.
SEE ALSO
brlcad(1), mged(1), g-vrml(1), g-stl(1), gqa(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