Index: g-x3d.xml
===================================================================
Index: dbclean.xml
===================================================================
--- dbclean.xml	(revision 0)
+++ dbclean.xml	(revision 0)
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!-- lifted from troff+man by doclifter -->
+<refentry xmlns='http://docbook.org/ns/docbook' version='5.0' xml:lang='en' xml:id='dbclean1'>
+<refmeta>
+<refentrytitle>DBCLEAN</refentrytitle>
+<manvolnum>1</manvolnum>
+<refmiscinfo class='source'>BRL-CAD</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>dbclean</refname>
+<refpurpose> a shell script for compacting mged databases.</refpurpose>
+</refnamediv>
+<!-- body begins here -->
+<refsynopsisdiv xml:id='synopsis'>
+<cmdsynopsis>
+  <command>dbclean</command>    
+    <arg choice='plain'><replaceable>in_model.g</replaceable></arg>
+    <arg choice='plain'><replaceable>out_model.g</replaceable></arg>
+</cmdsynopsis>
+</refsynopsisdiv>
+
+
+<refsect1 xml:id='description'><title>DESCRIPTION</title>
+<para><emphasis remap='I'>Dbclean</emphasis>
+operates on the indicated input database
+<emphasis remap='I'>in_model.g</emphasis>
+and produces a compacter version of the same
+<emphasis remap='I'>out_model.g.</emphasis></para>
+
+<para>The objective is to remove ``holes" left in the original database by using
+the <emphasis remap='I'>kill/killall</emphasis> command in
+<citerefentry><refentrytitle>mged</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
+Note that when a database is compacted in this manner, the compacting is
+dependent on the successful completion of the converters
+<citerefentry><refentrytitle>g2asc</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+and
+<citerefentry><refentrytitle>asc2g</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
+The compacting will only be aborted if one of the conversions fails.  Thus,
+when either converter ``skips" solids, <command>dbclean</command> will continue, and
+<emphasis remap='I'>out_model.g</emphasis>
+will be written, albeit, without the skipped solids.  This will also
+result in a smaller database.</para>
+</refsect1>
+
+<refsect1 xml:id='example'><title>EXAMPLE</title>
+<para>This section will acquaint the user with the ordinary usage of <command>dbclean</command>.</para>
+
+<literallayout remap='.nf'>
+<emphasis remap='I'>dbclean in_model.g out_model.g</emphasis>
+</literallayout> <!-- .fi -->
+
+<para>This will result in a compacted version of the input.</para>
+</refsect1>
+
+<refsect1 xml:id='see_also'><title>SEE ALSO</title>
+<para><citerefentry><refentrytitle>mged</refentrytitle><manvolnum>1</manvolnum></citerefentry>.</para>
+</refsect1>
+
+<refsect1 xml:id='diagnostics'><title>DIAGNOSTICS</title>
+<para>Numerous error conditions are possible, usually due to errors in
+the geometry database.
+Descriptive messages are printed on standard error (file descriptor 2).</para>
+</refsect1>
+
+<refsect1 xml:id='bugs'><title>BUGS</title>
+<para>Most deficiencies observed while using the
+<command>dbclean</command>
+program are usually with the
+<citerefentry><refentrytitle>g2asc</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+and
+<citerefentry><refentrytitle>asc2g</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+packages instead.</para>
+</refsect1>
+
+<refsect1 xml:id='author'><title>AUTHOR</title>
+<para>Susanne Muuss, J.D.</para>
+</refsect1>
+
+<refsect1 xml:id='copyright'><title>COPYRIGHT</title>
+<para>This software is Copyright (c) 1991-2012 United States Government as
+represented by the U.S. Army Research Laboratory. All rights reserved.</para>
+</refsect1>
+
+<refsect1 xml:id='bug_reports'><title>BUG REPORTS</title>
+<para>Reports of bugs or problems should be submitted via electronic
+mail to &lt;devs@brlcad.org&gt;.</para>
+</refsect1>
+</refentry>
+
Index: nastran-g.xml
===================================================================
Index: enf-g.xml
===================================================================
Index: dbupgrade.xml
===================================================================
--- dbupgrade.xml	(revision 0)
+++ dbupgrade.xml	(revision 0)
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!-- lifted from troff+man by doclifter -->
+<refentry xmlns='http://docbook.org/ns/docbook' version='5.0' xml:lang='en' xml:id='dbupgrade1'>
+<refmeta>
+<refentrytitle>DBUPGRADE</refentrytitle>
+<manvolnum>1</manvolnum>
+<refmiscinfo class='source'>BRL-CAD</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>dbupgrade</refname>
+<refpurpose> a program to upgrade BRL-CAD mged geometry databases files to the current version.</refpurpose>
+</refnamediv>
+<!-- body begins here -->
+<refsynopsisdiv xml:id='synopsis'>
+<cmdsynopsis>
+  <command>dbupgrade</command>    
+    <arg choice='plain'><replaceable>input.g</replaceable></arg>
+    <arg choice='plain'><replaceable>output.g</replaceable></arg>
+</cmdsynopsis>
+</refsynopsisdiv>
+
+
+<refsect1 xml:id='description'><title>DESCRIPTION</title>
+<para><command>dbupgrade</command>
+operates on the indicated input geometry database
+<emphasis remap='I'>input.g</emphasis>
+recognizing the version of the BRL-CAD database provided as input and
+then converting it to the current database version.  Output is then saved to the specified
+<emphasis remap='I'>output.g</emphasis>
+file.</para>
+
+<para>Note that this tool does not automatically &ldquo;fix&rdquo; an existing (v4
+format) binary database that was transferred from a
+binary-incompatible platform.  However, if you run
+<command>dbupgrade</command>
+on the file before transferring from that platform, the upgraded
+output file will be platform independent.</para>
+
+<para>Running
+<command>dbupgrade</command>
+removes the need to run
+<citerefentry><refentrytitle>g2asc</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+and
+<citerefentry><refentrytitle>asc2g</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+on a database.  The latest BRL-CAD geometry database format is
+platform independent.</para>
+</refsect1>
+
+<refsect1 xml:id='see_also'><title>SEE ALSO</title>
+<para><citerefentry><refentrytitle>mged</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>g2asc</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>asc2g</refentrytitle><manvolnum>1</manvolnum></citerefentry>.</para>
+</refsect1>
+
+<refsect1 xml:id='diagnostics'><title>DIAGNOSTICS</title>
+<para>Numerous error conditions are possible, usually due to errors in
+the geometry database.
+Descriptive messages are printed on standard error (file descriptor 2).</para>
+
+</refsect1>
+
+<refsect1 xml:id='author'><title>AUTHOR</title>
+<para>BRL-CAD Team</para>
+
+</refsect1>
+
+<refsect1 xml:id='copyright'><title>COPYRIGHT</title>
+<para>This software is Copyright (c) 2006-2012 by the United States
+Government as represented by U.S. Army Research Laboratory.</para>
+</refsect1>
+
+<refsect1 xml:id='bug_reports'><title>BUG REPORTS</title>
+<para>Reports of bugs or problems should be submitted via electronic
+mail to &lt;devs@brlcad.org&gt;.</para>
+</refsect1>
+</refentry>
+
Index: g-nff.xml
===================================================================
Index: g-obj.xml
===================================================================
Index: cy-g.xml
===================================================================
Index: poly-bot.xml
===================================================================
Index: fast4-g.xml
===================================================================
Index: viewpoint-g.xml
===================================================================
Index: conv-vg2g.xml
===================================================================
--- conv-vg2g.xml	(revision 0)
+++ conv-vg2g.xml	(revision 0)
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!-- lifted from troff+man by doclifter -->
+<refentry xmlns='http://docbook.org/ns/docbook' version='5.0' xml:lang='en' xml:id='convvg2g1'>
+<refmeta>
+<refentrytitle>CONV-VG2G</refentrytitle>
+<manvolnum>1</manvolnum>
+<refmiscinfo class='source'>BRL-CAD</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>conv-vg2g</refname>
+<refpurpose>upgrade old to new format binary MGED database</refpurpose>
+</refnamediv>
+<!-- body begins here -->
+<refsynopsisdiv xml:id='synopsis'>
+<cmdsynopsis>
+  <command>conv-vg2g</command>    
+    <arg choice='plain'><replaceable>file.vg</replaceable></arg>
+    <arg choice='plain'><replaceable>file.g</replaceable></arg>
+</cmdsynopsis>
+</refsynopsisdiv>
+
+
+<refsect1 xml:id='description'><title>DESCRIPTION</title>
+<para><emphasis remap='I'>Conv-vg2g</emphasis>
+converts several older forms of binary
+<citerefentry><refentrytitle>mged</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+databases to the current form.</para>
+
+<para>The conversion from version 3 to version 4 (the current version)
+is fairly straightforward.
+Conversion from older versions requires additional information,
+for which the user is prompted.  The units of the database must
+be specified as:
+1=mm, 2=cm, 3=meters, 4=inches, 5=feet.
+A title for the database is also requested.</para>
+</refsect1>
+
+<refsect1 xml:id='see_also'><title>SEE ALSO</title>
+<para><citerefentry><refentrytitle>brlcad</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>mged</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>libged</refentrytitle><manvolnum>3</manvolnum></citerefentry></para>
+</refsect1>
+
+<refsect1 xml:id='diagnostics'><title>DIAGNOSTICS</title>
+<para>Error messages are intended to be self-explanatory,
+and usually indicate errors in the input database.
+It may be possible to rescue a damaged old database
+by suitably modifying the source code to the converter.</para>
+</refsect1>
+
+<refsect1 xml:id='author'><title>AUTHOR</title>
+<para>Keith A. Applin</para>
+
+</refsect1>
+
+<refsect1 xml:id='copyright'><title>COPYRIGHT</title>
+<para>This software is Copyright (c) 1989-2012 by the United States
+Government as represented by U.S. Army Research Laboratory.</para>
+</refsect1>
+
+<refsect1 xml:id='bug_reports'><title>BUG REPORTS</title>
+<para>Reports of bugs or problems should be submitted via electronic
+mail to &lt;devs@brlcad.org&gt;.</para>
+</refsect1>
+</refentry>
+
Index: bot_dump.xml
===================================================================
--- bot_dump.xml	(revision 0)
+++ bot_dump.xml	(revision 0)
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!-- lifted from troff+man by doclifter -->
+<refentry xmlns='http://docbook.org/ns/docbook' version='5.0' xml:lang='en' xml:id='bot_dump1'>
+<refmeta>
+<refentrytitle>BOT_DUMP</refentrytitle>
+<manvolnum>1</manvolnum>
+<refmiscinfo class='source'>BRL-CAD</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>bot_dump</refname>
+<refpurpose>export polygonal BoT primitives without performing evaluation</refpurpose>
+</refnamediv>
+<!-- body begins here -->
+<refsynopsisdiv xml:id='synopsis'>
+<cmdsynopsis>
+  <command>bot_dump</command>    <arg choice='opt'>-b </arg>
+    <arg choice='opt'>-n </arg>
+    <arg choice='opt'>-m <replaceable>directory</replaceable></arg>
+    <arg choice='opt'>-o <replaceable>file</replaceable></arg>
+    <group choice='opt'><arg choice='plain'>-t <replaceable>dxf</replaceable></arg><arg choice='plain'><replaceable>obj</replaceable></arg><arg choice='plain'><replaceable>sat</replaceable></arg><arg choice='plain'><replaceable>stl</replaceable></arg></group>
+    <arg choice='opt'>-u <replaceable>units</replaceable></arg>
+    <arg choice='opt'>-v </arg>
+    <arg choice='plain'><replaceable>geom.g</replaceable></arg>
+    <arg choice='opt'><arg choice='plain'><replaceable>bot1</replaceable></arg><arg choice='plain' rep='repeat'><replaceable>bot2</replaceable></arg></arg>
+</cmdsynopsis>
+</refsynopsisdiv>
+
+
+<refsect1 xml:id='description'><title>DESCRIPTION</title>
+<para><command>bot_dump</command></para>
+
+<para>The
+<option>-b</option>
+option may be specified to indicate that the output file should be in
+a binary format (e.g., for formats that support ascii and binary
+formats like stl).</para>
+
+<para>If the
+<option>-n</option>
+option is specified, BoT surface normals will be included in the output
+of
+<emphasis remap='I'>obj</emphasis>
+files. This option is specific to
+<emphasis remap='I'>obj</emphasis>
+file generation since normal vector outputs are already an integral
+part of the
+<emphasis remap='I'>stl</emphasis>
+file outputs and both the
+<emphasis remap='I'>dxf</emphasis>
+and
+<emphasis remap='I'>sat</emphasis>
+file formats do not support or require surface normal generation.</para>
+
+<para>If the
+<option>-m</option>
+option is specified, then BoTs will be output to the directory name
+specified with one BoT per file.</para>
+
+<para>The
+<option>-o</option>
+option specifies what output file the BoT data should be dumped to.</para>
+
+<para>The
+<option>-t</option>
+is used to specify the desired output file type.  The default output
+type is STL in ASCII format.</para>
+
+<para>The
+<option>-u</option>
+option takes a units string that indicates the unit conversion to
+perform during output (converting from internal millimeter values to
+the unit type specified).</para>
+</refsect1>
+
+<refsect1 xml:id='example'><title>EXAMPLE</title>
+<literallayout remap='RS'>
+<synopsis>
+$ <emphasis remap='I'>bot_dump -o some_bot_dump.dxf -t dxf sample.g some_bot</emphasis>
+</synopsis>
+</literallayout> <!-- remap='RE' -->
+</refsect1>
+
+<refsect1 xml:id='diagnostics'><title>DIAGNOSTICS</title>
+<para>Error messages are intended to be self-explanatory.</para>
+
+</refsect1>
+
+<refsect1 xml:id='author'><title>AUTHOR</title>
+<para>BRL-CAD Team</para>
+
+</refsect1>
+
+<refsect1 xml:id='copyright'><title>COPYRIGHT</title>
+<para>This software is Copyright (c) 2008-2012 by the United States
+Government as represented by U.S. Army Research Laboratory.</para>
+</refsect1>
+
+<refsect1 xml:id='bug_reports'><title>BUG REPORTS</title>
+<para>Reports of bugs or problems should be submitted via electronic
+mail to &lt;devs@brlcad.org&gt;.</para>
+</refsect1>
+</refentry>
+
Index: g-acad.xml
===================================================================
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt	(revision 53825)
+++ CMakeLists.txt	(working copy)
@@ -1,18 +1,38 @@
 set(docbook_man1_EN
   asc2dsp.xml
+  bot_dump.xml
+  bot_shell-vtk.xml
   bwscale.xml
   coil.xml
+  conv-vg2g.xml
   db.xml
+  dbclean.xml
+  dbupgrade.xml
+  enf-g.xml
+  fast4-g.xml
+  g-acad.xml
+  g-egg.xml
+  g-nff.xml
+  g-obj.xml
+  g-shell-rect.xml
+  g-var.xml
+  g-vrml.xml
+  g-x3d.xml
   gqa.xml
   mged.xml
+  nastran-g.xml
   nirt.xml
   obj-g.xml
+  ply-g.xml
+  poly-bot.xml
+  proe-g.xml
   rt.xml
   rtarea.xml
   rtcheck.xml
   rtedge.xml
   rtwizard.xml
   tire.xml
+  viewpoint-g.xml
   )
 
 DOCBOOK_TO_HTML(man1 docbook_man1_EN html/man1/en "")
