PythonOCC: Difference between revisions

From FreeCAD Documentation
m (template fr)
({{Powerdocnavi{{#translation:}}}} for the proper category)
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<languages/>
[http://www.pythonocc.org/ PythonOCC] is a pretty young and active project that aims at binding the whole range of OpenCasCADe functions into a python module. This is a very different approach than FreeCAD, where only certain components of OpenCasCade are used, resulting in a much simpler structure.
<translate>
<!--T:1-->
[[PythonOCC|PythonOCC]] is a project that aims at binding the whole range of OpenCASCADE Technology (OCCT) functions into a [[Python|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 [http://www.pythonocc.org/ pythonocc.org].


<!--T:2-->
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.
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 {{incode|pythonOCC}}.


<!--T:3-->
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.
Currently in the [[Part_Module|Part module]] we have the methods {{incode|Part.__toPythonOCC__()}} and {{incode|Part.__fromPythonOCC__()}} to exchange {{incode|TopoDS_Shape}} ([[Part_TopoShape|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.


</translate>
{{languages | {{es|PythonOCC/es}} {{fr|PythonOCC/fr}} }}
{{Powerdocnavi{{#translation:}}}}
{{clear}}

Revision as of 00:43, 12 May 2020

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.