Skip to documentation
DocumentationAll documentsEnglish

G-DOT(1)

NAME

g-dot - convert a BRL-CAD database to the DOT graph language

On this page

SYNOPSIS

g-dot [-o output.dot] input.g [object1 ...]

DESCRIPTION

g-dot exports the hierarchy of a BRL-CAD input.g geometry database to the DOT graph description language. Each named object is walked recursively and emitted as a directed graph whose edges are labeled with the Boolean operation (u, +, -) joining members. Nodes are colored by type: regions are blue, groups green, and primitive solids red.

If no object is given, all top-level objects in the database are exported. If input.g is -, the database is read from standard input. The resulting graph is written to standard output unless -o is given.

The output can be rendered to an image by graph-drawing tools such as Graphviz (dot), Tulip, or OmniGraffle.

OPTIONS

-o output.dot

Write the DOT output to output.dot instead of standard output. If the file already exists, output is appended to it.

-h

Print a usage message and exit.

-?

Print a usage message and exit.

EXAMPLES

Example 1. Render a model hierarchy as a PNG image
g-dot -o moss.dot moss.g all.g
dot -Tpng moss.dot -o moss.png

Exports the hierarchy rooted at all.g from moss.g to moss.dot, then uses the Graphviz dot program to render it as a PNG image.

Example 2. Pipe a database in and a graph out
mged -c moss.g <<< 'q' >/dev/null 2>&1
g-dot moss.g | dot -Tsvg -o moss.svg

Exports all top-level objects of moss.g and pipes the DOT stream directly into Graphviz to produce an SVG without an intermediate file.

SEE ALSO

brlcad(1), mged(1), g-vrml(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