From ca946912d46cecc030953f2b7549a8164f681f7e Mon Sep 17 00:00:00 2001 From: spo Date: Tue, 27 Oct 2015 10:31:09 +0300 Subject: [PATCH] Add revolution and repackage Features plugin interface. --- src/PythonAPI/CMakeLists.txt | 1 + src/PythonAPI/model/__init__.py | 3 +-- src/PythonAPI/model/features/__init__.py | 5 +++++ src/PythonAPI/model/{ => features}/extrusion.py | 2 +- src/PythonAPI/model/{ => features}/revolution.py | 2 +- 5 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 src/PythonAPI/model/features/__init__.py rename src/PythonAPI/model/{ => features}/extrusion.py (99%) rename src/PythonAPI/model/{ => features}/revolution.py (99%) diff --git a/src/PythonAPI/CMakeLists.txt b/src/PythonAPI/CMakeLists.txt index 8247ab6bf..b6ab797df 100644 --- a/src/PythonAPI/CMakeLists.txt +++ b/src/PythonAPI/CMakeLists.txt @@ -29,4 +29,5 @@ ADD_UNIT_TESTS( TestSketcherSetFillet.py TestFeaturesExtrusion.py + TestFeaturesRevolution.py ) diff --git a/src/PythonAPI/model/__init__.py b/src/PythonAPI/model/__init__.py index efd70a30c..35eeabb27 100644 --- a/src/PythonAPI/model/__init__.py +++ b/src/PythonAPI/model/__init__.py @@ -10,8 +10,7 @@ from roots import * from part import Part as addPart from sketcher.sketch import addSketch -from extrusion import addExtrusion -from revolution import addRevolution +from features import * from boolean import Addition as addAddition from boolean import Subtraction as addSubtraction from boolean import Intersection as addIntersection diff --git a/src/PythonAPI/model/features/__init__.py b/src/PythonAPI/model/features/__init__.py new file mode 100644 index 000000000..ffbd5955d --- /dev/null +++ b/src/PythonAPI/model/features/__init__.py @@ -0,0 +1,5 @@ +"""Package for Features plugin for the Parametric Geometry API of the Modeler. +""" + +from extrusion import addExtrusion +from revolution import addRevolution \ No newline at end of file diff --git a/src/PythonAPI/model/extrusion.py b/src/PythonAPI/model/features/extrusion.py similarity index 99% rename from src/PythonAPI/model/extrusion.py rename to src/PythonAPI/model/features/extrusion.py index a60493145..0ca424be0 100644 --- a/src/PythonAPI/model/extrusion.py +++ b/src/PythonAPI/model/features/extrusion.py @@ -4,7 +4,7 @@ Author: Daniel Brunier-Coulin with contribution by Mikhail Ponikarov Copyright (C) 2014-20xx CEA/DEN, EDF R&D """ -from .roots import Interface +from model.roots import Interface def addExtrusion(part, *args): diff --git a/src/PythonAPI/model/revolution.py b/src/PythonAPI/model/features/revolution.py similarity index 99% rename from src/PythonAPI/model/revolution.py rename to src/PythonAPI/model/features/revolution.py index 2d878a246..cd43c9106 100644 --- a/src/PythonAPI/model/revolution.py +++ b/src/PythonAPI/model/features/revolution.py @@ -3,7 +3,7 @@ Author: Sergey Pokhodenko Copyright (C) 2014-20xx CEA/DEN, EDF R&D """ -from .roots import Interface +from model.roots import Interface def addRevolution(part, *args): -- 2.39.2