From: spo Date: Tue, 27 Oct 2015 12:16:36 +0000 (+0300) Subject: Add Connection plugin without tests. X-Git-Tag: V_2.1.0~206^2~57 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=82f63fbb8b2f5e3d16e0eab6dccd5c201b025468;p=modules%2Fshaper.git Add Connection plugin without tests. --- diff --git a/src/PythonAPI/model/__init__.py b/src/PythonAPI/model/__init__.py index a73f32e79..fff311722 100644 --- a/src/PythonAPI/model/__init__.py +++ b/src/PythonAPI/model/__init__.py @@ -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 index 000000000..514b7f9ee --- /dev/null +++ b/src/PythonAPI/model/connection/__init__.py @@ -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 index 000000000..65e625234 --- /dev/null +++ b/src/PythonAPI/model/connection/connection.py @@ -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