From 32b0ad01967538dc5748606ac0646ae341f025c4 Mon Sep 17 00:00:00 2001 From: asozinov Date: Mon, 28 Nov 2022 11:28:09 +0300 Subject: [PATCH] [bos#32539] [EDF] Shaper constrains suggestions - Adaptation of SHAPER model --- CMakeLists.txt | 6 + src/CTestTestfileInstall.cmake | 1 + src/Config/plugins.xml.in | 2 + src/SAMConverter/CMakeLists.txt | 48 ++++++ src/SAMConverter/SAMConverter.py | 51 +++++++ .../SAMConverter_ConvertConstraints.py | 64 ++++++++ .../SAMConverter_ConvertPrimitives.py | 72 +++++++++ .../SAMConverter_ConvertSketch.py | 63 ++++++++ .../SAMConverter_SuggestConstraintsFeature.py | 140 ++++++++++++++++++ src/SAMConverter/SAMConverter_msg_fr.ts | 11 ++ src/SAMConverter/Test/CMakeLists.txt | 42 ++++++ .../Test/CTestTestfileInstall.cmake | 26 ++++ .../Test/TestSAMConverter_Constraints.py | 1 + .../Test/TestSAMConverter_Primitives.py | 1 + .../Test/TestSAMConverter_Sketch.py | 1 + src/SAMConverter/Test/tests.set | 24 +++ src/SAMConverter/doc/SAMConverter.rst | 14 ++ .../doc/images/suggest_dialog.png | Bin 0 -> 68563 bytes .../icons/suggest_constraints.png | Bin 0 -> 477 bytes src/SAMConverter/plugin-SAM.xml | 12 ++ src/SAMConverterAPI/CMakeLists.txt | 97 ++++++++++++ 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/SAMConverterAPI/Test/data/cube_ascii.stl | 86 +++++++++++ src/SAMConverterAPI/Test/data/cube_binary.stl | Bin 0 -> 684 bytes src/SketchPlugin/plugin-Sketch.xml | 2 +- 29 files changed, 935 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_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_Constraints.py create mode 100644 src/SAMConverter/Test/TestSAMConverter_Primitives.py create mode 100644 src/SAMConverter/Test/TestSAMConverter_Sketch.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/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 create mode 100644 src/SAMConverterAPI/Test/data/cube_ascii.stl create mode 100644 src/SAMConverterAPI/Test/data/cube_binary.stl diff --git a/CMakeLists.txt b/CMakeLists.txt index 6154d45d9..9d84c7e26 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -191,6 +191,12 @@ ADD_SUBDIRECTORY (src/SketchSolver) ADD_SUBDIRECTORY (src/ModuleBase) ADD_SUBDIRECTORY (src/PartSet) +# +#ADD_SUBDIRECTORY (src/SketchConstraintsFinder) # Plugin +ADD_SUBDIRECTORY (src/SAMConverter) # Library +ADD_SUBDIRECTORY (src/SAMConverterAPI) +# + ADD_SUBDIRECTORY (src/XGUI) ADD_SUBDIRECTORY (src/ExchangePlugin) ADD_SUBDIRECTORY (src/GeomValidators) 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@