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

<refentry xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="r">

<refmeta>
  <refentrytitle>R</refentrytitle>
  <manvolnum>nged</manvolnum>
  <refmiscinfo class="source">BRL-CAD</refmiscinfo>
  <refmiscinfo class="manual">BRL-CAD User Commands</refmiscinfo>
</refmeta>

<refnamediv xml:id="name">
  <refname>r</refname>
  <refpurpose>Creates a region with the specified <emphasis>region_name</emphasis>.
   </refpurpose>
</refnamediv>

<!-- body begins here -->
<refsynopsisdiv xml:id="synopsis">
  <cmdsynopsis sepchar=" ">
    <command>r</command>    
    
    <arg choice="req" rep="norepeat"><replaceable>region_name</replaceable></arg>
    <arg choice="req" rep="norepeat"><replaceable>operation object</replaceable></arg>
  </cmdsynopsis>
</refsynopsisdiv>

<refsection xml:id="description"><info><title>DESCRIPTION</title></info>
  
  <para>Creates a region with the specified <emphasis>region_name</emphasis>.
	The <emphasis>region</emphasis> is constructed using the list of Boolean <emphasis>operations</emphasis> 	and <emphasis>object</emphasis>pairs. The operators are represented by the single characters +, -, 	and u for intersection, subtraction, and union, respectively. The <emphasis>object</emphasis> 	associated with each operator may be a combination or a primitive shape. No parentheses or any grouping 	indication is allowed in the <command>r</command> command. The operator hierarchy for the <command>r 	</command> command has been established through the ancestry of BRL-CAD and does not conform to accepted 	standards (see the <command>c</command> command for a more standard implementation). Intersection and 	subtraction operations are performed first, proceeding left to right; then union operations are 	performed. BRL-CAD regions are special cases of BRL-CAD <emphasis>combinations</emphasis> and include 	special attributes. Default values for these attributes may be set using the <command>regdef</command> 	command. As new <emphasis>regions</emphasis> are built, the default ident number gets incremented. If 	<emphasis>region_name</emphasis> already exists, then the <emphasis>operation/object</emphasis> pairs 	get appended to its end.
  </para>
</refsection>

<refsection xml:id="examples"><info><title>EXAMPLES</title></info>
  
  <para>The example shows the use of the <command>r</command> command to create a region consisting of two parts 	unioned together.
   </para>
  
  <example><info><title>Create a region using operations and object pairs.</title></info>
    
    <para>
      <prompt>mged&gt;</prompt><userinput>r new_region u shape1 - shape2 u shape3 + group4</userinput>
    </para>
    <para>Creates a region named <emphasis>new_region</emphasis> that consists of two parts unioned together. The
	first part is <emphasis>shape1</emphasis> with <emphasis>shape2</emphasis> subtracted. The second part is 	the intersection of <emphasis>shape3</emphasis> and the combination <emphasis>group4</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>
