'\" t
.\"     Title: BO
.\"    Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL-NS Stylesheets v1.76.1 <http://docbook.sf.net/>
.\"      Date: 08/28/2023
.\"    Manual: BRL-CAD User Commands
.\"    Source: BRL-CAD
.\"  Language: English
.\"
.TH "BO" "nged" "08/28/2023" "BRL\-CAD" "BRL\-CAD User Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
bo \- Used to create or retrieve binary opaque objects\&.
.SH "SYNOPSIS"
.HP \w'\fBbo\fR\ 'u
\fBbo\fR {[\-i\ u\ {type}] | [\-o]} {\fIdestination\fR} {\fIsource\fR}
.SH "DESCRIPTION"
.PP
Used to create or export binary opaque objects\&. One of
\fI\-i\fR
or
\fI\-o\fR
must be specified to input or output data respectively\&. The
\fI\-i\fR
option will create a binary object, and the
\fI\-o\fR
option will write out a binary object\*(Aqs data\&. Currently, only uniform binary objects (arrays of values) are supported on input\&. On input, the
\fIdestination\fR
is the name of the object to be created, and the source is the path to a file to read\&. On output,
\fIdestination\fR
is the path to a file to write out with the contents of the binary object specified as the
\fIsource\fR\&. The
\fItype\fR
may be one of:
.RS 4
f \-> float
.RE
.RS 4
d \-> double
.RE
.RS 4
c \-> char (8 bit)
.RE
.RS 4
s \-> short (16 bit)
.RE
.RS 4
i \-> int (32 bit)
.RE
.RS 4
l \-> long (64 bit)
.RE
.RS 4
C \-> unsigned char (8 bit)
.RE
.RS 4
S \-> unsigned short (16 bit)
.RE
.RS 4
I \-> unsigned int (32 bit)
.RE
.RS 4
L \-> unsigned long (64 bit)
.RE
.PP
Note: this command was previously named "dbbinary"\&.
.SH "EXAMPLES"
.PP
The examples show the use of the
\fBbo\fR
command to both create (\fI\-i\fR
option) and to retrieve a binary object (\fI\-o\fR
option)\&.
.PP
\fBExample\ \&1.\ \&Create an opaque uniform binary object of characters with a specified name containing the contents of a particular file.\fR
.PP
mged>\fBbo \-i u c cmds /usr/brlcad/html/manuals/mged/mged_cmds\&.html\fR
.PP
Creates an opaque uniform binary object of characters with the name
\fIcmds\fR
that contains the contents of the file
\fI/usr/brlcad/html/manuals/mged/mged_cmds\&.html\fR\&.
.PP
\fBExample\ \&2.\ \&Import data for a displacement map (DSP) object\fR
.PP
mged>\fBbo \-i u S dsp\&.data /path/to/file\&.dsp\fR
.PP
This imports a file named
\fIfile\&.dsp\fR
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
\fIdsp\&.data\fR\&. When creating a DSP, this
\fIdsp\&.data\fR
object can be specified as the data source\&.
.PP
\fBExample\ \&3.\ \&Copy the contents of a particular binary object into a specified file.\fR
.PP
mged>\fBbo \-o /home/jim/cmds\&.html cmds\fR
.PP
Copies the contents of the binary object named
\fIcmds\fR
into the file named
\fI/home/jim/cmds\&.html\fR\&.
.SH "AUTHOR"
.PP
BRL\-CAD Team
.SH "BUG REPORTS"
.PP
Reports of bugs or problems should be submitted via electronic mail to
devs@brlcad\&.org
