From 82f63fbb8b2f5e3d16e0eab6dccd5c201b025468 Mon Sep 17 00:00:00 2001 From: spo Date: Tue, 27 Oct 2015 15:16:36 +0300 Subject: [PATCH] Add Connection plugin without tests. --- src/PythonAPI/model/__init__.py | 5 +++++ src/PythonAPI/model/connection/__init__.py | 4 ++++ src/PythonAPI/model/connection/connection.py | 12 ++++++++++++ 3 files changed, 21 insertions(+) create mode 100644 src/PythonAPI/model/connection/__init__.py create mode 100644 src/PythonAPI/model/connection/connection.py 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 -- 2.39.2