Skip to main content

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…

    • MOAB (or other iMesh interface)

    • CGM (or other iGeom interface)

    • 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:

  1. The files specified in the environment variables IXXX_DEFS

  2. For each directory dir in the environment variables PATH and CPATH, look in dir/../lib

  3. Each directory in the environment variable LD_LIBRARY_PATH

  4. /usr/local/lib

  5. /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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

PyTAPS-0.9.1.tar.gz (97.0 kB view details)

Uploaded Source

File details

Details for the file PyTAPS-0.9.1.tar.gz.

File metadata

  • Download URL: PyTAPS-0.9.1.tar.gz
  • Upload date:
  • Size: 97.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for PyTAPS-0.9.1.tar.gz
Algorithm Hash digest
SHA256 93f206786e8efd9a4e74f1ece1ab8f054269d41b434d1b4b671bd910653088f6
MD5 42d01821ba932c1849c6d1c87fd64d74
BLAKE2b-256 947389473f786963d2575ac190961492cd1d01d38ea90689d1cabff099bcd26d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page