Library / SDK
tpaviot/pythonocc-core avatar
tpaviot/pythonocc-core

pythonocc-core: Python access to OpenCascade for CAD and BIM

Python package for 3D geometry CAD/BIM/CAM

1,986 stars408 forksSWIGLGPL-3.0

At a glance

What is it?
pythonocc-core exposes OpenCascade Technology through Python for CAD, PDM, PLM, BIM, geometry processing, and data exchange. It is most practical when an application needs OpenCascade capabilities while keeping its modeling and conversion logic in Python.
Who is it for?
pythonocc-core fits developers who need OpenCascade modeling, topology, visualization, or CAD data exchange from Python. It is a poor fit when a self-contained pure Python geometry stack is mandatory or when the team cannot accept OpenCascade and SWIG as dependency layers.
Can I use it commercially?
Yes, with conditions. LGPL-3.0 is a weak copyleft licence: you can use it inside commercial and closed-source software, but if you distribute changes to its own files, you must publish those changes under the same licence.
Is it still maintained?
Yes. The repository last received commits 5 days ago.
What is it written in?
Mainly SWIG, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 20, 2026, and from our analysis. They are not legal advice.

Editorial analysis

The OpenCascade bridge for Python CAD applications

pythonocc-core addresses a specific integration problem: OpenCascade Technology is a C++ modeling kernel with a large collection of geometry, topology, visualization, and data exchange classes, but many applications are easier to organize in Python. The package wraps those classes so Python code can access almost all of OpenCascade's thousand exposed C++ classes. Names and signatures are kept as close as possible to the underlying C++ API, which should reduce translation work for developers already familiar with OpenCascade.

The intended audience is developers building CAD, PDM, PLM, and BIM software rather than users looking for a conventional modeling application. Possible workloads include creating solid models, performing topology operations, computing inertia, exporting CAD files, or embedding a 3D view in an application. The repository also describes industrial and academic use, but its technical value comes from exposing a production-oriented geometry kernel through a language suited to automation and application development.

This is a binding layer, not an independent geometry engine. The README identifies the OpenCascade Technology modeling kernel as its foundation. That distinction matters when selecting dependencies, packaging binaries, debugging native failures, or deciding whether existing OpenCascade knowledge can be reused.

Bindings, topology utilities, and the object data flow

The project is primarily written around SWIG, with SWIG-generated interfaces connecting Python calls to OpenCascade C++ objects. In version 8.0.1.2, objects returned by reference retain their owner, an important ownership behavior for native bindings. Python therefore keeps the owning object alive when a returned object still depends on it. This reduces a class of lifetime failures in which a wrapper refers to native data whose owner has already been released.

The API covers much more than primitive solids. The README lists topology operations, inertia computations, curve and surface grid evaluation, helices, preview boxes, and additional topology tessellation behavior. TopologyTesselator is described as preserving mesh topology. The release also notes faster evaluation of B-spline curves and `discretize_edge`, plus iterable sequences. These details point to a wrapper intended to preserve substantial OpenCascade behavior rather than reduce every model to display-oriented triangles.

Data exchange uses the OpenCascade providers for formats including IGES, STEP, STL, PLY, OBJ, and GLTF. The 8.0.1.2 release expands parameter access for providers such as DESTEP, DEIGES, DEGLTF, and DESTL. That suggests the Python layer can configure exchange behavior as well as invoke conversion, although the README does not provide a complete provider configuration example.

Displaying models in notebooks, desktop GUIs, and browsers

pythonocc-core supports several rendering paths. The documentation lists desktop visualization through `tkinter`, `PyQt5`, `PyQt6`, `PySide2`, `PySide6`, and `wxPython`. It also supports browser rendering through `threejs` or `x3dom`, and states that models can be visualized and worked on inside a Jupyter notebook.

These paths serve different application constraints. A desktop GUI can be appropriate for an engineering tool that needs local interaction. A notebook is useful for demonstrating geometry operations or building data-processing workflows. Browser rendering is relevant when the view must be remote or embedded in a web-oriented interface. The README identifies the supported GUI and web frameworks, but it does not document one complete display configuration for all of them.

The included Binder link provides the clearest documented first-use route. It points to a notebook environment for pythonocc-core 8.0.1.2, allowing evaluation without first building the package locally. The repository also links `tpaviot/pythonocc-demos` for Python examples and notebooks, and `tpaviot/pythonocc-documentation` for documentation. Those separate repositories are part of the recommended learning path, not code bundled into the core repository.

Conda installation for a local Python environment

The README documents precompiled conda packages for Windows, Linux, and macOS. They support Python 3.10, 3.11, 3.12, 3.13, and 3.14. The following documented setup uses Python 3.12 and installs release 8.0.1.2 from `conda-forge`. The environment is created first so the interpreter and native dependency stack are isolated from the user's existing Python installation.

bash
conda create --name=pyoccenv python=3.12
conda activate pyoccenv
conda install -c conda-forge pythonocc-core=8.0.1.2

After the commands complete, the environment should contain the pinned pythonocc-core release and its conda dependencies. The README says the precompiled packages depend on third-party libraries available through `conda-forge`; those libraries are part of why conda is the documented path for a quick local setup.

