Python bindings for ITAPS interfaces
Project description
Installation
PyTAPS requires the following to be installed on your system:
Python 2.5+
NumPy 1.3.0+
At least one of…
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.