pythonOCC, enter the era of agile CAD development

About

News

Download/Install

GoogleCode project page

API Reference (HTML)

pythonOCC Blog

Contact

About

pythonOCC is a 3D CAD/PLM development library for the Python programming language and provide the following features: 3D hybrid modeling, data exchange (support of STEP/IGES file format), GUI management support (wxPython, PyQt, python-xlib), parametric modeling, advanced meshing features. pythonOCC is built upon the OpenCASCADE 3D modeling kernel, the salomegeom and salomesmesh packages. Some high level packages (parametric modeling, topology, data exchange, webservices etc.) extend the builtin features of those libraries to enable a highly dynamic and modular programming of any CAD application thanks to the magic of Python.

pythonOCC is available for both Windows, Linux and MacOSX platforms, with 32 and 64 bit support, and may be distributed under the terms of the GNU General Public License v3.

News

2010-02-27—Parametric Modeling Tutorial

In pythonOCC, parametric modeling is enabled by the Parametric Application Framwork (PAF). Learn how to get started with PAF by reading the PAF Tutorial (PDF file, 1.4Mb).

2010-02-25—Development page move to googlecode

The pythonOCC team registered the project on the googlecode hosting solution. The old gna page is not used anymore. Please visit http://code.google.com/p/pythonocc/ for more information.

The transfer is not completed yet, however modifications are already commited to the new subversion repository. Please update your local copy if you want to stay up to date with recent developments.

2010-01-07—pythonOCC 0.4 release and new Blog

pythonOCC 0.4 was released today. Here are the main changes since the 0.3 release:

pythonOCC-0.4 was successfully built/tested on Windows platforms (XP/Seven with py2.5/2.6), Linux (Ubuntu 9.10, OpenSuse) as well as MacOSX (SnowLeopard). Please join the newpythonOCC Blog to follow up fresh news and infomation!


2009-08-19—pythonOCC 0.3 released

At last, here it is! After 4 long months of intense development, the latest 0.3 pythonOCC release is available. The new pythonOCC wraps not only the OpenCASCADE library but also the excellent salomegeometry library from Fotios Soutis. This enables a highly dynamic 3D modeling in a new framework untitled Parametric Application Framwork (PAF). Here are the main changes since the 0.2 release:

Now, just enjoy pythonOCC and parametric modeling!


2009-05-31—pythonOCC at the PyConFr2009 conference

The pythonOCC projected was presented at the 3rd French Python Conference.  Slides are available in PDF format (3.4Mb - French).

2009-04-10—pythonOCC at the 11th PDE conference

