<!-- Converted by db4-upgrade version 1.0 -->

<refentry xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="bb1">
  <refmeta>
    <refentrytitle>BB</refentrytitle>
    <manvolnum>nged</manvolnum>
    <refmiscinfo class="source">BRL-CAD</refmiscinfo>
    <refmiscinfo class="manual">BRL-CAD User Commands</refmiscinfo>
  </refmeta>
  <refnamediv xml:id="name">
    <refname>bb</refname>
    <refpurpose>Report dimensional information about objects using Bounding Boxes</refpurpose>
  </refnamediv>
  
  <!-- body begins here -->
  <refsynopsisdiv xml:id="synopsis">
    <cmdsynopsis sepchar=" ">
      <command>bb</command>    
      <arg choice="opt" rep="repeat"><replaceable>options</replaceable></arg>
      <arg choice="plain" rep="repeat"><replaceable>objects</replaceable></arg>
    </cmdsynopsis>
  </refsynopsisdiv>
  
  <refsection xml:id="description"><info><title>DESCRIPTION</title></info>
    
    <para>
      <emphasis remap="I">bb</emphasis> calculates an axis-aligned
      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).
    </para>
      
    <para>
      The <emphasis remap="I">objects</emphasis> list consists of one
      or more geometry objects in the current database.
    </para>
    
    <variablelist remap="TP">
      <varlistentry>
	<term><option>-c</option> bbox_object_name.s</term>
	<listitem>
	  <para>Create an ARB8 primitive in the current database with the dimensions of
          the bounding box of the object(s) listed.</para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><option>-e</option></term>
	<listitem>
	  <para>
	   Report the extent of the bounding box using the min and max 3D points of the bounding
           box.
	  </para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><option>-d</option></term>
	<listitem>
	  <para>Report dimensional information (length, width and height.)  On by default.</para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><option>-e</option></term>
	<listitem>
	  <para>
	   Report the extent of the bounding box using the min and max 3D points of the bounding
           box.
	  </para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><option>-q</option></term>
	<listitem>
	  <para>
	    Quiet mode - disable printing of the header, which is on by default.  Useful when processing output from
            bb.
	  </para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><option>-u</option></term>
	<listitem>
	  <para>
            Ignore air volumes when calculating the bounding box.
	  </para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><option>-v</option></term>
	<listitem>
	  <para>
            Print the volume of the bounding box.  On by default.
	  </para>
	</listitem>
      </varlistentry>

    </variablelist>
   
  </refsection>
 
  <refsection xml:id="examples"><info><title>EXAMPLES</title></info>
    

    <example><info><title>Determine the size of the bounding box for a Havoc helicopter</title></info>
      
      
      <para>
	<userinput>bb havoc</userinput>
<literallayout class="normal">
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
</literallayout>
      </para>

    </example>
    <example><info><title>Report only the min and max points of a bounding box</title></info>
      
      
      <para>
	<userinput>bb -q -e havoc</userinput>
<literallayout class="normal">
min {-759.447479 -8437.866455 -890.000000} max {19124.621094 8397.693207 5360.000000}
</literallayout>
      </para>

    </example>
    <example><info><title>Bounding Box for multiple components</title></info>
      
      
      <para>
	<userinput>bb havoc_front havoc_middle havoc_tail</userinput>
<literallayout class="normal">
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
</literallayout>
      </para>

    </example>
    <example><info><title>Create Bounding Box ARB8 in database</title></info>
      
      
      <para>
	<userinput>bb -c havoc_parts_bbox.s havoc_front havoc_middle havoc_tail</userinput>
<literallayout class="normal">
mged&gt; 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&gt; 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)

</literallayout>
      </para>

    </example>
  </refsection>

  <refsection xml:id="see_also"><info><title>SEE ALSO</title></info>
    
    <para>
    <citerefentry><refentrytitle>make_bb</refentrytitle><manvolnum>nged</manvolnum></citerefentry>.
   </para>
  </refsection>

  <refsection xml:id="copyright"><info><title>COPYRIGHT</title></info>
    
    <para>
      This software is Copyright (c) 2009-2012 United States Government as represented by the 
      U.S. Army Research Laboratory. All rights reserved.
    </para>
  </refsection>
  
  <refsection xml:id="bug_reports"><info><title>BUG REPORTS</title></info>
    
    <para>
      Reports of bugs or problems should be submitted via electronic
      mail to &lt;bugs@brlcad.org&gt;.
    </para>
  </refsection>
  
  <info><corpauthor>BRL-CAD Team</corpauthor></info>
</refentry>
