From 4e93dcde5c19eb5a127072496eabdfd4fbe10d6e Mon Sep 17 00:00:00 2001 From: asozinov Date: Mon, 28 Nov 2022 11:28:09 +0300 Subject: [PATCH] bos 32359 - Adaptation of SHAPER model --- CMakeLists.txt | 2 + src/CTestTestfileInstall.cmake | 1 + src/Config/plugins.xml.in | 2 + src/SAMConverter/CMakeLists.txt | 48 ++++ src/SAMConverter/SAMConverter.py | 51 ++++ .../SAMConverter_ConvertConstraints.py | 70 +++++ .../SAMConverter_ConvertPrimitives.py | 93 +++++++ .../SAMConverter_ConvertSketch.py | 68 +++++ src/SAMConverter/SAMConverter_Logger.py | 4 + .../SAMConverter_SuggestConstraintsFeature.py | 171 ++++++++++++ src/SAMConverter/SAMConverter_msg_fr.ts | 15 ++ src/SAMConverter/Test/CMakeLists.txt | 45 ++++ .../Test/CTestTestfileInstall.cmake | 31 +++ .../Test/TestSAMConverter_Angle.py | 43 +++ src/SAMConverter/Test/TestSAMConverter_Arc.py | 94 +++++++ .../Test/TestSAMConverter_Circle.py | 63 +++++ .../Test/TestSAMConverter_Constraints.py | 46 ++++ .../Test/TestSAMConverter_Distance.py | 73 +++++ .../Test/TestSAMConverter_Geometrical.py | 253 ++++++++++++++++++ .../TestSAMConverter_HorisontalDistance.py | 101 +++++++ .../Test/TestSAMConverter_Length.py | 48 ++++ .../Test/TestSAMConverter_Line.py | 69 +++++ .../Test/TestSAMConverter_Point.py | 59 ++++ .../Test/TestSAMConverter_Primitives.py | 16 ++ .../Test/TestSAMConverter_Radius.py | 46 ++++ .../Test/TestSAMConverter_Sketch.py | 1 + .../Test/TestSAMConverter_VerticalDistance.py | 100 +++++++ src/SAMConverter/Test/tests.set | 35 +++ src/SAMConverter/doc/SAMConverter.rst | 15 ++ .../doc/images/suggest_dialog.png | Bin 0 -> 68563 bytes .../doc/suggestConstraintsFeature.rst | 15 ++ .../icons/suggest_constraints.png | Bin 0 -> 477 bytes src/SAMConverter/plugin-SAM.xml | 12 + src/SAMConverterAPI/CMakeLists.txt | 91 +++++++ src/SAMConverterAPI/SAMConverterAPI.h | 37 +++ src/SAMConverterAPI/SAMConverterAPI.i | 41 +++ .../SAMConverterAPI_SAMConverter.cpp | 29 ++ .../SAMConverterAPI_SAMConverter.h | 38 +++ src/SAMConverterAPI/SAMConverterAPI_swig.h | 27 ++ src/SketchPlugin/plugin-Sketch.xml | 2 +- 40 files changed, 1954 insertions(+), 1 deletion(-) create mode 100644 src/SAMConverter/CMakeLists.txt create mode 100644 src/SAMConverter/SAMConverter.py create mode 100644 src/SAMConverter/SAMConverter_ConvertConstraints.py create mode 100644 src/SAMConverter/SAMConverter_ConvertPrimitives.py create mode 100644 src/SAMConverter/SAMConverter_ConvertSketch.py create mode 100644 src/SAMConverter/SAMConverter_Logger.py create mode 100644 src/SAMConverter/SAMConverter_SuggestConstraintsFeature.py create mode 100644 src/SAMConverter/SAMConverter_msg_fr.ts create mode 100644 src/SAMConverter/Test/CMakeLists.txt create mode 100644 src/SAMConverter/Test/CTestTestfileInstall.cmake create mode 100644 src/SAMConverter/Test/TestSAMConverter_Angle.py create mode 100644 src/SAMConverter/Test/TestSAMConverter_Arc.py create mode 100644 src/SAMConverter/Test/TestSAMConverter_Circle.py create mode 100644 src/SAMConverter/Test/TestSAMConverter_Constraints.py create mode 100644 src/SAMConverter/Test/TestSAMConverter_Distance.py create mode 100644 src/SAMConverter/Test/TestSAMConverter_Geometrical.py create mode 100644 src/SAMConverter/Test/TestSAMConverter_HorisontalDistance.py create mode 100644 src/SAMConverter/Test/TestSAMConverter_Length.py create mode 100644 src/SAMConverter/Test/TestSAMConverter_Line.py create mode 100644 src/SAMConverter/Test/TestSAMConverter_Point.py create mode 100644 src/SAMConverter/Test/TestSAMConverter_Primitives.py create mode 100644 src/SAMConverter/Test/TestSAMConverter_Radius.py create mode 100644 src/SAMConverter/Test/TestSAMConverter_Sketch.py create mode 100644 src/SAMConverter/Test/TestSAMConverter_VerticalDistance.py create mode 100644 src/SAMConverter/Test/tests.set create mode 100644 src/SAMConverter/doc/SAMConverter.rst create mode 100644 src/SAMConverter/doc/images/suggest_dialog.png create mode 100644 src/SAMConverter/doc/suggestConstraintsFeature.rst create mode 100644 src/SAMConverter/icons/suggest_constraints.png create mode 100644 src/SAMConverter/plugin-SAM.xml create mode 100644 src/SAMConverterAPI/CMakeLists.txt create mode 100644 src/SAMConverterAPI/SAMConverterAPI.h create mode 100644 src/SAMConverterAPI/SAMConverterAPI.i create mode 100644 src/SAMConverterAPI/SAMConverterAPI_SAMConverter.cpp create mode 100644 src/SAMConverterAPI/SAMConverterAPI_SAMConverter.h create mode 100644 src/SAMConverterAPI/SAMConverterAPI_swig.h diff --git a/CMakeLists.txt b/CMakeLists.txt index b28b840f7..6d5592ff9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -197,6 +197,7 @@ ADD_SUBDIRECTORY (src/GeomValidators) ADD_SUBDIRECTORY (src/FiltersPlugin) ADD_SUBDIRECTORY (src/InitializationPlugin) ADD_SUBDIRECTORY (src/ParametersPlugin) +ADD_SUBDIRECTORY (src/SAMConverter) ADD_SUBDIRECTORY (src/PythonAddons) ADD_SUBDIRECTORY (src/PythonAPI) # High Level C++/Python API @@ -213,6 +214,7 @@ ADD_SUBDIRECTORY (src/SketchAPI) ADD_SUBDIRECTORY (src/GDMLAPI) ADD_SUBDIRECTORY (src/ConnectorAPI) ADD_SUBDIRECTORY (src/FiltersAPI) +ADD_SUBDIRECTORY (src/SAMConverterAPI) # Tests ADD_SUBDIRECTORY (test.API/SHAPER) diff --git a/src/CTestTestfileInstall.cmake b/src/CTestTestfileInstall.cmake index b9e1c1ebf..591d5ca18 100644 --- a/src/CTestTestfileInstall.cmake +++ b/src/CTestTestfileInstall.cmake @@ -44,6 +44,7 @@ SUBDIRS(ConnectorAPI Config ExchangeAPI ModelGeomAlgo + SAMConverter Locale test_API ) diff --git a/src/Config/plugins.xml.in b/src/Config/plugins.xml.in index 7c23b377e..c3452b99a 100644 --- a/src/Config/plugins.xml.in +++ b/src/Config/plugins.xml.in @@ -15,6 +15,8 @@ + + @DEFAULT_SOLVER@