PythonOCC
PythonOCC is a project that aims at binding the whole range of OpenCASCADE Technology (OCCT) functions into a Python module. This is a different approach than FreeCAD, where only certain components of OCCT are used, resulting in a much simpler structure. The project page is 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.
- FreeCAD scripting: Python, Introduction to Python, Python scripting tutorial, FreeCAD Scripting Basics
- Modules: Builtin modules, Units, Quantity
- Workbenches: Workbench creation, Gui Commands, Commands, Installing more workbenches
- Meshes and Parts: Mesh Scripting, Topological data scripting, Mesh to Part, PythonOCC
- Parametric objects: Scripted objects, Viewproviders (Custom icon in tree view)
- Scenegraph: Coin (Inventor) scenegraph, Pivy
- Graphical interface: Interface creation, Interface creation completely in Python (1, 2, 3, 4, 5), PySide, PySide examples beginner, intermediate, advanced
- Macros: Macros, How to install macros
- Embedding: Embedding FreeCAD, Embedding FreeCADGui
- Other: Expressions, Code snippets, Line drawing function, FreeCAD vector math library (deprecated)
- Hubs: User hub, Power users hub, Developer hub