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

<refentry xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="copyeval">
  
  <refmeta>
    <refentrytitle>COPYEVAL</refentrytitle>
    <manvolnum>nged</manvolnum>
    <refmiscinfo class="source">BRL-CAD</refmiscinfo>
    <refmiscinfo class="manual">BRL-CAD User Commands</refmiscinfo>
  </refmeta>
  
  <refnamediv xml:id="name">
    <refname>copyeval</refname>
    <refpurpose>Creates a new primitive object called <emphasis>new_ primitive</emphasis>by 
    applying the transformation matrices accumulated along the 
    <emphasis>path_to_old_primitive</emphasis> to the leaf primitive shape object at the end 
    of the path and saving the result under the name <emphasis>new_ primitive</emphasis>.
    </refpurpose>
  </refnamediv>
  
  <!-- body begins here -->
  <refsynopsisdiv xml:id="synopsis">
    <cmdsynopsis sepchar=" ">
      <command>copyeval</command>    
      <arg choice="req" rep="norepeat"> <replaceable>new_primitive path_to_old_primitive</replaceable></arg>
    </cmdsynopsis>
  </refsynopsisdiv>
  
  <refsection xml:id="description"><info><title>DESCRIPTION</title></info>
    
    <para>Objects in a <emphasis>BRL-CAD</emphasis> model are stored as Boolean trees 
    (combinations), with the members being primitive shapes or other Boolean trees. Each 
    member has a transformation matrix associated with it. This arrangement allows a 
    primitive to be a member of a combination, and that combination may be a member of another
    combination, and so on. When a combination is displayed, the transformation
    matrices are applied to its members and passed down through the combinations to the
    leaf (primitive shape) level. The accumulated transformation matrix is then applied
    to the primitive before it is drawn on the screen. The <command>copyeval</command> command 
    creates a new primitive object called <emphasis>new_ primitive</emphasis> by applying the 
    transformation matrices accumulated along the <emphasis> path_to_old_primitive</emphasis> to 
    the leaf primitive shape object at the end of the path and saving the result under the name 
    <emphasis>new_ primitive.</emphasis> The <emphasis> path_to_old_ primitive </emphasis> must 
    be a legitimate path ending with a primitive shape.
    </para>
  </refsection>

  <refsection xml:id="examples"><info><title>EXAMPLES</title></info>
    
    <para>
      The example shows the use of the <command>copyeval</command> command to create 
      a new primitive by applying the transformation matrices along the path to the old 
      primitive. 
    </para>
    <example><info><title>Create a new primitive object by applying the transformtion matrices along the path
      to the old primitive.</title></info>
      
      <para><prompt>mged&gt;</prompt> <userinput>copyeval shapeb comb1/comb2/comb3/shapea</userinput></para>
      <para>Creates <emphasis>shapeb</emphasis> from <emphasis>shapea</emphasis> by applying the accumulated transformation matrices from the path comb1/comb2/comb3.</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>
