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

<refentry xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="decompose">
  
  <refmeta>
    <refentrytitle>DECOMPOSE</refentrytitle>
    <manvolnum>nged</manvolnum>
    <refmiscinfo class="source">BRL-CAD</refmiscinfo>
    <refmiscinfo class="manual">BRL-CAD User Commands</refmiscinfo>
  </refmeta>
  
  <refnamediv xml:id="name">
    <refname>decompose</refname>
    <refpurpose>
      Processes an NMG shape and produces a series of new 
      <emphasis>NMG</emphasis> shapes consisting of each maximally 
      connected shell in the original <emphasis>NMG</emphasis> shape.
    </refpurpose>
  </refnamediv>
  
  <!-- body begins here -->
  <refsynopsisdiv xml:id="synopsis">
    <cmdsynopsis sepchar=" ">
      <command>decompose</command>    
      <arg choice="req" rep="norepeat"><replaceable>NMG_shape</replaceable></arg>
      <arg choice="opt" rep="norepeat"><replaceable>prefix</replaceable></arg>
    </cmdsynopsis>
  </refsynopsisdiv>
  
  <refsection xml:id="description"><info><title>DESCRIPTION</title></info>
    
    <para>
      Processes an NMG shape and produces a series of new <emphasis>NMG</emphasis> 
      shapes consisting of each maximally connected shell in the original 
      <emphasis>NMG</emphasis> shape. If an optional prefix is supplied, the 
      resulting <emphasis>NMG</emphasis> shapes will be named by using the prefix 
      and adding an underscore character and a number to make the name unique. If 
      no prefix is supplied, the default prefix "sh" will be used.  
    </para>
  </refsection>
  
  <refsection xml:id="examples"><info><title>EXAMPLES</title></info>
    
    <para>
      The example shows the use of the <command>decompose</command> command 
      (with an optional prefix) to decompose an NMG shape into shells, which are 
      then put into separate, uniquely named NMG shapes.
    </para>
    <example><info><title>Decompose an NMG shape into shells, which are then put into separate, 
      uniquely named NMG shapes.
      </title></info>
      
      <para><prompt>mged&gt;</prompt> <userinput>decompose shape.nmg part</userinput></para>
      <para>
	Decomposes the <emphasis>NMG</emphasis>shape named <emphasis>shape.nmg</emphasis> into 
	maximally connected shells and puts each resulting shell into a separate 
	<emphasis>NMG</emphasis> shape named <emphasis>part_1, part_2, ....</emphasis>
      </para>
    </example>
  </refsection>
  
  <info><corpauthor>BRL-CAD Team</corpauthor></info>
  
  <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;devs@brlcad.org&gt;, or via the "cadbug.sh" script.
    </para>
  </refsection>
</refentry>
