BO(nged)

Creates or retrieves binary opaque objects.

πŸ“… published 7.44.0, from nixpkgs unstable

πŸ’… BO(nged) β€” bestie's guide to binary opaque objects ✨

okay so real quick, this is a page from the BRL-CAD User Commands manual, and it's literally all about the bo command. she's giving main character energy in the nged tool and honestly? iconic.


✨ NAME ✨

bo β€” creates or retrieves binary opaque objects. that's it, that's the vibe. 🫢


🌸 SYNOPSIS 🌸

bo {[-i u {type}] | [-o]} {destination} {source}

no cap, that's the whole shape of it. destination and source both go at the end, and you gotta pick -i or -o up front. iykyk.


πŸ’– DESCRIPTION πŸ’–

so this command is your girl for creating or exporting binary opaque objects. the way that you must specify one of -i or -o β€” like, exactly one β€” to input or output data respectively:

  • -i will create a binary object
  • -o will write out a binary object's data

rn, only uniform binary objects (arrays of values, bestie β€” think "a big ol' list of the same type") are supported on input. just so we're clear πŸŽ€

On input, destination is the name of the object you're creating, and source is the path to a file to read. πŸ¦‹

On output, destination is the path to a file you're writing out, filled with the contents of the binary object specified as source. πŸ’…

and the type β€” you pass it with -i u β€” can be any one of these, no cap:

  • f β†’ float
  • d β†’ double
  • c β†’ char (8 bit)
  • s β†’ short (16 bit)
  • i β†’ int (32 bit)
  • l β†’ long (64 bit)
  • C β†’ unsigned char (8 bit)
  • S β†’ unsigned short (16 bit)
  • I β†’ unsigned int (32 bit)
  • L β†’ unsigned long (64 bit)
⭐ psst β€” note: this command was previously named dbbinary. so if you see the old name floating around, that's her before the glow-up. πŸ’€

πŸ”₯ EXAMPLES πŸ”₯

these examples show the bo command doing both things: creating with -i and retrieving with -o. let's get into it bestie 🌈

⭐ Example 1. Create an opaque uniform binary object of characters with a specified name containing the contents of a particular file

mged>bo -i u c cmds /usr/brlcad/html/manuals/mged/mged_cmds.html

Creates an opaque uniform binary object of characters with the name cmds that contains the contents of the file /usr/brlcad/html/manuals/mged/mged_cmds.html. literally just scooping that file into the database. πŸ“

⭐ Example 2. Import data for a displacement map (DSP) object

mged>bo -i u S dsp.data /path/to/file.dsp

This imports a file named file.dsp that contains DSP data, i.e., raw data in unsigned short (16-bit) format. The data is saved in the .g database into an object named dsp.data. When creating a DSP, this dsp.data object can be specified as the data source. πŸ‘‘

⭐ Example 3. Copy the contents of a particular binary object into a specified file

mged>bo -o /home/jim/cmds.html cmds

Copies the contents of the binary object named cmds into the file named /home/jim/cmds.html. reversed energy, same slay. πŸ’œ


🧚 AUTHOR 🧚

BRL-CAD Team β€” the icons themselves πŸŽ€


πŸ™ˆ BUG REPORTS πŸ™ˆ

if you find a bug or a problem, don't suffer in silence bestie β€” reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org. they wanna hear from you fr fr. πŸ’–


not me ending on a cute sign-off β€” this page came to you courtesy of the BRL-CAD manual pages, under the BO(nged) listing. periodt. πŸ’…βœ¨
πŸ“¦ where this page comes from