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

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

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

<refnamediv xml:id="name">
  <refname>tol</refname>
  <refpurpose>Used with no arguments, <command>tol</command> lists the current tolerance settings.
   </refpurpose>
</refnamediv>

<!-- body begins here -->
<refsynopsisdiv xml:id="synopsis">
  <cmdsynopsis sepchar=" ">
    <command>tol</command>    
    
    <arg choice="opt" rep="norepeat">abs<replaceable>#</replaceable></arg>
    <arg choice="opt" rep="norepeat">rel<replaceable>#</replaceable></arg>
    <arg choice="opt" rep="norepeat">norm<replaceable>#</replaceable></arg>
    <arg choice="opt" rep="norepeat">dist<replaceable>#</replaceable></arg>
    <arg choice="opt" rep="norepeat">perp<replaceable>#</replaceable></arg>
   <arg choice="opt" rep="norepeat"/>
  </cmdsynopsis>
</refsynopsisdiv>

<refsection xml:id="description"><info><title>DESCRIPTION</title></info>
  
  <para>The <command>tol</command> command, with no arguments, lists the current tolerance settings. If the command line includes any of the 	keywords followed by a number, then that tolerance setting will be modified. The keywords are as follows:
   </para>
   <para><emphasis remap="B" role="B">Tessellation tolerances:</emphasis>
	The tessellation tolerances are used to control the facetization of primitive shapes.
	If more than one tolerance value is specified, the tessellation is performed to meet
	the most stringent.
  </para>
<itemizedlist mark="bullet">
<listitem>
<para>abs -- This <emphasis>absolute</emphasis> tolerance is specified in model units and represents
	the maximum allowable error in the distance from the actual shape surface
	to the tessellated surface.  An <emphasis>absolute</emphasis> tolerance of 0 means that the
	<emphasis>absolute</emphasis> tolerance should be ignored.
</para>
</listitem>
<listitem>
<para>rel -- This <emphasis>relative</emphasis> tolerance is specified in terms of a fraction of the shape
	size. The value is multiplied by the size of the shape to determine another
	bound on the maximum allowable error in the distance from the actual
	shape surface to the tessellated surface. A <emphasis>relative</emphasis> tolerance of 0 means
	that the <emphasis>relative</emphasis> tolerance should be ignored.
</para>
</listitem>
<listitem>
<para>norm -- This <emphasis>normal</emphasis> tolerance is specified in degrees and represents the
	maximum angle between the actual shape surface normal and the
	tessellated surface normal. A <emphasis>normal</emphasis> tolerance of 0 means that the <emphasis>normal</emphasis>
	tolerance should be ignored.
</para>
</listitem>
</itemizedlist>

<para><emphasis remap="B" role="B">Calculational tolerances:</emphasis>
	The calculational tolerances are used in evaluating the Boolean operations
	specified in a combination. This is used, for example, in the <command>ev, facetize,</command> and <command>bev</command>
	commands.
</para>

<itemizedlist mark="bullet">
<listitem>
<para>
	dist -- The <emphasis>distance</emphasis> tolerance is specified in model units and represents the
	minimum distance required between two vertices to consider them distinct.
</para>
</listitem>
<listitem>
<para>perp -- The <emphasis>perpendicularity</emphasis> tolerance is specified as the cosine of an
	angle. Two objects will be considered perpendicular if the cosine of the
	angle between them is less than the <emphasis>perpendicularity</emphasis> tolerance. Similarly,
	two objects will be considered parallel if the cosine of the angle between
	them is greater than 1.0, the <emphasis>perpendicularity</emphasis> tolerance.
</para>
</listitem>
</itemizedlist>

</refsection>

<refsection xml:id="examples"><info><title>EXAMPLES</title></info>
  
  <para>The example shows the use of the <command>tol</command> command to set the relative and perpendicularity tolerances.
    
  </para>
  <example><info><title>Set the relative and perpendicularity tolerances.</title></info>
    
    <para>
	<prompt>mged&gt;</prompt> <userinput>tol rel .05 perp 1e-6</userinput></para>
	<para>Sets the <emphasis>relative</emphasis> tolerance to 5% and the <emphasis>perpendicularity</emphasis> tolerance to 1e-06 			(cosine of 89.9999°).
      </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>
