G-EGG(1)

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

πŸ’… G-EGG(1) β€” the BRL-CAD manual, bestie edition πŸŽ€

okay so bestie, welcome to G-EGG(1), a page from the BRL-CAD manual set πŸ’–. This is the one that turns your BRL-CAD geometry into a Panda3D EGG file. Let's get into it ✨


🌸 NAME 🌸

g-egg β€” convert BRL-CAD geometry to a Panda3D EGG file πŸ¦‹


✨ SYNOPSIS ✨

g-egg [-v89] [-x rt_debug] [-X nmg_debug] [-a abs_tol] [-r rel_tol] [-n norm_tol] [-D dist_tol] [-P ncpu] [-o output.egg] database.g object [object ...]

πŸ’œ DESCRIPTION πŸ’œ

So g-egg takes the geometry object(s) you point at in a BRL-CAD database.g and converts them into a Panda3D EGG file. Iconic, honestly πŸ‘‘

Here's the tea on how it works: every object gets tessellated into a triangulated NMG via the boolean evaluator, and then written out as an EGG <Group> that holds a vertex pool plus the resulting polygons. The output uses a Z-Up coordinate system. Noted, remembered, slay πŸ“

If you don't hand it an output file with -o, the EGG data just goes to standard output. And when it's done? It prints a count of the triangles it produced to standard error. That's your little "we did it" moment 🫢


πŸŽ€ OPTIONS πŸŽ€

  • -a abs_tol β€” absolute tessellation tolerance, in mm. Heads up: setting this disables the relative tolerance πŸ”₯
  • -r rel_tol β€” relative tessellation tolerance, as a fraction of the bounding box. The default is 0.01 πŸ’«
  • -n norm_tol β€” surface normal tessellation tolerance, in degrees. Setting this disables the relative tolerance πŸŒ€
  • -D dist_tol β€” calculational distance tolerance, in mm, used when deciding whether vertices are coincident πŸ“
  • -P ncpu β€” number of CPUs to use during tessellation. parallel bestie hours πŸ’…
  • -o output.egg β€” write output to the named file instead of standard output πŸ“
  • -8 β€” use the marching cubes algorithm for facetization 🧊
  • -9 β€” use the experimental "bottess" algorithm for facetization. experimental, so like… be aware πŸ‘€
  • -v β€” verbose output (printed to standard error) πŸ—£οΈ
  • -x rt_debug β€” set the librt debugging flags (a hexadecimal bit vector) πŸ”
  • -X nmg_debug β€” set the NMG debugging flags (a hexadecimal bit vector) πŸ”Ž
  • -h, -? β€” print the usage message and exit. classic 🫑

🌈 EXAMPLES 🌈

Example 1. Convert objects from a database to an EGG file

g-egg -r 0.005 -o havoc.egg havoc.g body wings

This tessellates the body and wings regions from havoc.g using a tighter relative tolerance of 0.005, and writes the combined Panda3D EGG model to havoc.egg β€” all ready to be loaded into a Panda3D scene 🎬✨

Example 2. Generate geometry on demand and pipe it onward

g-egg -a 0.5 moss.g all.g > moss.egg

Here it facetizes the all.g assembly from the moss.g sample database with a 0.5 mm absolute tolerance, and redirects the EGG output (which would otherwise go to standard output) into moss.egg. pipes? we love pipes 🫢


πŸ¦‹ SEE ALSO πŸ¦‹

brlcad(1), g-obj(1), g-stl(1), gcv(1), mged(1) β€” go read those next, bestie, they're all in the family πŸ’–


πŸ‘‘ AUTHOR πŸ‘‘

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 πŸ“§

not me telling you to email the devs, but like… if it's broken, tell them fr fr πŸ™ˆ

okay that's the whole page, you ate that πŸ’… this was G-EGG(1) from the BRL-CAD manual set β€” no cap, go tessellate something πŸ“πŸ§š

πŸ“¦ where this page comes from