G-DXF(1)

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

🌸 NAME 🌸

okay so this is the G-DXF(1) manual page, and g-dxf is the BRL-CAD geometry to AutoCAD DXF converter. that's the name, that's the mission, no cap πŸ’…

✨ SYNOPSIS ✨

g-dxf [-v] [-i] [-p] [-x lvl] [-X lvl] [-a abs_tol] [-r rel_tol] [-n norm_tol] [-D dist_tol] [-P ncpus] [-o output.dxf] database.g object(s)

πŸ’… DESCRIPTION πŸ’…

g-dxf converts the specified object(s) from a BRL-CAD database.g file into an AutoCAD DXF file. Each region gets tessellated into triangles via the NMG boolean evaluator and written out, with one DXF layer per region colored to the nearest matching DXF color. By default geometry is emitted as 3DFACE entities; use -p to emit POLYFACE MESH entities instead. If no output file is given with -o, the DXF is written to standard output. ✨

πŸŽ€ OPTIONS πŸŽ€

  • -v β€” verbose output, including object names and the tolerances in use. she's chatty and I love that for her πŸ—£οΈ
  • -i β€” output coordinates in inches instead of the default millimeters. imperial era πŸ¦‹
  • -p β€” emit POLYFACE MESH entities instead of the default 3DFACE entities. mesh upgrade, slay πŸŽ€
  • -x lvl β€” set the librt debug flag to the given hexadecimal value. debug goblin mode πŸ”₯
  • -X lvl β€” set the NMG debug flag to the given hexadecimal value. NMG debug goblin mode, different flag πŸ’€
  • -a abs_tol β€” absolute tessellation tolerance in millimeters (the maximum chord error). setting this disables the relative tolerance. precision bestie behavior ✨
  • -r rel_tol β€” relative tessellation tolerance, a fraction of the bounding box used to bound the chord error (default 0.01). the default is right there, no guessing 🌸
  • -n norm_tol β€” surface normal tessellation tolerance in degrees. setting this disables the relative tolerance. angles got opinions πŸ¦‹
  • -D dist_tol β€” calculation distance tolerance in millimeters; vertices closer than this are considered identical (default 0.0005). tiny distances, big decisions πŸ’…
  • -P ncpus β€” number of CPUs to use. currently disabled: the value is accepted but not used. not me pretending this one does stuff πŸ’€
  • -o output.dxf β€” write to the named DXF file instead of standard output. file destination unlocked 🫢
  • -h, -? β€” print a usage message and exit. tiny escape hatch, iconic πŸ‘‘

πŸ¦‹ EXAMPLES πŸ¦‹

Example 1. Convert geometry to a DXF file

g-dxf -o hull.dxf ship.g hull

Tessellate the hull region from ship.g and write the resulting 3DFACE entities to hull.dxf. very demure, very DXF πŸ’–

Example 2. Tighten tolerances and emit a polyface mesh in inches

g-dxf -p -i -a 0.1 -o turret.dxf ship.g turret

Export the turret region as POLYFACE MESH entities in inches, using a 0.1 mm absolute tessellation tolerance for a finer mesh suitable for import into AutoCAD-style packages. finer mesh, main character energy πŸ”₯

🌈 SEE ALSO 🌈

check out brlcad(1), dxf-g(1), g-stl(1), and g-obj(1) β€” the whole friend group is here 🫢

πŸ‘‘ 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.


cute sign-off: the footer says BRL-CAD and G-DXF(1), and the original page doesn't show a date, so I'm not inventing one β€” that's the whole footer vibe, periodt πŸ«ΆπŸ’œ

πŸ“¦ where this page comes from