Index: g-egg.xml
===================================================================
Index: g-shell-rect.xml
===================================================================
Index: ply-g.xml
===================================================================
Index: proe-g.xml
===================================================================
Index: g-vrml.xml
===================================================================
Index: g-var.xml
===================================================================
Index: bot_shell-vtk.xml
===================================================================
--- bot_shell-vtk.xml	(revision 0)
+++ bot_shell-vtk.xml	(revision 0)
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!-- lifted from troff+man by doclifter -->
+<refentry xmlns='http://docbook.org/ns/docbook' version='5.0' xml:lang='en' xml:id='bot_shellvtk1'>
+<refmeta>
+<refentrytitle>BOT_SHELL-VTK</refentrytitle>
+<manvolnum>1</manvolnum>
+<refmiscinfo class='source'>BRL-CAD</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>bot_shell-vtk</refname>
+<refpurpose>VTK polydata converter (BRL-CAD to VTK)</refpurpose>
+</refnamediv>
+<!-- body begins here -->
+<refsynopsisdiv xml:id='synopsis'>
+<cmdsynopsis>
+  <command>bot_shell-vtk</command>    <arg choice='opt'>-m </arg>
+    <arg choice='opt'>-n </arg>
+    <arg choice='opt'>-d <replaceable>debug_level</replaceable></arg>
+    <arg choice='opt'>-g <replaceable>cell_size</replaceable></arg>
+    <arg choice='plain'>-o <replaceable>vtk_polydata_output</replaceable></arg>
+    <arg choice='plain'><replaceable>brlcad_database.g</replaceable></arg>
+    <arg choice='plain'><replaceable>object1</replaceable></arg>
+    <arg choice='opt'><arg choice='plain'><replaceable>object2</replaceable></arg><arg choice='plain' rep='repeat'><replaceable>object3</replaceable></arg></arg>
+</cmdsynopsis>
+</refsynopsisdiv>
+
+
+<refsect1 xml:id='description'><title>DESCRIPTION</title>
+<para><command>bot_shell-vtk</command>
+uses raytracing to extract the exterior triangles from a model made up
+of BOT primitives. The default operation is to fire a single ray at each
+triangle of each BOT primitive in the specified objects. The rays are fired
+anti-normalward towards the center of each triangle from outside the model
+bounding box. If the triangle currently under consideration appears as the
+first object hit along the ray, then that triangle is included in the
+VTK polydata output (thus retaining only exterior triangles). Non-BOT
+primitives encountered along the rays may hide BOT triangles, but non-BOT
+primitives do not contribute to the output.
+The
+<option>-m</option>
+option may be specified to enable both the first and last triangles along
+each ray to be added to the output. This can improve performance, by reducing
+the number of rays fired, but may reduce performance for complex models
+because it requires processing each ray completely through the model.
+If the
+<option>-n</option>
+option is specified, the output will include vertex normals in the
+VTK output. If the BOT primitives of the input BRL-CAD model do not
+have vertex normal information, this option will not add any information
+to the output, but will greatly increase the size of the output file.
+If the
+<option>-g</option>
+option is specified, then the rays are fired from a uniform grid for
+three orthogonal directions rather than at each individual triangle. This
+can give a fairly rapid result for larger cell sizes, but is likely to miss
+some triangles. The
+<emphasis remap='I'>cell_size</emphasis>
+must be specified in millimeters.
+The
+<option>-d</option>
+option may be used to get debug output during processing. This is likely to
+only be useful for developers.</para>
+</refsect1>
+
+<refsect1 xml:id='example'><title>EXAMPLE</title>
+<literallayout remap='RS'>
+<synopsis>
+$ <emphasis remap='I'>bot_shell-vtk -o output.vtk sample.g the_exterior</emphasis>
+</synopsis>
+</literallayout> <!-- remap='RE' -->
+</refsect1>
+
+<refsect1 xml:id='diagnostics'><title>DIAGNOSTICS</title>
+<para>Error messages are intended to be self-explanatory.</para>
+
+</refsect1>
+
+<refsect1 xml:id='author'><title>AUTHOR</title>
+<para>BRL-CAD Team</para>
+
+</refsect1>
+
+<refsect1 xml:id='copyright'><title>COPYRIGHT</title>
+<para>This software is Copyright (c) 2003-2012 by the United States
+Government as represented by U.S. Army Research Laboratory.</para>
+</refsect1>
+
+<refsect1 xml:id='bug_reports'><title>BUG REPORTS</title>
+<para>Reports of bugs or problems should be submitted via electronic
+mail to &lt;devs@brlcad.org&gt;.</para>
+</refsect1>
+</refentry>
+
