From FreeCAD Documentation
Jump to navigation Jump to search
This page is a translated version of the page PythonOCC and the translation is 0% complete.
Outdated translations are marked like this.
Other languages:
Deutsch • ‎English • ‎español • ‎français • ‎italiano • ‎svenska • ‎čeština • ‎русский

PythonOCC это довольно новый и активный проект с целью привязки всех функций OpenCasCADe к модулю python. Этот подход сильно отличается от подхода FreeCAD, где используются лишь некоторые компоненты OpenCasCade, что приводит к куда более простой структуре.

PythonOCC, on the other hand, since it provides you access to all of OCC classes and functions, is very complex, but also very powerful. It is therefore a very fine addition to FreeCAD. When you are limited by FreeCAD's available OCC functionality in your python scripts, it's time to load pythonOCC.

Currently in the Part module we have the methods: Part.__toPythonOCC__() and Part.__fromPythonOCC__() to exchange TopoDS_Shape entities to/from pythonOCC. This allows to use the full power of OCC in python (using pythonocc) and then put the resulting shapes back to FreeCAD.