Skip to documentation
DocumentationAll documentsEnglish

BOT_DUMP(1)

NAME

bot_dump - export Bag of Triangles (BoT) primitives to mesh file formats

On this page

SYNOPSIS

bot_dump [-b] [-n] [-m _directory_] [-o _file_] [-t dxf|glb|gltf|obj|sat|stl] [-u _units_] geom.g [bot1 bot2 ...]

DESCRIPTION

bot_dump exports the raw definition of polygonal Bag of Triangles (BoT) primitives from a BRL-CAD database to a variety of standard mesh formats. No Boolean evaluation is performed, so the exported geometry matches each primitive’s exact stored representation.

The database is given as the first positional argument. If one or more BoT object names follow, only those objects are exported; otherwise every BoT in the database is exported.

If neither -o nor -m is given, ASCII output is written to standard output; binary formats require an output file or directory.

OPTIONS

-b

Write a binary version of the output format, for formats that support both ASCII and binary variants (such as STL). glTF output is always binary (GLB).

-n

Include surface normals in the output where the format supports them (e.g. OBJ). Normals are intrinsic to STL and unsupported by DXF and SAT.

-m directory

Write each dumped BoT into its own file within directory. Mutually exclusive with -o.

-o file

Write all exported geometry to a single file. Mutually exclusive with -m.

-t type

Select the output format: dxf, glb, gltf, obj, sat, or stl. If omitted, the format is inferred from the output file extension, defaulting to stl when it cannot be determined.

-u units

Convert coordinates from the internal millimeters to units on output (e.g. "in", "cm", "m").

-h, -?

Print a usage summary and exit.

EXAMPLES

Example 1. Export selected BoTs to a binary STL
bot_dump -b -t stl -o hull.stl ship.g hull_bot deck_bot

Writes the hull_bot and deck_bot BoT primitives from ship.g into a single binary STL file suitable for slicing or 3D printing.

Example 2. Export every BoT to per-object glTF files in millimeters-to-meters
bot_dump -u m -t glb -m gltf_out world.g

Converts all BoT primitives in world.g, scaling coordinates from millimeters to meters, and writes one GLB file per object into the gltf_out directory.

Example 3. Export an OBJ with normals and material colors
bot_dump -n -t obj -o part.obj assembly.g part_bot

Produces an OBJ (plus companion MTL) containing surface normals and the resolved region/object color for part_bot, ready for import into a renderer. Color and material information is written automatically for OBJ output.

SEE ALSO

brlcad(1), mged(1), g-stl(1), g-dxf(1), g-obj(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