COMGEOM-G(1)

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

πŸ’… COMGEOM-G(1) β€” bestie edition πŸŽ€

okay so picture this: this is a page from the BRL-CAD manual set, COMGEOM-G(1), and it's literally about turning old-school GIFT COMGEOM models into shiny MGED databases. iffy acronyms, but we ball. ✨

🌸 NAME 🌸

comgeom-g β€” converts a GIFT COMGEOM model into an MGED database. that's it, that's the whole job, and she does it well 🫢

⭐ SYNOPSIS ⭐

comgeom-g [-h] [-?] [-d debug_lvl] [-v version_num] [-s name_suffix] input_file output_file

πŸ’– DESCRIPTION πŸ’–

so comgeom-g reads a COMGEOM format model out of a GIFT-style input file, converts all that geometry into the internal form the BRL-CAD package uses, and writes out an MGED-style binary database. glow-up complete, no cap. πŸ”₯

naming rules, and you will be quizzed on these:

  • every solid gets the name s###, keeping the COMGEOM solid number.
  • every region gets the name r###, keeping the COMGEOM region number.
  • regions get grouped into various groups g### based on their region-id numbers:
    • group g00 gets all regions with a region-id of zero
    • g0 gets ids 1 through 99
    • g1 gets ids 100 through 199
    • etc., etc., you see the pattern bestie πŸ’…

in the resulting database, a high-level group all.g is created. and here's the units lore: the units used in a COMGEOM file are specified on a header record, while the units of an MGED database are always millimeters. so comgeom-g does automatic units conversion for you using the built-in units conversion feature of libwdb(3). she's thoughtful like that. 🧚


✨ OPTIONS ✨

  • -d debug_lvl β€” sets the debug/verbosity level. by default (level 0) the program reports only the title, units, and major errors. any nonzero level turns on verbose status reports describing the expected file layout and the progress of the conversion β€” super useful for large or problematic models. πŸ‘‘
  • -h, -? β€” print a usage summary and exit. the classic "help me help you" move. 🫢
  • -s name_suffix β€” appends the specified suffix to the names of all generated solids, regions, and groups (but not the top-level all.g group). any leading period must be included in the suffix. the suffix is limited to 15 characters. keep it cute and keep it short. πŸŽ€
  • -v input_vers# β€” specify the COMGEOM input format version. the default is version 5 (cg5); version 4 is also supported. version 1 selects the DoE MORSE/RAFFLE format (believed to be the original MAGIC format). any other value is rejected β€” no in-between, no vibes-based guessing, she will not be doing that. πŸ’€

🌈 EXAMPLES 🌈

πŸ¦‹ Example 1. Convert a version 4 COMGEOM file with verbose output

comgeom-g -d 1 -v 4 model.cg model.g

converts the COMGEOM version 4 input model.cg into the BRL-CAD database model.g, printing the expected file layout and per-item progress reports during the conversion. raising the debug level is the quickest way to find which solid or region card a malformed input file is choking on. genuinely the "tell me where it hurts" of flags. 😭

πŸ¦‹ Example 2. Convert and merge two COMGEOM models with namespaced names

comgeom-g -s _a model_a.cg combined.g
comgeom-g -s _b model_b.cg combined.g

because comgeom-g appends to an existing output database rather than overwriting it, two COMGEOM models can be merged into one BRL-CAD database. the -s suffixes ("a" and "_b") keep the auto-generated s###, r###, and g### names from each model distinct so they do not collide in _combined.g. the result can then be inspected with mged(1). two models, one database, zero name collisions. iconic. πŸ’œ

heads up: combined.g in the second command and _combined.g in the explanation are exactly what the page says β€” copy them verbatim and don't "fix" anything, okay bestie? πŸ™ˆ

πŸ” DIAGNOSTICS πŸ”

the diagnostics are intended to be self-explanatory. familiarity with GIFT COMGEOM terminology will be helpful. iykyk. πŸ€“

πŸ’€ BUGS πŸ’€

it is expected that the input file should be a valid COMGEOM model. while quite a bit of input checking is performed, wildly incorrect input may produce amusing results. so like... funny, not reliable. important distinction!! 😭πŸ”₯

πŸ‘€ SEE ALSO πŸ‘€

brlcad(1), mged(1), libwdb(3)

πŸ‘‘ 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. tell them everything, they're nice. πŸ’Œ


okay that's the whole page, you're so welcome. this was COMGEOM-G(1) from the BRL-CAD manual set, Β© 1989-2026, and you can catch it again whenever you need her. slay, go convert some geometry. πŸŒŸπŸ’…

πŸ“¦ where this page comes from