PythonOCC/fr: Difference between revisions

From FreeCAD Documentation
No edit summary
(Updating to match new version of source page)
Line 1: Line 1:
<languages/>
<languages/>

== Description ==

<div class="mw-translate-fuzzy">
[[PythonOCC/fr|PythonOCC]] est un projet qui vise à lier l'ensemble des fonctions de la technologie OpenCASCADE (OCCT) dans un module [[Python/fr|Python]]. Il s'agit d'une approche différente de FreeCAD, où seuls certains composants de l'OCCT sont utilisés, résultant en une structure beaucoup plus simple. La page du projet est [http://www.pythonocc.org/ pythonocc.org].
[[PythonOCC/fr|PythonOCC]] est un projet qui vise à lier l'ensemble des fonctions de la technologie OpenCASCADE (OCCT) dans un module [[Python/fr|Python]]. Il s'agit d'une approche différente de FreeCAD, où seuls certains composants de l'OCCT sont utilisés, résultant en une structure beaucoup plus simple. La page du projet est [http://www.pythonocc.org/ pythonocc.org].
</div>


<div class="mw-translate-fuzzy">
PythonOCC, d'autre part, il vous donne accès à toutes les classes et fonctions OCC, est très complexe mais aussi très puissant. C'est donc un très bel ajout à FreeCAD. Lorsque vous êtes limité par la fonctionnalité OCCT disponible de FreeCAD dans vos scripts Python, il est temps de charger {{incode|pythonOCC}}.
PythonOCC, d'autre part, il vous donne accès à toutes les classes et fonctions OCC, est très complexe mais aussi très puissant. C'est donc un très bel ajout à FreeCAD. Lorsque vous êtes limité par la fonctionnalité OCCT disponible de FreeCAD dans vos scripts Python, il est temps de charger {{incode|pythonOCC}}.
</div>


== Usage ==

<div class="mw-translate-fuzzy">
Actuellement dans l'[[Part_Module/fr|Atelier Part]], nous avons les méthodes {{incode|Part.__toPythonOCC__()}} et {{incode|Part.__fromPythonOCC__()}} pour échanger {{incode|TopoDS_Shape}} ([[Part_TopoShape/fr|Part TopoShape]]) entités vers et depuis pythonOCC. Cela nous permet d'utiliser toute la puissance d'OCTT en Python puis de remettre les formes résultantes dans FreeCAD.
Actuellement dans l'[[Part_Module/fr|Atelier Part]], nous avons les méthodes {{incode|Part.__toPythonOCC__()}} et {{incode|Part.__fromPythonOCC__()}} pour échanger {{incode|TopoDS_Shape}} ([[Part_TopoShape/fr|Part TopoShape]]) entités vers et depuis pythonOCC. Cela nous permet d'utiliser toute la puissance d'OCTT en Python puis de remettre les formes résultantes dans FreeCAD.
</div>

PythonOCC is internally used by the [[Arch_IFC|IFC]] viewer included with the [[IfcOpenShell|IfcOpenShell]] libraries. IfcOpenShell is used to read and write [[Arch_IFC|IFC]] documents with FreeCAD, through the [[Arch_Workbench|Arch]] and [[BIM_Workbench|BIM Workbenches]]. PythonOCC is only needed to launch IfcOpenShell's integrated viewer, otherwise, it is not used at all by FreeCAD.

== More information ==

* Project page: [http://www.pythonocc.org/ pythonocc.org]
* Newer version compatible with OCCT 7.4, [https://github.com/tpaviot/pythonocc-core tpaviot/pythonocc-core].
* Older version compatible with OCE 0.18, the community edition of OCCT 6.9.x, [https://github.com/tpaviot/pythonocc tpaviot/pythonocc].
* [https://forum.freecadweb.org/viewtopic.php?f=39&t=33254 IfcPlusPlus compiled on Gentoo - questions and alternatives?]


{{Powerdocnavi{{#translation:}}}}
{{Powerdocnavi{{#translation:}}}}
[[Category:Developer Documentation{{#translation:}}]]
[[Category:Python Code{{#translation:}}]]
{{clear}}
{{clear}}

Revision as of 21:32, 23 August 2020

Description

PythonOCC est un projet qui vise à lier l'ensemble des fonctions de la technologie OpenCASCADE (OCCT) dans un module Python. Il s'agit d'une approche différente de FreeCAD, où seuls certains composants de l'OCCT sont utilisés, résultant en une structure beaucoup plus simple. La page du projet est pythonocc.org.

PythonOCC, d'autre part, il vous donne accès à toutes les classes et fonctions OCC, est très complexe mais aussi très puissant. C'est donc un très bel ajout à FreeCAD. Lorsque vous êtes limité par la fonctionnalité OCCT disponible de FreeCAD dans vos scripts Python, il est temps de charger pythonOCC.

Usage

Actuellement dans l'Atelier Part, nous avons les méthodes Part.__toPythonOCC__() et Part.__fromPythonOCC__() pour échanger TopoDS_Shape (Part TopoShape) entités vers et depuis pythonOCC. Cela nous permet d'utiliser toute la puissance d'OCTT en Python puis de remettre les formes résultantes dans FreeCAD.

PythonOCC is internally used by the IFC viewer included with the IfcOpenShell libraries. IfcOpenShell is used to read and write IFC documents with FreeCAD, through the Arch and BIM Workbenches. PythonOCC is only needed to launch IfcOpenShell's integrated viewer, otherwise, it is not used at all by FreeCAD.

More information