Skip to documentation
DocumentationAll documentsEnglish

G-EGG(1)

NAME

g-egg - convert BRL-CAD geometry to a Panda3D EGG file

On this page

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

g-egg converts the specified geometry object(s) from a BRL-CAD database.g to a Panda3D EGG file. Each object is tessellated into a triangulated NMG via the boolean evaluator and written as an EGG <Group> containing a vertex pool and the resulting polygons. The output uses a Z-Up coordinate system.

If no output file is given with -o, the EGG data is written to standard output. A count of the triangles produced is printed to standard error on completion.

OPTIONS

-a abs_tol

Absolute tessellation tolerance, in mm. 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.

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

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

EXAMPLES

Example 1. Convert objects from a database to an EGG file
g-egg -r 0.005 -o havoc.egg havoc.g body wings

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

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.

SEE ALSO

brlcad(1), g-obj(1), g-stl(1), gcv(1), mged(1)

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