Skip to main content

A python module to access the CATIA Measurable object.

Project description

pycatia

pycatia currently only contains access to the CATIA API Measurable object and it's methods without the need of visual basic / CATScripts.

Some of the methods can be accessed simply using the pywin32 module but further access to methods such as GetCOG do not seem to be accessible using pure python. There are several questions on stack overflow and the pywin32 mailing list regarding this. But, they fail to provide any working examples with the VB Measurable object in python.

pycatia accesses these methods by running VBA scripts using the Dispatch('CATIA.Application').SystemService.Evaluate() function where required and passing a small public function to it. Otherwise, pycatia uses the VB method directly but exposes it within the same python class.

This has currently only been tested in CATIA V5 R21.

Requirements

  • python >= 3.6
  • CATIA V5/V6
  • see requirements.txt

Installation

Using pip

Using git

Clone the master branch from github into your working folder.

git clone https://github.com/evereux/pycatia.git

Download Zip

Download and unpack the master branch zip into your working folder.

Example Usage

  1. Open the file catia_measurable.CATPart from the folder tests.

  2. Run the example scripts.

    Example 1:

    Shows how to access the CATIA COM object with a .CATPart open and get the center of gravity for the part body 'PartBody'.

    Example 2:

    Shows how to get all the points in the geometrical set 'Points' and get the co-ordinate.

    Example 3:

    Shows how to search for all points in the document and return the co-ordinates.

Running The Tests

  • CATIA must be running the the part catia_measurable_part.CATPart open.
  • You will
  • Run the command: py.test -v --cov-report term-missing --cov=pycatia tests/

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

pycatia-0.0.1.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pycatia-0.0.1-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

Details for the file pycatia-0.0.1.tar.gz.

File metadata

  • Download URL: pycatia-0.0.1.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7

File hashes

Hashes for pycatia-0.0.1.tar.gz
Algorithm Hash digest
SHA256 32e7c05d656e63ffdb582acfb15e50c71cb013c2d7fe0fa69de264b451038b72
MD5 be548d45d98eccc3e5b635ec0ebacc43
BLAKE2b-256 f62d4ee52cdd57d7de767c262d31e705236a7b882bed3601d8e297f10901c8e2

See more details on using hashes here.

File details

Details for the file pycatia-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: pycatia-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 11.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7

File hashes

Hashes for pycatia-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 692897d7cdabb21eb2c75e984bfda5aff7a475208fb28e757405bec47833f871
MD5 90cc37153e902e24f7660d174d148dc8
BLAKE2b-256 d02fef9101b567b43f72ca75e6049791353ae95f975ada5582ae2a71560f3914

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