.. PyTAPS
   Jim Porter, <jvporter -at- wisc.edu>
   Revision 0.9.2, Feb 18, 2010

Installation
============

PyTAPS requires the following to be installed on your system:

* Python 2.5+
* `NumPy <http://numpy.scipy.org/>`_ 1.3.0+
* At least one of...

  * `MOAB <http://trac.mcs.anl.gov/projects/ITAPS/wiki/MOAB>`_ (or other iMesh
    interface)
  * `CGM <http://trac.mcs.anl.gov/projects/ITAPS/wiki/CGM>`_ (or other iGeom
    interface)
  * `Lasso <http://trac.mcs.anl.gov/projects/ITAPS/wiki/Lasso>`_ (or other iRel
    interface)

If the include files and libraries are in the default paths for your C 
compiler, then typing `python setup.py install` should be sufficient. PyTAPS
will attempt to deduce the appropriate files to include during compilation by
checking the `iXxx-Defs.inc` file for each ITAPS interface. PyTAPS will check
for these files in the following locations:

#. The files specified in the environment variables ``IXXX_DEFS``
#. For each directory `dir` in the environment variables ``PATH`` and
   ``CPATH``, look in `dir/../lib`
#. Each directory in the environment variable ``LD_LIBRARY_PATH``
#. `/usr/local/lib`
#. `/usr/lib`

When installing via `setup.py` you may also manually specify the location of
these files with the global options ``-iXxx-path=PATH``. If this doesn't work,
you can manually specify the compiler options in your `setup.cfg` file.

Usage
=====

The following example illustrates the basics of using iMesh. This script gets
all the faces of a mesh and prints out the coordinates of their vertices::

  from itaps import iBase, iMesh

  mesh = iMesh.Mesh()
  mesh.load("mesh.vtk")

  faces = mesh.getEntities(iBase.Type.face, iMesh.Topology.all)
  adj = mesh.getEntAdj(faces, iBase.Type.vertex)

  for i in adj:
      for j in i:
          x, y, z = mesh.getVtxCoords(j)
          print "%f, %f, %f" % (x, y, z)
      print

Testing
=======

Basic tests of the interfaces are located in test/. To run all tests, run
`python setup.py test`.
