'\" t
.\"     Title: BB
.\"    Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL-NS Stylesheets v1.76.1 <http://docbook.sf.net/>
.\"      Date: 04/13/2022
.\"    Manual: BRL-CAD User Commands
.\"    Source: BRL-CAD
.\"  Language: English
.\"
.TH "BB" "nged" "04/13/2022" "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"
bb \- Report dimensional information about objects using Bounding Boxes
.SH "SYNOPSIS"
.HP \w'\fBbb\fR\ 'u
\fBbb\fR [\fIoptions\fR...] \fIobjects\fR...
.SH "DESCRIPTION"
.PP

\fIbb\fR
calculates a bounding box for an object or set of objects supplied as arguments, and reports information about bounding box dimensions at the MGED command prompt\&. It supports various options, most of which control the type of information reported\&. It can optionally create an ARB8 in a database corresponding to the bounding box of the object(s)\&. By default, an axis\-aligned bounding box (AABB) is created, but support for an oriented bounding box (OBB) is available as well\&.
.PP
The
\fIobjects\fR
list consists of one or more geometry objects in the current database\&.
.PP
\fB\-c\fR bbox_object_name\&.s
.RS 4
Create an ARB8 primitive in the current database with the dimensions of the bounding box of the object(s) listed\&.
.RE
.PP
\fB\-d\fR
.RS 4
Report dimensional information (length, width and height\&.) On by default\&.
.RE
.PP
\fB\-e\fR
.RS 4
Report the extent of the bounding box using the min and max 3D points of the bounding box\&.
.RE
.PP
\fB\-o\fR
.RS 4
Calculate an oriented bounding box instead of an axis aligned bounding box\&. This will produce tighter bounding volumes if the geometry is not symmetric to the XYZ grid\&. Uses the algorithms and code from Barequet and Har\-Peled \- see the papers
\m[blue]\fBEfficiently Approximating the Minimum\-Volume Bounding Box of a Point Set in Three Dimensions\fR\m[](SODA 99) and
\m[blue]\fBA Practical Approach for Computing the Diameter of a Point\-Set\fR\m[]
for details\&.
.RE
.PP
\fB\-q\fR
.RS 4
Quiet mode \- disable printing of the header, which is on by default\&. Useful when processing output from bb\&.
.RE
.PP
\fB\-u\fR
.RS 4
Ignore air volumes when calculating the bounding box\&.
.RE
.PP
\fB\-v\fR
.RS 4
Print the volume of the bounding box\&. On by default\&.
.RE
.SH "EXAMPLES"
.PP
\fBExample\ \&1.\ \&Determine the size of the bounding box for a Havoc helicopter\fR
.PP

\fBbb havoc\fR
.sp
.if n \{\
.RS 4
.\}
.nf
Bounding Box Dimensions, Object(s) havoc:
X Length: 1988\&.4 cm
Y Length: 1683\&.6 cm
Z Length: 625\&.0 cm
Bounding Box Volume: 2092246392\&.4 cm^3
.fi
.if n \{\
.RE
.\}
.sp

.PP
\fBExample\ \&2.\ \&Report only the min and max points of a bounding box\fR
.PP

\fBbb \-q \-e havoc\fR
.sp
.if n \{\
.RS 4
.\}
.nf
min {\-759\&.447479 \-8437\&.866455 \-890\&.000000} max {19124\&.621094 8397\&.693207 5360\&.000000}
.fi
.if n \{\
.RE
.\}
.sp

.PP
\fBExample\ \&3.\ \&Bounding Box for multiple components\fR
.PP

\fBbb havoc_front havoc_middle havoc_tail\fR
.sp
.if n \{\
.RS 4
.\}
.nf
Bounding Box Dimensions, Object(s) havoc_front,  havoc_middle,  havoc_tail:
X Length: 1775\&.9 cm
Y Length: 358\&.0 cm
Z Length: 536\&.0 cm
Bounding Box Volume: 340782488\&.9 cm^3
.fi
.if n \{\
.RE
.\}
.sp

.PP
\fBExample\ \&4.\ \&Create Bounding Box ARB8 in database\fR
.PP

\fBbb \-c havoc_parts_bbox\&.s havoc_front havoc_middle havoc_tail\fR
.sp
.if n \{\
.RS 4
.\}
.nf
mged> bb \-c havoc_parts_bbox\&.s havoc_front havoc_middle havoc_tail
Bounding Box Dimensions, Object(s) havoc_front,  havoc_middle,  havoc_tail:
X Length: 1775\&.9 cm
Y Length: 358\&.0 cm
Z Length: 536\&.0 cm
Bounding Box Volume: 340782488\&.9 cm^3


havoc havoc_tail havoc_middle havoc_parts_bbox\&.s havoc_front
mged> l havoc_parts_bbox\&.s
havoc_parts_bbox\&.s:  ARB8
	1 (\-75\&.9447, \-158, \-4\&.86374e\-06)
	2 (\-75\&.9447, \-158, 536)
	3 (\-75\&.9447, 200, 536)
	4 (\-75\&.9447, 200, \-4\&.86374e\-06)
	5 (1700, \-158, \-4\&.86374e\-06)
	6 (1700, \-158, 536)
	7 (1700, 200, 536)
	8 (1700, 200, \-4\&.86374e\-06)

.fi
.if n \{\
.RE
.\}
.sp

.SH "SEE ALSO"
.PP

\fBmake_bb\fR(nged)\&.
.SH "COPYRIGHT"
.PP
This software is Copyright (c) 2009\-2021 United States Government as represented by the U\&.S\&. Army Research Laboratory\&.
.SH "BUG REPORTS"
.PP
Reports of bugs or problems should be submitted via electronic mail to <bugs@brlcad\&.org>\&.
.SH "AUTHOR"
.PP
BRL\-CAD Team
