PATCH-G(1)
π PATCH-G(1) β the BRL-CAD glow-up manual π
okay bestie, welcome to the patch-g(1) page, like literally the BRL-CAD corner of the man pages β¨
β¨ NAME β¨
patch-g β the girlies' favorite way to convert a preprocessed FASTGEN target description into a BRL-CAD database π
π¦ SYNOPSIS π¦
patch-g [options] model.g
πΈ DESCRIPTION πΈ
okay so patch-g converts FASTGEN target geometry into a BRL-CAD .g database, and it's giving main character energy fr fr π
FASTGEN is a modeling system used to create military target descriptions, and its primitives β triangles in volume and plate mode, plus wedges, spheres, boxes, cylinders, and rods β get reproduced by patch-g as NMG solids, BoTs (polysolids), or ARB6 solids. no cap, it ate π₯
the way that this works: your FASTGEN file must first be passed through the rpatch(1) preprocessor, which produces the intermediate .rp file that patch-g consumes. so like, patch-g only eats the preprocessed version, not the raw one, iykyk π«Ά
the preprocessed input is read from standard input unless the -f option names a file, and the resulting geometry is written to the model.g database named as the sole positional argument. yes, sole, so don't go adding extras π
by default solids are written as NMG primitives; -p selects BoT (polysolid) output, and -6 converts plate-mode triangles to ARB6 solids. components are grouped into regions with a fixed number of unions each (peep -T and -A for the tolerances controlling vertex fusing and face merging, bestie). diagnostic messages are emitted when geometry cannot be converted; the -d option raises the verbosity, with higher levels producing more output. verbose queen π
π OPTIONS π
-f fastgen.rpβ read the pre-processed (throughrpatch(1)) FASTGEN file instead of standard input. your "no stdin, thanks" option β¨-nβ process volume mode components as plate mode. switching it up, we love versatility π-u numberβ number of union operations per region (default5). grouping math, iconic π-c "x y z"β center of the object, in inches, used for some plate-mode surface normal calculations. the quotation marks are required to group the three values, so keep them, bestie, do not come for the quotes π-t titleβ title for the output database (default"patch-g conversion"). name your baby πΌ-o object_nameβ name of the top-level object, containing no spaces (default"all"). no spaces, fr fr, the spaces are not invited to this party π-pβ write volume- and plate-mode components as BoT (polysolid) primitives rather than NMG solids. the polysolid era π-6β process plate-mode triangles as ARB6 solids (overrides-pfor triangles). so it beats-pfor triangles specifically, noted π-i group.fileβ read group label (region naming) information from the named file. labels! naming! slay π·οΈ-m mat.fileβ read material property information from the named file. materials, we stan a texture queen π§-rβ reverse the surface normals for plate-mode triangles. flip it, reverse it, make it go the other way π«-d levelβ set the debug (diagnostic verbosity) level. higher numbers produce more diagnostic output (levels above3also write intermediate NMG solids to the database). and yes, that's a real side effect, not just chatty logging β levels above3actually write those intermediate NMG solids into the database π-x flagβ set the librt debugging flags (hexadecimal). hex digits only, we're fancy π-X flagβ set the NMG (librt) debugging flags (hexadecimal). same vibe, different flag, capital X energy β-T distanceβ vertex tolerance distance, in inches. two vertices closer together than this are treated as the same vertex. fusion time π«Ά-A toleranceβ perpendicularity tolerance, given as the cosine of an angle (0.0through1.0). two unit vectors whose dot product is less than this value are considered perpendicular. trig girlies rise πΈ
π₯ EXAMPLES π₯
Example 1. Convert a FASTGEN target to a polysolid BRL-CAD database
rpatch < tank.fastgen > tank.rp
patch-g -p -f tank.rp -t "M1 Tank" -o tank tank.g
first rpatch(1) preprocesses the raw FASTGEN file into the intermediate tank.rp. patch-g then converts it, writing BoT (polysolid) geometry under a top-level group named tank, with a database title of "M1 Tank", into the new tank.g database that can be opened in mged(1). literally the whole pipeline, ate and left no crumbs π₯π
π SEE ALSO π
brlcad(1), rpatch(1), fast4-g(1), mged(1)
(the whole friend group π«Ά)
π AUTHOR π
BRL-CAD Team β the icons behind the icon β¨
β COPYRIGHT β
this software is Copyright (c) 1989-2026 by the United States Government as represented by U.S. Army Research Laboratory. like, legally iconic π
π BUG REPORTS π
reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org. pls be nice about it, they're doing their best π
and that's the tea, bestie β this was the PATCH-G(1) page from the BRL-CAD manual set β check the source/version tag for the exact build you're running, mwah ππ
π¦ where this page comes from
- nixpkgs unstable: brlcad 7.44.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms