OFF-G(1)
π OFF-G(1) β bestie, we're converting OFF to BRL-CAD β¨
okay so quick vibe check first: this is page OFF-G(1) from the BRL-CAD manual set, and it's genuinely one of the more iconic little converters out there. No cap. Let's get into it π«Ά
πΈ NAME πΈ
off-g β the girlie that takes a DEC Object File Format model and turns it into a BRL-CAD database π
β¨ SYNOPSIS β¨
off-g file.off database.g
that's it. two args. she's lowkey efficient like that π
π¦ DESCRIPTION π¦
off-g converts a model in Digital Equipment Corporation's OFF (Object File Format) into a BRL-CAD database. Periodt. π
She reads the OFF descriptor file file.off and writes a new BRL-CAD database database.g containing three things, and honestly the way she does all three is giving main character energy:
- an NMG (n-Manifold Geometry) solid π₯
- a region that references it
- a top level identification record π
ngl, "NMG" = n-Manifold Geometry, it's the solid type, that's the whole joke, moving on π§
the descriptor file tea β β file.off is a small text header, not the geometry itself. Like, it's the invitation, not the party. off-g parses exactly two fields from it:
- a name field β its value is used as the object title and to derive the generated
s.(solid) andr.(region) object names π - a geometry field β of the form:
geometry indexed_poly format geomfile
and here's the catch, bestie: only the indexed_poly data type is supported π. The named geomfile is then opened relative to the current directory and read for the actual mesh.
the geometry file layout π β she goes like this:
- first line: the vertex, face, and edge counts
- then: one
x y zcoordinate triple per vertex - then: one face per line, listing an edge count followed by the 1-based vertex indices of that face
Per-face planes get fit, and the faces are glued into a single NMG shell. Iconic. β¨
if you want the reverse trip, that's g-off(1) β and for actually working with the resulting database you want mged(1) π
π EXAMPLES π
Example 1. Convert an OFF model and view it β
off-g widget.off widget.g
mged widget.g
Reads the OFF descriptor widget.off (and the geometry file it names), producing widget.g with an NMG solid s.widget wrapped in the region r.widget. The database is then opened in mged(1) for inspection and further editing. ate. π
π SEE ALSO π
go read them, iykyk π
πΈ AUTHOR πΈ
BRL-CAD Team β collectively slaying since forever π
π COPYRIGHT π
This software is Copyright (c) 1989-2026 by the United States Government as represented by U.S. Army Research Laboratory.
fr fr, that range is 1989-2026, that's literally decades of government-funded geometry π
π¦ BUG REPORTS π¦
Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org π§
like, if something's broken, tell the devs, don't suffer in silence bestie π
and that's the whole page!! π this gem is part of the BRL-CAD manual, page OFF-G(1) β signed off from the BRL-CAD corner of the docs, no date drama, just vibes and geometry πβ¨π«Ά
π¦ 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