Środowisko PythonOCC

From FreeCAD Documentation
Revision as of 18:04, 15 July 2020 by Kaktus (talk | contribs) (Created page with "PythonOCC jest projektem, który ma na celu połączyć cały zakres funkcji OpenCASCADE Technology ''(OCCT)'' w jeden moduł Środowisko Python...")

PythonOCC jest projektem, który ma na celu połączyć cały zakres funkcji OpenCASCADE Technology (OCCT) w jeden moduł Środowisko Python. Jest to inne podejście niż w FreeCAD, gdzie używane są tylko niektóre komponenty OCCT, co skutkuje znacznie prostszą strukturą. Strona projektu to pythonocc.org.

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 OCCT 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 (Part TopoShape) entities to and from pythonOCC. This allows us to use the full power of OCCT in Python and then put the resulting shapes back to FreeCAD.