PythonOCC/de: Difference between revisions

From FreeCAD Documentation
No edit summary
(Created page with "PythonOCC wird intern vom IFC Betrachter verwendet, der in den Bibliotheken IfcOpenShell enthalten ist. IfcOpenShell wird zum Lesen und Sc...")
Line 13: Line 13:
Das [[Part_Module/de|Part Modul]] hat die Methoden {{incode|Part.__toPythonOCC__()}} und {{incode|Part.__fromPythonOCC__()}} zum Austausch {{incode|TopoDS_Shape}} ([[Part_TopoShape/de|Part TopoForm]]) von Entitäten zu und von PythonOCC. Diese Methoden ermöglichen es uns, die volle Leistung von OCCT in Python zu nutzen und die resultierenden Formen dann wieder in FreeCAD Objekte einzufügen.
Das [[Part_Module/de|Part Modul]] hat die Methoden {{incode|Part.__toPythonOCC__()}} und {{incode|Part.__fromPythonOCC__()}} zum Austausch {{incode|TopoDS_Shape}} ([[Part_TopoShape/de|Part TopoForm]]) von Entitäten zu und von PythonOCC. Diese Methoden ermöglichen es uns, die volle Leistung von OCCT in Python zu nutzen und die resultierenden Formen dann wieder in FreeCAD Objekte einzufügen.


PythonOCC wird intern vom [[Arch_IFC/de|IFC]]
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. PythonOCC is only needed to launch IfcOpenShell's integrated viewer, otherwise it is not necessary.
Betrachter verwendet, der in den Bibliotheken [[IfcOpenShell/de|IfcOpenShell]] enthalten ist. IfcOpenShell wird zum Lesen und Schreiben von [[Arch_IFC/de|IFC]] Dokumenten mit FreeCAD verwendet. PythonOCC wird nur benötigt, um den integrierten Betrachter von IfcOpenShell zu starten, ansonsten ist es nicht notwendig.


== Installation ==
== Installation ==

Revision as of 08:04, 2 November 2020

Beschreibung

PythonOCC ist ein Projekt, das darauf abzielt, den gesamten Funktionsumfang von OpenCASCADE Technologie (OCCT) Funktionen durch das Python Modul bereitzustellen. Dies ist ein anderer Ansatz als der von FreeCAD, bei dem nur bestimmte Komponenten von OCCT über den Part Arbeitsbereich ausgesetzt werden.

PythonOCC hingegen bietet Zugriff auf alle OCCT Klassen und Funktionen, ist also komplex, aber auch sehr mächtig. Wenn du also durch die OCCT Funktionalität von FreeCAD eingeschränkt bist, ist die Verwendung von OCC eine gute Alternative.

Anwendung

Das Part Modul hat die Methoden Part.__toPythonOCC__() und Part.__fromPythonOCC__() zum Austausch TopoDS_Shape (Part TopoForm) von Entitäten zu und von PythonOCC. Diese Methoden ermöglichen es uns, die volle Leistung von OCCT in Python zu nutzen und die resultierenden Formen dann wieder in FreeCAD Objekte einzufügen.

PythonOCC wird intern vom IFC Betrachter verwendet, der in den Bibliotheken IfcOpenShell enthalten ist. IfcOpenShell wird zum Lesen und Schreiben von IFC Dokumenten mit FreeCAD verwendet. PythonOCC wird nur benötigt, um den integrierten Betrachter von IfcOpenShell zu starten, ansonsten ist es nicht notwendig.

Installation

PythonOCC must be compiled from source. For this you need to get the corresponding development files for OpenCASCADE Technology (OCCT) and SWIG. The older version of PythonOCC was intended to wrap around OCE 0.18, the community edition of OCCT 6.9.x, which is now unmaintained. The newest version of PythonOCC is now intended to work with the recent, official OCCT 7.4 version.

Together with OCCT 7.4, PythonOCC requires fairly recent dependencies like Python 3.7, CMake 3.12, and SWIG 3.0.11. Python 2 is no longer supported.

It is also possible to install pre-compiled PythonOCC libraries using Conda. For more information and compilation instructions, see the main project's repository, tpaviot/pythonocc-core.

More information