G-OFF(1)

πŸ“¦ version 7.44.0, in nixpkgs unstable

πŸ’… G-OFF(1) β€” the BRL-CAD poly-to-polyglot pipeline ✨

okay bestie, so you know how g-off lives in the BRL-CAD universe? That's the manual name, and this whole page is the g-off glow-up guide. Buckle up πŸŽ€

🌸 NAME 🌸

g-off β€” literally the tool that converts BRL-CAD geometry to polygonal surface files. that's the whole job. it ate and left no crumbs πŸ’…

✨ SYNOPSIS ✨

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...

πŸ¦‹ DESCRIPTION πŸ¦‹

So g-off reads one or more object regions out of a BRL-CAD database, database.g, tessellates them into NMG (n-Manifold Geometry) form by evaluating the Boolean tree of each region, and then writes the resulting polygonal surfaces out. That's the vibe check and it passes βœ…

Each region that converts successfully gets written as its own separate psurf (polygonal surface) file with a .pss extension. Inside it you get the unique vertices first (converted from millimeters to centimeters, not me doing unit math 😭) followed by the per-face vertex indices. Alongside that, a companion figure file with a .fig extension is written β€” it names the segments, records any region color, and joins the segments together. The base name of these output files comes from the database name plus the region names, optionally with a user-supplied prefix. iykyk πŸ’–

Conversion happens through the NMG Boolean evaluator, so regions containing geometry that the tessellator just cannot resolve get reported as failed and skipped β€” no cap, it will tell you. When it's all done it prints a summary count of attempted versus converted regions. If you want related tessellation-based besties, go see gqa(1) and facetize. 🫢


πŸŽ€ OPTIONS πŸŽ€

  • -v β€” Enable verbose output, reporting each region as it is processed and each output file as it is written. Main character energy: it narrates its own life to you πŸ’…
  • -d β€” Also write each converted region as a UNIX-plot debugging file with a .plot3 extension, colored to match the region's material color. aesthetic debugging fr fr 🌈
  • -a abs_tol β€” Absolute tessellation tolerance, in millimeters. Default is 0.0 (disabled). so like, off by default, turning it on is a choice πŸ’€
  • -r rel_tol β€” Relative tessellation tolerance, expressed as a fraction of the bounding box. Default is 0.01. this one's actually on by default, she's the main character ⭐
  • -n norm_tol β€” Surface normal tessellation tolerance, in degrees. Default is 0.0 (disabled).
  • -p prefix β€” String prepended to every generated output file name. put a little name tag on it 🏷️
  • -P ncpu β€” Number of CPUs to use. Default is 1. want more? say more. parallel bestie πŸ”₯
  • -x rt_debug β€” Set the librt debug flag (hexadecimal).
  • -X nmg_debug β€” Set the NMG debug flag (hexadecimal). two totally different debug flags, don't mix them up πŸ™ˆ
  • -h, -? β€” Print the usage message and exit. the classic "help me help you" move πŸ’–

🌟 EXAMPLES 🌟

Example 1. Convert two regions with a tightened tolerance and a name prefix

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. lowkey obsessed with how crisp that gets πŸ¦‹


πŸ‘‘ SEE ALSO πŸ‘‘

brlcad(1), mged(1), g-vrml(1), g-stl(1), gqa(1)

go read those too, they're all in the same friend group πŸ’œ

🧚 AUTHOR 🧚

BRL-CAD Team β€” icons, honestly ✨

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. be nice, they're literally doing their best 🫢


and that's the whole page, bestie β€” brought to you by BRL-CAD, same source and version energy as always, dated right there in the 1989–2026 copyright window. slay, stay tessellated, and don't forget to -v if you're nosy like me πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from