G-NFF(1)

πŸ“¦
version 7.44.0 Β· 2 versions
, in nixpkgs unstable

✨ G-NFF(1) β€” the BRL-CAD to Neutral File Format glow-up ✨

okay so bestie, quick vibe check: this is a page from the BRL-CAD manual set, and it's about a lil tool called g-nff πŸ’…


🌸 NAME 🌸

g-nff β€” the BRL-CAD β†’ Neutral File Format (NFF) translator, aka your geometry's passport to renderer-land πŸ›‚βœ¨


πŸŽ€ SYNOPSIS πŸŽ€

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

like, that's the whole shape of it. flags first, then -o output.nff, then your database.g, then however many objects you feel like naming πŸ’–


πŸ¦‹ DESCRIPTION πŸ¦‹

g-nff takes the geometry object(s) you point at inside a BRL-CAD database.g file and converts them over to Neutral File Format (NFF). it's giving translator era 🫢

here's the tea on how it does it: each region gets evaluated with the NMG boolean routines, then triangulated, then written out as a set of NFF polygons β€” each one tagged with the region's color so your renderer knows what's what 🎨

and because it's an absolute icon, g-nff also computes a bounding box for the geometry and drops a default 45-degree view, a light, and 512x512 resolution into the output file β€” so the result can go straight to rendering with no extra setup. main character energy fr fr πŸ‘‘


πŸ’… OPTIONS πŸ’…

  • -o output.nff β€” names the output NFF file. this one is required, no cap, you literally cannot skip it πŸ™ˆ
  • -i β€” treat the output as being in inches. the default is millimeters, iykyk πŸ“
  • -a abs_tol β€” sets the absolute tessellation tolerance, in millimeters. heads up: setting this disables the relative tolerance ⚠️
  • -r rel_tol β€” sets the relative tessellation tolerance as a fraction of the bounding box diagonal. the default is 0.01 πŸ’«
  • -n norm_tol β€” sets the surface normal tessellation tolerance, in degrees. setting this disables the relative tolerance too ⚠️
  • -D dist_tol β€” sets the calculational distance tolerance in millimeters, used when deciding whether two points are coincident πŸ‘―
  • -e error_file β€” redirects error messages into error_file instead of standard error. very demure, very tidy πŸŽ€
  • -v β€” turns on verbose progress reporting. she'll narrate her whole journey to you πŸ—£οΈβœ¨
  • -x rt_debug β€” sets the librt debug flags, given as a hexadecimal value πŸ”§
  • -X nmg_debug β€” sets the libnmg debug flags, given as a hexadecimal value πŸ”§
  • -h, -? β€” prints the usage message and dips πŸ‘‹

🌈 EXAMPLES 🌈

Example 1. Convert selected regions to a renderable NFF file

g-nff -a 0.5 -o engine.nff engine.g block piston

so what's happening here: it tessellates the block and piston regions from engine.g using a 0.5 mm absolute tolerance, then writes the triangulated geometry β€” plus a default view and light β€” into engine.nff, all ready to be handed to an NFF-capable renderer. literally plug and play πŸ”₯


πŸ‘‘ SEE ALSO πŸ‘‘

go read those too, bestie, they're the whole friend group 🫢


⭐ AUTHOR ⭐

the BRL-CAD Team πŸ’œ


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 πŸ“¬ β€” they're genuinely lovely about it, promise.


and that's the page! courtesy of BRL-CAD, same G-NFF(1) energy as always β€” mwah, go convert something cute πŸ’–πŸŽ€βœ¨

πŸ“¦ where this page comes from