The README does not include a first Python script for creating or displaying a model, so this article does not invent an import sequence or rendering call. A documented first real use is the Binder notebook linked for 8.0.1.2. For local source builds, the project directs users to `INSTALL.md`, which contains compilation instructions for all platforms. The README also notes that other conda channels may provide the package and links to Anaconda search.

Native dependencies and source-build trade-offs

Conda installation avoids requiring a direct source compilation in the documented quick-start path. Source building is different. The repository includes `INSTALL.md`, `CMakeLists.txt`, `cmake/`, `src/`, and `test/`, indicating that compilation instructions and native build configuration are maintained separately from the short README procedure. The separate `tpaviot/pythonocc-generator` repository automates production of the SWIG interface files used by the OpenCascade wrapper.

This architecture creates a real dependency boundary. A project may depend on pythonocc-core, SWIG-generated bindings, OpenCascade, and supporting libraries rather than on a package with no native kernel underneath. Platform-specific binaries, Python and OpenCascade compatibility, and application packaging therefore deserve verification before deployment. The README's precompiled platform packages reduce that burden for common environments, but it does not claim that every distribution or architecture is supported.

The LGPL-3.0 license permits redistribution and modification under its terms. The repository identifies the GNU Lesser General Public License version 3, but the README does not provide packaging-specific guidance for dynamic linking, notices, or distribution. Teams need to review the actual `LICENSE` and their distribution structure separately rather than treating the package name alone as sufficient compliance.

Where pythonocc-core is the wrong layer

pythonocc-core is the wrong choice when the application only needs lightweight Python geometry and cannot justify a native OpenCascade dependency. The package does not position itself as a small mesh utility. It provides access to a large CAD kernel, topology operations, multiple exchange formats, tessellation, and rendering integrations. A use case with only simple point, vector, or polygon operations may not need that scope.

It is also a poor fit for teams that require a fully self-contained pure Python implementation or insist on preserving exact native class signatures. Keeping OpenCascade names and signatures is useful for kernel users, but it also exposes a C++ API model through wrappers rather than hiding it behind an independent Python abstraction.

A direct OpenCascade C++ integration is the clearest alternative. It avoids the SWIG and Python wrapper layers and gives a native application direct access to the kernel, but it requires C++ build and deployment work and moves application logic out of Python. pythonocc-core changes that trade-off by favoring Python access. It also depends on other CAD kernels as comparisons. The choice is between wrapper-driven Python development and direct native development, not between two interchangeable Python CAD packages documented here.

Release activity and the cost of following OpenCascade

The repository is not archived, and its last push was on 2026-10-14. Recent releases include 8.0.1.2 on 2026-10-14, 8.0.1.1 on 2026-10-05, and 8.0.1 on 2026-09-23. Release 8.0.1.2 is built on OpenCascade 8.0.1 and SWIG 4.5.1, so version selection is tied to specific underlying releases rather than being an isolated pythonocc version number.

That coupling is the main upgrade cost to account for. The release notes mention broader OCCT module coverage, ownership changes, iterable sequences, and tessellation improvements, all of which can affect application code and packaging checks. The repository includes a `NEWS` file for the full change list. Teams should compare that file and their own regression tests before changing a pinned `pythonocc-core` version.

For evaluation, the Binder environment offers a documented 8.0.1.2 starting point. For production, pinning the package version used by the application avoids an unplanned native dependency change. The README does not document a compatibility matrix for every GUI framework or format provider, so those pairings must be verified in the target environment.

Editorial conclusion

pythonocc-core fits developers who need OpenCascade modeling, topology, visualization, or CAD data exchange from Python. It is a poor fit when a self-contained pure Python geometry stack is mandatory or when the team cannot accept OpenCascade and SWIG as dependency layers. Before adoption, verify the required OpenCascade modules and data exchange providers in the target release, then build the first production workflow against the exact conda package and Python version.

Frequently asked questions

How do I install pythonocc-core with conda?

The README documents creating a conda environment, activating it, and installing `pythonocc-core=8.0.1.2` from `conda-forge`. Precompiled packages are listed for Python 3.10 through 3.14 on Windows, Linux, and macOS.

What is pythonocc-core built on?

pythonocc-core is a Python package based on the OpenCascade Technology modeling kernel. Version 8.0.1.2 is built on OpenCascade 8.0.1 and SWIG 4.5.1.

Can I try pythonocc-core without compiling it locally?

The README links a Binder notebook for version 8.0.1.2. It also points to `tpaviot/pythonocc-demos` for examples and notebooks and to `tpaviot/pythonocc-documentation` for documentation.

Which CAD and 3D file formats does pythonocc-core support?

The README lists data exchange for IGES, STEP, STL, PLY, OBJ, and GLTF. It also identifies provider names such as DESTEP, DEIGES, DEGLTF, and DESTL among the modules wrapped in version 8.0.1.2.

Which visualization environments are supported?

The README names `tkinter`, `PyQt5`, `PyQt6`, `PySide2`, `PySide6`, and `wxPython` for desktop visualization. It also lists browser rendering through `threejs` and `x3dom`, plus visualization and work in Jupyter notebooks.

Official sources

  1. Issues
  2. License: LGPL-3.0
  3. README
  4. Releases
  5. tpaviot/pythonocc-core on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/tpaviot-pythonocc-core.svg)](https://hysenlabs.com/projects/tpaviot-pythonocc-core)

Was this useful?