]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Add Connection plugin without tests.
authorspo <sergey.pokhodenko@opencascade.com>
Tue, 27 Oct 2015 12:16:36 +0000 (15:16 +0300)
committerspo <sergey.pokhodenko@opencascade.com>
Tue, 27 Oct 2015 12:16:36 +0000 (15:16 +0300)
src/PythonAPI/model/__init__.py
src/PythonAPI/model/connection/__init__.py [new file with mode: 0644]
src/PythonAPI/model/connection/connection.py [new file with mode: 0644]

index a73f32e795d6bb21ff5abb35ce9c0ad051368f9a..fff3117224239a9d009053ff0d03a6f4d02a417d 100644 (file)
@@ -1,4 +1,9 @@
 """This package defines the Parametric Geometry API of the Modeler.
+
+All features are available via model.add*() functions. Exceptions are:
+- exportToFile() - from Exchange plugin
+- duplicatePart(), removePart() - from PartSet plugin
+- exportToGEOM() - from Connection plugin
 """
 
 # General purpose functions and abstract root classes
diff --git a/src/PythonAPI/model/connection/__init__.py b/src/PythonAPI/model/connection/__init__.py
new file mode 100644 (file)
index 0000000..514b7f9
--- /dev/null
@@ -0,0 +1,4 @@
+"""Package for Connection plugin for the Parametric Geometry API of the Modeler.
+"""
+
+from connection import exportToGEOM
\ No newline at end of file
diff --git a/src/PythonAPI/model/connection/connection.py b/src/PythonAPI/model/connection/connection.py
new file mode 100644 (file)
index 0000000..65e6252
--- /dev/null
@@ -0,0 +1,12 @@
+"""Export to GEOM Interface
+Author: Sergey Pokhodenko
+Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+"""
+
+from model.roots import Interface
+
+
+def exportToGEOM(part):
+    """Export the Part to GEOM module."""
+    feature = part.addFeature("ExportToGEOM")
+    feature.execute()
\ No newline at end of file