The pythonOCC projected was presented at the 11th NASE-ESA workshop on Product Data Exchange (http://step.nasa.gov/pde2009/). The abstract and presentation are available from the WorkShop page (http://step.nasa.gov/pde2009/presentations.html) or can directly be accessed here: PDF (3.1Mb) or PPT(5.3Mb). A few screencasts have been made to support the presentation, and can be browsed from http://www.pythonocc.org/PDE2009/Screencasts/. Many Thanks to Steven Waterbury, chair of the workshop, who suggested this presentation.

2009-04-10—pythonOCC wo0.2 released

We're really pround to announce this new release, which is really a huge step far from the previous one and closer to our main goal: provide an easy-to-use, deploy, maintain and industrial quality python CAD package. Here are the main changes:

A special thank to new contributors of the project: Bryan Bishop, Bryan Cole, Frank Conradie and Arthur Magill.

2009-03-12—pythonOCC applies the Google Summer of Code 2009 program

This year PythonOCC is looking forward to joining the GSoC 2009 program! Please visit the pythonOCC ideas page to check out expected developments. For any further information please suscribe the pythonOCC users mailing list or email Thomas Paviot at tpaviot__at_gmail_Dot_com.

2009-03-10—pythonOCC license moves to GNU GPL v3 

pythonOCC wrapper was untill now distributed under the terms of the CeCILL-A license (a french open GPL-like license). This license is however not approved byt the Open Source Initiative. From now, pythonOCC (March, 10th 2009) will be released under the terms of the standard GNU General Public License version 3. Open Source, Free Software, Open Standards: the combination of these concepts will lead pythonOCC to the era of Agile CAD Development!

2009-02-09—pythonOCC md0.1 released

After almost one year of hard work to provide a python wrapper to OpenCascade library, we're pleased to announce the availability of pythonOCC-md0.1 release.  This release, with many improvements in reliabilty, portability as well as wide OpenCascade coverage can be considered as  the proof-of-concept of the project: provide an agile CAD development environment based upon industrial quality free software.  This result could be achieved thanks to a collaborative work involving Dave Cowden, Doug Du Boulay, Jelle Feringa, Andy Haywood, Björn Hein, Marco Nawijn, Thomas Paviot and Torsten Sadowski. Thanks also to the precious help of Roman Lygin's blog.

pythonOCC now provide:

  • modular build: saved compilation time as well as memory footprint,

  • OpenCascade smart pointers handling,

  • Windows, Linux and MacOSX support,

  • almost 200 OCC packages wrapped covering more than 6000 classes.

Previous releases are now considered as preliminary drafts and have been removed from this page.

Everything starts now!

Download/Install

Source code

pythonOCC-0.4.tar.gz (3.8Mb)

To build and install, please extract the archive and read the README file.

Prebuild Windows binaries

For Python 25:
  1. pythonOCC-0.4 Windows Installer for Python 2.5 (35.2Mb) . salomegeometry and salomesmesh dlls are provided in this file. You must download this file if you already have OpenCASCADE 6.3.0 installed (follow this link to download).

  2. pythonOCC-0.4 all-in-one Windows Installer for Python 2.5 (52.9Mb). This file contains eveything needed to run pythonOCC (OpenCASCADE binaries + salomegeometry + salomesmesh dlls). You can download/install this file, and run pythonOCC, even if you didn't previously install OpenCASCADE 6.3.0.

For Python 26:

Note: the Python26/Windows pythonOCC requires that OpenCASCADE is compiled with MSVC9 (the one provided from the official website are actually built with MSVC7).

  1. pythonOCC-0.4 Windows Installer for Python 2.6 (36.5Mb) . In order to run pythonOCC, you must download OpenCASCADE dlls/libs compiled with MSVC9 from this link. salomesmesh and salomegeometry dlls are included.

  2. pythonOCC-0.4 all-in-one Windows Installer for Python 2.6 (55Mb). This file contains eveything needed to run pythonOCC (OpenCASCADE binaries + SalomeGeometry dlls). You can download/install this file, and run pythonOCC, even if you didn't previously install OpenCASCADE 6.3.0.

Prebuild Linux binaries

OpenSuse: pythonOCC-0.4 package is available here: http://packman.links2linux.org/package/pythonOCC/140158.

Prebuild MacOSX 10.5 (Leopard) binaries

The following package contains all the necessary stuff to run pythonOCC under MacOSX (including OpenCascade 6.3.0 precompiled binaries).

pythonOCC demos

This file provides a set of python scripts that show main pythonOCC features. It has tobe considered as a key factor to get started with pythonOCC development.

pythonOCC-0.4-samples.tar.gz (506Kb)


Source code repository

Please visit the googlecode pythonOCC project page at: http://code.google.com/p/pythonocc/

Getting Started

Simple example 1: make a line between 2 points
>>> from OCC.gp import *
>>> from OCC.GCE2d import *
>>> P1 = gp_Pnt2d(1,2)
>>> P2 = gp_Pnt2d(3,-5.1)
>>> makeline = GCE2d_MakeLine(P1,P2)
>>> makeline.IsDone()
1
>>> line = makeline.Value()

Simple example 2: vectors computation
>>> from OCC.gp import *
>>> vec1 = gp_Vec(1,2,3)
>>> vec2 = gp_Vec(-1,-2,-3)
>>> vec1.Magnitude()
3.7416573867739413
>>> vec2.Magnitude()
3.7416573867739413
>> vec3 = vec1 + vec2
>> vec3.Magnitude()
0.0

API Reference

API Reference for release 0.4 can be downloaded (tar.gz archive) or browsed on line.


Mailing List / Contacts

For any help or suggestion, please suscribe the pythonOCC mailing list. Feel free to e-mail Thomas Paviot, project manager, to tpaviot_at_gmail_dot_com.