From ce669a3212b29438ed1f43c6c5b6c4f937b76838 Mon Sep 17 00:00:00 2001 From: jfa Date: Mon, 15 Aug 2022 18:33:15 +0300 Subject: [PATCH] Plugin draft --- CMakeLists.txt | 1 + src/CTestTestfileInstall.cmake | 1 + src/Config/plugins.xml.in | 2 + src/SAMPlugin/CMakeLists.txt | 47 +++++++++ src/SAMPlugin/SAMPlugin.py | 53 +++++++++++ src/SAMPlugin/SAMPlugin_ConvertConstraints.py | 72 ++++++++++++++ src/SAMPlugin/SAMPlugin_ConvertPrimitives.py | 72 ++++++++++++++ src/SAMPlugin/SAMPlugin_ConvertSketch.py | 64 +++++++++++++ .../SAMPlugin_SuggestConstraintsFeature.py | 90 ++++++++++++++++++ src/SAMPlugin/SAMPlugin_msg_fr.ts | 11 +++ src/SAMPlugin/Test/CMakeLists.txt | 42 ++++++++ src/SAMPlugin/Test/CTestTestfileInstall.cmake | 26 +++++ .../Test/TestSAMPlugin_Constraints.py | 1 + .../Test/TestSAMPlugin_Primitives.py | 1 + src/SAMPlugin/Test/TestSAMPlugin_Sketch.py | 1 + src/SAMPlugin/Test/tests.set | 24 +++++ src/SAMPlugin/doc/SAMPlugin.rst | 14 +++ src/SAMPlugin/doc/images/suggest_dialog.png | Bin 0 -> 68563 bytes src/SAMPlugin/icons/suggest_constraints.png | Bin 0 -> 477 bytes src/SAMPlugin/plugin-SAM.xml | 12 +++ src/SketchPlugin/plugin-Sketch.xml | 2 +- 21 files changed, 535 insertions(+), 1 deletion(-) create mode 100644 src/SAMPlugin/CMakeLists.txt create mode 100644 src/SAMPlugin/SAMPlugin.py create mode 100644 src/SAMPlugin/SAMPlugin_ConvertConstraints.py create mode 100644 src/SAMPlugin/SAMPlugin_ConvertPrimitives.py create mode 100644 src/SAMPlugin/SAMPlugin_ConvertSketch.py create mode 100644 src/SAMPlugin/SAMPlugin_SuggestConstraintsFeature.py create mode 100644 src/SAMPlugin/SAMPlugin_msg_fr.ts create mode 100755 src/SAMPlugin/Test/CMakeLists.txt create mode 100755 src/SAMPlugin/Test/CTestTestfileInstall.cmake create mode 100644 src/SAMPlugin/Test/TestSAMPlugin_Constraints.py create mode 100644 src/SAMPlugin/Test/TestSAMPlugin_Primitives.py create mode 100644 src/SAMPlugin/Test/TestSAMPlugin_Sketch.py create mode 100755 src/SAMPlugin/Test/tests.set create mode 100644 src/SAMPlugin/doc/SAMPlugin.rst create mode 100644 src/SAMPlugin/doc/images/suggest_dialog.png create mode 100644 src/SAMPlugin/icons/suggest_constraints.png create mode 100644 src/SAMPlugin/plugin-SAM.xml diff --git a/CMakeLists.txt b/CMakeLists.txt index 6154d45d9..4a7bc349f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -188,6 +188,7 @@ ADD_SUBDIRECTORY (src/SamplePanelPlugin) ADD_SUBDIRECTORY (src/SketcherPrs) ADD_SUBDIRECTORY (src/SketchPlugin) ADD_SUBDIRECTORY (src/SketchSolver) +ADD_SUBDIRECTORY (src/SAMPlugin) ADD_SUBDIRECTORY (src/ModuleBase) ADD_SUBDIRECTORY (src/PartSet) diff --git a/src/CTestTestfileInstall.cmake b/src/CTestTestfileInstall.cmake index ca18e37d3..4099aca93 100644 --- a/src/CTestTestfileInstall.cmake +++ b/src/CTestTestfileInstall.cmake @@ -37,6 +37,7 @@ SUBDIRS(ConnectorAPI ParametersPlugin PythonAddons SketchAPI + SAMPlugin ConstructionAPI PartSetAPI GeomDataAPI diff --git a/src/Config/plugins.xml.in b/src/Config/plugins.xml.in index 7c23b377e..019bca2f7 100644 --- a/src/Config/plugins.xml.in +++ b/src/Config/plugins.xml.in @@ -15,6 +15,8 @@ + + @DEFAULT_SOLVER@