From b2b8bbec308cd125026b261264e63f65b7cb391a Mon Sep 17 00:00:00 2001 From: Hubery Hsu Date: Wed, 24 Dec 2025 15:00:28 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E3=80=90AL-75=E3=80=91add=20basic=20modeli?= =?UTF-8?q?ng=20commands=20and=20implement=20the=20registering=20function?= =?UTF-8?q?=20of=20all=20commands?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Demos/DemoDependencyPlugin/CMakeLists.txt | 2 +- Demos/DemoPlugin/CMakeLists.txt | 2 +- .../SolidDesignerModel/SolidDesignerModel.h | 23 - Designer/Data/CommandsConfig.xml | 1355 ++++++++++++++--- Designer/Data/FunctionAreaConfig.xml | 321 ++-- .../SolidDemoDependencyPlugin.plugin.xml | 4 +- .../SolidDemoPlugin.plugin.xml | 4 +- .../Plugins/SolidDesignerCommand.plugin.xml | 13 + .../SolidDesignerInteraction.h | 29 +- .../BaseCommands/SolidBaseCommand.cpp | 19 +- .../BaseCommands/SolidBaseCommand.h | 14 +- .../UI/SolidDesignerCommand/CMakeLists.txt | 81 +- .../EditCommands/SolidEditCopyCommand.cpp | 42 + .../EditCommands/SolidEditCopyCommand.h | 32 + .../EditCommands/SolidEditCutCommand.cpp | 42 + .../EditCommands/SolidEditCutCommand.h | 32 + .../EditCommands/SolidEditDeleteCommand.cpp | 42 + .../EditCommands/SolidEditDeleteCommand.h | 32 + .../EditCommands/SolidEditPasteCommand.cpp | 42 + .../EditCommands/SolidEditPasteCommand.h | 32 + .../EditCommands/SolidEditRedoCommand.cpp | 42 + .../EditCommands/SolidEditRedoCommand.h | 32 + .../SolidEditSelectAllCommand.cpp | 42 + .../EditCommands/SolidEditSelectAllCommand.h | 32 + .../EditCommands/SolidEditUndoCommand.cpp | 6 +- .../EditCommands/SolidEditUndoCommand.h | 2 - .../GeneralCommands/SolidFileNewCommand.cpp | 6 +- .../GeneralCommands/SolidFileNewCommand.h | 3 - .../GeneralCommands/SolidFileOpenCommand.cpp | 5 +- .../GeneralCommands/SolidFileOpenCommand.h | 4 +- .../GeneralCommands/SolidFileSaveCommand.cpp | 7 +- .../GeneralCommands/SolidFileSaveCommand.h | 4 +- .../HelpCommands/SolidHelpAboutCommand.cpp | 6 +- .../HelpCommands/SolidHelpAboutCommand.h | 2 - .../HelpCommands/SolidHelpContentsCommand.cpp | 6 +- .../HelpCommands/SolidHelpContentsCommand.h | 2 - .../ModelCommands/SolidModelBlendCommand.cpp | 42 + .../ModelCommands/SolidModelBlendCommand.h | 32 + .../SolidModelExtrudeCommand.cpp | 42 + .../ModelCommands/SolidModelExtrudeCommand.h | 32 + .../SolidModelHelicalSweepCommand.cpp | 42 + .../SolidModelHelicalSweepCommand.h | 32 + .../ModelCommands/SolidModelHoleCommand.cpp | 42 + .../ModelCommands/SolidModelHoleCommand.h | 32 + .../SolidModelRevolveCommand.cpp | 42 + .../ModelCommands/SolidModelRevolveCommand.h | 32 + .../SolidModelRotationalBlendCommand.cpp | 42 + .../SolidModelRotationalBlendCommand.h | 32 + .../ModelCommands/SolidModelSweepCommand.cpp | 42 + .../ModelCommands/SolidModelSweepCommand.h | 32 + .../SolidModelSweptBlendCommand.cpp | 42 + .../SolidModelSweptBlendCommand.h | 32 + .../SolidModelVolumeHelicalSweepCommand.cpp | 42 + .../SolidModelVolumeHelicalSweepCommand.h | 32 + .../SolidDesignerCommand.h | 27 - .../SolidDesignerCommandComponent.cpp | 40 + .../SolidDesignerCommandComponent.h | 22 + .../SolidDesignerCommandFactory.cpp | 61 + .../SolidDesignerCommandFactory.h | 20 + .../SolidDesignerCommandRegister.cpp | 54 + .../SolidDesignerCommandRegister.h | 21 + .../SolidDesignerCommands.h | 181 ++- 62 files changed, 2930 insertions(+), 526 deletions(-) rename Designer/Data/{Plugin => Plugins}/SolidDemoDependencyPlugin.plugin.xml (93%) rename Designer/Data/{Plugin => Plugins}/SolidDemoPlugin.plugin.xml (93%) create mode 100644 Designer/Data/Plugins/SolidDesignerCommand.plugin.xml create mode 100644 Designer/UI/SolidDesignerCommand/EditCommands/SolidEditCopyCommand.cpp create mode 100644 Designer/UI/SolidDesignerCommand/EditCommands/SolidEditCopyCommand.h create mode 100644 Designer/UI/SolidDesignerCommand/EditCommands/SolidEditCutCommand.cpp create mode 100644 Designer/UI/SolidDesignerCommand/EditCommands/SolidEditCutCommand.h create mode 100644 Designer/UI/SolidDesignerCommand/EditCommands/SolidEditDeleteCommand.cpp create mode 100644 Designer/UI/SolidDesignerCommand/EditCommands/SolidEditDeleteCommand.h create mode 100644 Designer/UI/SolidDesignerCommand/EditCommands/SolidEditPasteCommand.cpp create mode 100644 Designer/UI/SolidDesignerCommand/EditCommands/SolidEditPasteCommand.h create mode 100644 Designer/UI/SolidDesignerCommand/EditCommands/SolidEditRedoCommand.cpp create mode 100644 Designer/UI/SolidDesignerCommand/EditCommands/SolidEditRedoCommand.h create mode 100644 Designer/UI/SolidDesignerCommand/EditCommands/SolidEditSelectAllCommand.cpp create mode 100644 Designer/UI/SolidDesignerCommand/EditCommands/SolidEditSelectAllCommand.h create mode 100644 Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelBlendCommand.cpp create mode 100644 Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelBlendCommand.h create mode 100644 Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelExtrudeCommand.cpp create mode 100644 Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelExtrudeCommand.h create mode 100644 Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelHelicalSweepCommand.cpp create mode 100644 Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelHelicalSweepCommand.h create mode 100644 Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelHoleCommand.cpp create mode 100644 Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelHoleCommand.h create mode 100644 Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelRevolveCommand.cpp create mode 100644 Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelRevolveCommand.h create mode 100644 Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelRotationalBlendCommand.cpp create mode 100644 Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelRotationalBlendCommand.h create mode 100644 Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelSweepCommand.cpp create mode 100644 Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelSweepCommand.h create mode 100644 Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelSweptBlendCommand.cpp create mode 100644 Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelSweptBlendCommand.h create mode 100644 Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelVolumeHelicalSweepCommand.cpp create mode 100644 Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelVolumeHelicalSweepCommand.h create mode 100644 Designer/UI/SolidDesignerCommand/SolidDesignerCommandComponent.cpp create mode 100644 Designer/UI/SolidDesignerCommand/SolidDesignerCommandComponent.h create mode 100644 Designer/UI/SolidDesignerCommand/SolidDesignerCommandFactory.cpp create mode 100644 Designer/UI/SolidDesignerCommand/SolidDesignerCommandFactory.h create mode 100644 Designer/UI/SolidDesignerCommand/SolidDesignerCommandRegister.cpp create mode 100644 Designer/UI/SolidDesignerCommand/SolidDesignerCommandRegister.h diff --git a/Demos/DemoDependencyPlugin/CMakeLists.txt b/Demos/DemoDependencyPlugin/CMakeLists.txt index a93cf1ef..16ede380 100644 --- a/Demos/DemoDependencyPlugin/CMakeLists.txt +++ b/Demos/DemoDependencyPlugin/CMakeLists.txt @@ -78,7 +78,7 @@ if(SOLIDRENDER_WIN) elseif(SOLIDRENDER_LINUX) set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}) - set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}/Plugins) endif() diff --git a/Demos/DemoPlugin/CMakeLists.txt b/Demos/DemoPlugin/CMakeLists.txt index 7213f2b4..72746e8a 100644 --- a/Demos/DemoPlugin/CMakeLists.txt +++ b/Demos/DemoPlugin/CMakeLists.txt @@ -78,7 +78,7 @@ if(SOLIDRENDER_WIN) elseif(SOLIDRENDER_LINUX) set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}) - set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}/Plugins) endif() diff --git a/Designer/DB/SolidDesignerModel/SolidDesignerModel.h b/Designer/DB/SolidDesignerModel/SolidDesignerModel.h index 8bb79e4e..b565cc83 100644 --- a/Designer/DB/SolidDesignerModel/SolidDesignerModel.h +++ b/Designer/DB/SolidDesignerModel/SolidDesignerModel.h @@ -12,32 +12,9 @@ #define SOLIDDESIGNER_MODEL_EXPORT __attribute__((visibility("default"))) #endif -namespace -{ - void InitTest() - { - int i = 0; - std::cout << "Here is init test..." << std::endl; - } - void UnInitTest() - { - int i = 0; - std::cout << "Here is uninit test..." << std::endl; - } -} -extern "C" void InitializePlugin() -{ - InitTest(); -} - - -extern "C" void UnInitializePlugin() -{ - UnInitTest(); -} diff --git a/Designer/Data/CommandsConfig.xml b/Designer/Data/CommandsConfig.xml index f57ebca1..f0200d5d 100644 --- a/Designer/Data/CommandsConfig.xml +++ b/Designer/Data/CommandsConfig.xml @@ -174,163 +174,7 @@ icon="icons/window/tile_horizontal.svg" environments="part,sketch,asm,sheet"/> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1068,6 +1377,630 @@ icon="icons/gc/settings.svg" environments="part,asm,sheet"/> - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Designer/Data/FunctionAreaConfig.xml b/Designer/Data/FunctionAreaConfig.xml index 2b62fe95..34b4e409 100644 --- a/Designer/Data/FunctionAreaConfig.xml +++ b/Designer/Data/FunctionAreaConfig.xml @@ -36,62 +36,115 @@ - - - - - - - - - - - - - - - - - + + + + - - - - - - - - + + + + + + + + + + + + - - + + - - + + - - - - - - + + + + + + + + + + + + + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -231,119 +284,119 @@ - - + - - - - - - - - - - - - - - - - - + + + + + - - - - - - - + + + + + - - - - - - - - - - - + + + + - - - - - - - - - - - - - - - + + + + + + + + + + - - - - - - - + + + + + - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - + + + + + + + + + - - - - + + + + + + + + + + + + + - - - - + + + + + + + - - - - + + + + + + - - + + + + + + - @@ -385,8 +438,8 @@ - - + + @@ -711,10 +764,10 @@ - + - + diff --git a/Designer/Data/Plugin/SolidDemoDependencyPlugin.plugin.xml b/Designer/Data/Plugins/SolidDemoDependencyPlugin.plugin.xml similarity index 93% rename from Designer/Data/Plugin/SolidDemoDependencyPlugin.plugin.xml rename to Designer/Data/Plugins/SolidDemoDependencyPlugin.plugin.xml index d274a683..7391c636 100644 --- a/Designer/Data/Plugin/SolidDemoDependencyPlugin.plugin.xml +++ b/Designer/Data/Plugins/SolidDemoDependencyPlugin.plugin.xml @@ -1,4 +1,4 @@ - + alice DemoDependencyPlugin Demo Dependency Plugin @@ -10,4 +10,4 @@ true false - + diff --git a/Designer/Data/Plugin/SolidDemoPlugin.plugin.xml b/Designer/Data/Plugins/SolidDemoPlugin.plugin.xml similarity index 93% rename from Designer/Data/Plugin/SolidDemoPlugin.plugin.xml rename to Designer/Data/Plugins/SolidDemoPlugin.plugin.xml index e4e90eea..c462fdec 100644 --- a/Designer/Data/Plugin/SolidDemoPlugin.plugin.xml +++ b/Designer/Data/Plugins/SolidDemoPlugin.plugin.xml @@ -1,4 +1,4 @@ - + alice DemoPlugin Demo Plugin @@ -10,4 +10,4 @@ true false - + diff --git a/Designer/Data/Plugins/SolidDesignerCommand.plugin.xml b/Designer/Data/Plugins/SolidDesignerCommand.plugin.xml new file mode 100644 index 00000000..87931651 --- /dev/null +++ b/Designer/Data/Plugins/SolidDesignerCommand.plugin.xml @@ -0,0 +1,13 @@ + + SolidDesigner + SolidDesignerCommand + SolidDesignerCommand Plugin + Plugins/SolidDesignerCommand.dll + + + + + + true + true + diff --git a/Designer/Interaction/SolidDesignerInteraction/SolidDesignerInteraction.h b/Designer/Interaction/SolidDesignerInteraction/SolidDesignerInteraction.h index fb8701a5..bc848d9d 100644 --- a/Designer/Interaction/SolidDesignerInteraction/SolidDesignerInteraction.h +++ b/Designer/Interaction/SolidDesignerInteraction/SolidDesignerInteraction.h @@ -13,32 +13,9 @@ #define SOLID_DESIGNER_INTERACTION_EXPORT __attribute__((visibility("default"))) #endif -namespace -{ - void InitTest() - { - int i = 0; - std::cout << "Here is init test..." << std::endl; - } - - void UnInitTest() - { - int i = 0; - std::cout << "Here is uninit test..." << std::endl; - } -} - - -extern "C" void InitializePlugin() -{ - InitTest(); -} - - -extern "C" void UnInitializePlugin() -{ - UnInitTest(); -} + + + diff --git a/Designer/UI/SolidDesignerCommand/BaseCommands/SolidBaseCommand.cpp b/Designer/UI/SolidDesignerCommand/BaseCommands/SolidBaseCommand.cpp index 12f38fe2..7f906cf5 100644 --- a/Designer/UI/SolidDesignerCommand/BaseCommands/SolidBaseCommand.cpp +++ b/Designer/UI/SolidDesignerCommand/BaseCommands/SolidBaseCommand.cpp @@ -1,18 +1,22 @@ #include "SolidBaseCommand.h" +#include "SolidDesignerCommand.h" #include -#include "../../AliceOperationInterface/Public/AliceIOperation.h" +#include "AliceIOperation.h" + using namespace alice; using namespace sdr; AppCommandBase::AppCommandBase() noexcept : m_id() + , m_strModuleId(GuidUtils::ToString(soliddesignercommand::MODULE_ID)) { } AppCommandBase::AppCommandBase(std::string id) noexcept : m_id(std::move(id)) + , m_strModuleId(GuidUtils::ToString(soliddesignercommand::MODULE_ID)) { } @@ -22,11 +26,16 @@ AppCommandBase::~AppCommandBase() } -const std::string_view& AppCommandBase::Id() const noexcept +std::string_view AppCommandBase::Id() const noexcept { return m_id; } +const std::wstring& AppCommandBase::ModuleId() const noexcept +{ + return m_strModuleId; +} + bool AppCommandBase::IsSupported() const { // Default implementation assumes that the command is always supported. @@ -85,3 +94,9 @@ void AppCommandBase::SetId(std::string id) noexcept // only during construction of derived command classes. m_id = std::move(id); } + +void AppCommandBase::SetModuleId(const std::wstring& id) noexcept +{ + m_strModuleId = id; +} + diff --git a/Designer/UI/SolidDesignerCommand/BaseCommands/SolidBaseCommand.h b/Designer/UI/SolidDesignerCommand/BaseCommands/SolidBaseCommand.h index 9bda5ae3..0a1c4205 100644 --- a/Designer/UI/SolidDesignerCommand/BaseCommands/SolidBaseCommand.h +++ b/Designer/UI/SolidDesignerCommand/BaseCommands/SolidBaseCommand.h @@ -43,7 +43,10 @@ namespace sdr /// /// The returned reference is valid for the lifetime of the command /// instance. If no id was set, an empty string is returned. - const std::string_view& Id() const noexcept override; + std::string_view Id() const noexcept override; + + ///\ brief: get the owner module id + virtual const std::wstring& ModuleId() const noexcept override; /// \brief Whether the command is supported in the current environment. /// @@ -95,11 +98,20 @@ namespace sdr /// \param id New identifier string to store. void SetId(std::string id) noexcept; + /// \brief Set the stable identifier of owner module. + /// + /// This helper is intended to be called from derived class + /// constructors when using the default AppCommandBase() constructor. + /// + /// \param id New identifier string to store. + void SetModuleId(const std::wstring& id) noexcept; + private: /// \brief Stable string identifier for this command. /// /// Examples: "file.new", "file.open", "view.fitAll". std::string m_id; + std::wstring m_strModuleId; }; } // namespace sdr diff --git a/Designer/UI/SolidDesignerCommand/CMakeLists.txt b/Designer/UI/SolidDesignerCommand/CMakeLists.txt index c25a8f40..a17eed52 100644 --- a/Designer/UI/SolidDesignerCommand/CMakeLists.txt +++ b/Designer/UI/SolidDesignerCommand/CMakeLists.txt @@ -34,6 +34,7 @@ file(GLOB SDC_FILES "${ABS_SDC}/EditCommands/*.h" "${ABS_SDC}/EditCommands/*.cpp" "${ABS_SDC}/HelpCommands/*.h" "${ABS_SDC}/HelpCommands/*.cpp" "${ABS_SDC}/GeneralCommands/*.h" "${ABS_SDC}/GeneralCommands/*.cpp" + "${ABS_SDC}/ModelCommands/*.h" "${ABS_SDC}/ModelCommands/*.cpp" ) source_group(TREE "${ABS_SDC}" FILES ${SDC_FILES}) @@ -50,12 +51,51 @@ include_directories(${CMAKE_SOURCE_DIR}) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) include_directories(${PROJECT_SOURCE_DIR}/Alice/Core/Foundation/AliceBasicTool/Public) include_directories(${PROJECT_SOURCE_DIR}/Alice/Core/Foundation/AliceFoundation/Public) +include_directories(${PROJECT_SOURCE_DIR}/Alice/Core/Runtime/AlicePluginSystem/Public) include_directories(${PROJECT_SOURCE_DIR}/Alice/Interaction/Interface/AliceCommandInterface/Public) include_directories(${PROJECT_SOURCE_DIR}/Alice/Interaction/Interface/AliceOperationInterface/Public) +include_directories(${PROJECT_SOURCE_DIR}/Alice/Interaction/Interface/AliceCoreApplicationInterface/Public) include_directories(${PROJECT_SOURCE_DIR}/Alice/Data/Interface/AliceModelInterface/Public) include_directories(${PROJECT_SOURCE_DIR}/Alice/UI/QFrameWork/AliceUiFrameWork/Public) + +#----------------------------------------------------------------------------- +# 定义项目构建中间文件的生成目录 +#----------------------------------------------------------------------------- +message("${CMAKE_BINARY_DIR}") +# 用指针位数决定输出目录:x64 / x86 +if(CMAKE_SIZEOF_VOID_P EQUAL 8) + set(SD_ARCH "x64") +elseif(CMAKE_SIZEOF_VOID_P EQUAL 4) + set(SD_ARCH "x86") +else() + message(FATAL_ERROR "Unknown pointer size: ${CMAKE_SIZEOF_VOID_P}") +endif() + +# Linux 侧需要 GNUInstallDirs 提供 CMAKE_INSTALL_LIBDIR/BINDIR +if(UNIX AND NOT APPLE) + include(GNUInstallDirs) +endif() + +# 防止误开关:Linux 下不允许走 SOLIDRENDER_WIN 分支 +if(SOLIDRENDER_WIN AND NOT WIN32) + message(FATAL_ERROR "SOLIDRENDER_WIN=ON but WIN32=OFF. Disable SOLIDRENDER_WIN on Linux.") +endif() +if(SOLIDRENDER_WIN) + set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/${SD_ARCH}/Debug/Plugins) + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/${SD_ARCH}/Debug/Plugins) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/${SD_ARCH}/Debug/Plugins) + set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/${SD_ARCH}/Release/Plugins) + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/${SD_ARCH}/Release/Plugins) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/${SD_ARCH}/Release/Plugins) + +elseif(SOLIDRENDER_LINUX) + set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}) + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}/Plugins) +endif() + #============================================================================= #指定工程为动态库程序 add_library(SolidDesignerCommand SHARED ${SDC_FILES}) @@ -89,42 +129,6 @@ if (WIN32 AND MINGW) set_target_properties(SolidDesignerCommand PROPERTIES IMPORT_SUFFIX ".a") endif() -#----------------------------------------------------------------------------- -# 定义项目构建中间文件的生成目录 -#----------------------------------------------------------------------------- -message("${CMAKE_BINARY_DIR}") -# 用指针位数决定输出目录:x64 / x86 -if(CMAKE_SIZEOF_VOID_P EQUAL 8) - set(SD_ARCH "x64") -elseif(CMAKE_SIZEOF_VOID_P EQUAL 4) - set(SD_ARCH "x86") -else() - message(FATAL_ERROR "Unknown pointer size: ${CMAKE_SIZEOF_VOID_P}") -endif() - -# Linux 侧需要 GNUInstallDirs 提供 CMAKE_INSTALL_LIBDIR/BINDIR -if(UNIX AND NOT APPLE) - include(GNUInstallDirs) -endif() - -# 防止误开关:Linux 下不允许走 SOLIDRENDER_WIN 分支 -if(SOLIDRENDER_WIN AND NOT WIN32) - message(FATAL_ERROR "SOLIDRENDER_WIN=ON but WIN32=OFF. Disable SOLIDRENDER_WIN on Linux.") -endif() -if(SOLIDRENDER_WIN) - set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/${SD_ARCH}/Debug) - set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/${SD_ARCH}/Debug) - set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/${SD_ARCH}/Debug) - set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/${SD_ARCH}/Release) - set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/${SD_ARCH}/Release) - set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/${SD_ARCH}/Release) - -elseif(SOLIDRENDER_LINUX) - set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}) - set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}) - set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}) -endif() - #----------------------------------------------------------------------------- @@ -158,16 +162,17 @@ set_target_properties(SolidDesignerCommandsId PROPERTIES FOLDER "Designer/UI") #----------------------------------------------------------------------------- -# 链接第三方的库 -# @1、链接的动作需要放到add_library之后 +# 链接第三方的库 链接的动作需要放到add_library之后 #----------------------------------------------------------------------------- target_link_libraries(SolidDesignerCommand PRIVATE AliceFoundation AliceBasicTool + AliceCoreApplicationInterface AliceCommandInterface AliceOperationInterface AliceModelInterface AliceUiFrameWork + AlicePluginSystem ) diff --git a/Designer/UI/SolidDesignerCommand/EditCommands/SolidEditCopyCommand.cpp b/Designer/UI/SolidDesignerCommand/EditCommands/SolidEditCopyCommand.cpp new file mode 100644 index 00000000..49ed63db --- /dev/null +++ b/Designer/UI/SolidDesignerCommand/EditCommands/SolidEditCopyCommand.cpp @@ -0,0 +1,42 @@ +#include "SolidEditCopyCommand.h" +#include "SolidDesignerCommands.h" +#include "AliceIOperation.h" + +using namespace sdr; +using namespace alice; + +sdr::SolidEditCopyCommand::SolidEditCopyCommand() noexcept + : AppCommandBase(std::string(Cmd::EDIT_COPY)) +{ + +} + +sdr::SolidEditCopyCommand::~SolidEditCopyCommand() +{ + +} + +bool SolidEditCopyCommand::IsSupported() const +{ + return false; +} + +bool SolidEditCopyCommand::IsVisible() const +{ + return false; +} + +bool SolidEditCopyCommand::IsEnabled() const +{ + return false; +} + +std::string SolidEditCopyCommand::DisabledReason() const +{ + return {}; +} + +std::unique_ptr SolidEditCopyCommand::Execute(const alice::CommandParameter& param) +{ + return nullptr; +} \ No newline at end of file diff --git a/Designer/UI/SolidDesignerCommand/EditCommands/SolidEditCopyCommand.h b/Designer/UI/SolidDesignerCommand/EditCommands/SolidEditCopyCommand.h new file mode 100644 index 00000000..faedf6ab --- /dev/null +++ b/Designer/UI/SolidDesignerCommand/EditCommands/SolidEditCopyCommand.h @@ -0,0 +1,32 @@ +#pragma once +#include "BaseCommands/SolidBaseCommand.h" +#include +#include + +namespace alice +{ + class IMainWindow; + class IDocument; + class IDocumentManager; + struct CommandParameter; + class IOperation; +} + +namespace sdr +{ + class SolidEditCopyCommand final : public AppCommandBase + { + public: + SolidEditCopyCommand() noexcept; + + ~SolidEditCopyCommand() override ; + + bool IsSupported() const override; + bool IsVisible() const override; + bool IsEnabled() const override; + std::string DisabledReason() const override; + + std::unique_ptr Execute(const alice::CommandParameter& param) override; + }; + +} // namespace sdr \ No newline at end of file diff --git a/Designer/UI/SolidDesignerCommand/EditCommands/SolidEditCutCommand.cpp b/Designer/UI/SolidDesignerCommand/EditCommands/SolidEditCutCommand.cpp new file mode 100644 index 00000000..afad1a25 --- /dev/null +++ b/Designer/UI/SolidDesignerCommand/EditCommands/SolidEditCutCommand.cpp @@ -0,0 +1,42 @@ +#include "SolidEditCutCommand.h" +#include "SolidDesignerCommands.h" +#include "AliceIOperation.h" + +using namespace sdr; +using namespace alice; + +sdr::SolidEditCutCommand::SolidEditCutCommand() noexcept + : AppCommandBase(std::string(Cmd::EDIT_CUT)) +{ + +} + +sdr::SolidEditCutCommand::~SolidEditCutCommand() +{ + +} + +bool SolidEditCutCommand::IsSupported() const +{ + return false; +} + +bool SolidEditCutCommand::IsVisible() const +{ + return false; +} + +bool SolidEditCutCommand::IsEnabled() const +{ + return false; +} + +std::string SolidEditCutCommand::DisabledReason() const +{ + return {}; +} + +std::unique_ptr SolidEditCutCommand::Execute(const alice::CommandParameter& param) +{ + return nullptr; +} \ No newline at end of file diff --git a/Designer/UI/SolidDesignerCommand/EditCommands/SolidEditCutCommand.h b/Designer/UI/SolidDesignerCommand/EditCommands/SolidEditCutCommand.h new file mode 100644 index 00000000..31cf9271 --- /dev/null +++ b/Designer/UI/SolidDesignerCommand/EditCommands/SolidEditCutCommand.h @@ -0,0 +1,32 @@ +#pragma once +#include "BaseCommands/SolidBaseCommand.h" +#include +#include + +namespace alice +{ + class IMainWindow; + class IDocument; + class IDocumentManager; + struct CommandParameter; + class IOperation; +} + +namespace sdr +{ + class SolidEditCutCommand final : public AppCommandBase + { + public: + SolidEditCutCommand() noexcept; + + ~SolidEditCutCommand() override ; + + bool IsSupported() const override; + bool IsVisible() const override; + bool IsEnabled() const override; + std::string DisabledReason() const override; + + std::unique_ptr Execute(const alice::CommandParameter& param) override; + }; + +} // namespace sdr \ No newline at end of file diff --git a/Designer/UI/SolidDesignerCommand/EditCommands/SolidEditDeleteCommand.cpp b/Designer/UI/SolidDesignerCommand/EditCommands/SolidEditDeleteCommand.cpp new file mode 100644 index 00000000..8d889dc2 --- /dev/null +++ b/Designer/UI/SolidDesignerCommand/EditCommands/SolidEditDeleteCommand.cpp @@ -0,0 +1,42 @@ +#include "SolidEditDeleteCommand.h" +#include "SolidDesignerCommands.h" +#include "AliceIOperation.h" + +using namespace sdr; +using namespace alice; + +sdr::SolidEditDeleteCommand::SolidEditDeleteCommand() noexcept + : AppCommandBase(std::string(Cmd::EDIT_DELETE)) +{ + +} + +sdr::SolidEditDeleteCommand::~SolidEditDeleteCommand() +{ + +} + +bool SolidEditDeleteCommand::IsSupported() const +{ + return false; +} + +bool SolidEditDeleteCommand::IsVisible() const +{ + return false; +} + +bool SolidEditDeleteCommand::IsEnabled() const +{ + return false; +} + +std::string SolidEditDeleteCommand::DisabledReason() const +{ + return {}; +} + +std::unique_ptr SolidEditDeleteCommand::Execute(const alice::CommandParameter& param) +{ + return nullptr; +} \ No newline at end of file diff --git a/Designer/UI/SolidDesignerCommand/EditCommands/SolidEditDeleteCommand.h b/Designer/UI/SolidDesignerCommand/EditCommands/SolidEditDeleteCommand.h new file mode 100644 index 00000000..801ab03e --- /dev/null +++ b/Designer/UI/SolidDesignerCommand/EditCommands/SolidEditDeleteCommand.h @@ -0,0 +1,32 @@ +#pragma once +#include "BaseCommands/SolidBaseCommand.h" +#include +#include + +namespace alice +{ + class IMainWindow; + class IDocument; + class IDocumentManager; + struct CommandParameter; + class IOperation; +} + +namespace sdr +{ + class SolidEditDeleteCommand final : public AppCommandBase + { + public: + SolidEditDeleteCommand() noexcept; + + ~SolidEditDeleteCommand() override ; + + bool IsSupported() const override; + bool IsVisible() const override; + bool IsEnabled() const override; + std::string DisabledReason() const override; + + std::unique_ptr Execute(const alice::CommandParameter& param) override; + }; + +} // namespace sdr \ No newline at end of file diff --git a/Designer/UI/SolidDesignerCommand/EditCommands/SolidEditPasteCommand.cpp b/Designer/UI/SolidDesignerCommand/EditCommands/SolidEditPasteCommand.cpp new file mode 100644 index 00000000..f4b334de --- /dev/null +++ b/Designer/UI/SolidDesignerCommand/EditCommands/SolidEditPasteCommand.cpp @@ -0,0 +1,42 @@ +#include "SolidEditPasteCommand.h" +#include "SolidDesignerCommands.h" +#include "AliceIOperation.h" + +using namespace sdr; +using namespace alice; + +sdr::SolidEditPasteCommand::SolidEditPasteCommand() noexcept + : AppCommandBase(std::string(Cmd::EDIT_PASTE)) +{ + +} + +sdr::SolidEditPasteCommand::~SolidEditPasteCommand() +{ + +} + +bool SolidEditPasteCommand::IsSupported() const +{ + return false; +} + +bool SolidEditPasteCommand::IsVisible() const +{ + return false; +} + +bool SolidEditPasteCommand::IsEnabled() const +{ + return false; +} + +std::string SolidEditPasteCommand::DisabledReason() const +{ + return {}; +} + +std::unique_ptr SolidEditPasteCommand::Execute(const alice::CommandParameter& param) +{ + return nullptr; +} \ No newline at end of file diff --git a/Designer/UI/SolidDesignerCommand/EditCommands/SolidEditPasteCommand.h b/Designer/UI/SolidDesignerCommand/EditCommands/SolidEditPasteCommand.h new file mode 100644 index 00000000..14ed4d5c --- /dev/null +++ b/Designer/UI/SolidDesignerCommand/EditCommands/SolidEditPasteCommand.h @@ -0,0 +1,32 @@ +#pragma once +#include "BaseCommands/SolidBaseCommand.h" +#include +#include + +namespace alice +{ + class IMainWindow; + class IDocument; + class IDocumentManager; + struct CommandParameter; + class IOperation; +} + +namespace sdr +{ + class SolidEditPasteCommand final : public AppCommandBase + { + public: + SolidEditPasteCommand() noexcept; + + ~SolidEditPasteCommand() override ; + + bool IsSupported() const override; + bool IsVisible() const override; + bool IsEnabled() const override; + std::string DisabledReason() const override; + + std::unique_ptr Execute(const alice::CommandParameter& param) override; + }; + +} // namespace sdr \ No newline at end of file diff --git a/Designer/UI/SolidDesignerCommand/EditCommands/SolidEditRedoCommand.cpp b/Designer/UI/SolidDesignerCommand/EditCommands/SolidEditRedoCommand.cpp new file mode 100644 index 00000000..8db76823 --- /dev/null +++ b/Designer/UI/SolidDesignerCommand/EditCommands/SolidEditRedoCommand.cpp @@ -0,0 +1,42 @@ +#include "SolidEditRedoCommand.h" +#include "SolidDesignerCommands.h" +#include "AliceIOperation.h" + +using namespace sdr; +using namespace alice; + +sdr::SolidEditRedoCommand::SolidEditRedoCommand() noexcept + : AppCommandBase(std::string(Cmd::EDIT_REDO)) +{ + +} + +sdr::SolidEditRedoCommand::~SolidEditRedoCommand() +{ + +} + +bool SolidEditRedoCommand::IsSupported() const +{ + return false; +} + +bool SolidEditRedoCommand::IsVisible() const +{ + return false; +} + +bool SolidEditRedoCommand::IsEnabled() const +{ + return false; +} + +std::string SolidEditRedoCommand::DisabledReason() const +{ + return {}; +} + +std::unique_ptr SolidEditRedoCommand::Execute(const alice::CommandParameter& param) +{ + return nullptr; +} \ No newline at end of file diff --git a/Designer/UI/SolidDesignerCommand/EditCommands/SolidEditRedoCommand.h b/Designer/UI/SolidDesignerCommand/EditCommands/SolidEditRedoCommand.h new file mode 100644 index 00000000..8a8c91ba --- /dev/null +++ b/Designer/UI/SolidDesignerCommand/EditCommands/SolidEditRedoCommand.h @@ -0,0 +1,32 @@ +#pragma once +#include "BaseCommands/SolidBaseCommand.h" +#include +#include + +namespace alice +{ + class IMainWindow; + class IDocument; + class IDocumentManager; + struct CommandParameter; + class IOperation; +} + +namespace sdr +{ + class SolidEditRedoCommand final : public AppCommandBase + { + public: + SolidEditRedoCommand() noexcept; + + ~SolidEditRedoCommand() override ; + + bool IsSupported() const override; + bool IsVisible() const override; + bool IsEnabled() const override; + std::string DisabledReason() const override; + + std::unique_ptr Execute(const alice::CommandParameter& param) override; + }; + +} // namespace sdr \ No newline at end of file diff --git a/Designer/UI/SolidDesignerCommand/EditCommands/SolidEditSelectAllCommand.cpp b/Designer/UI/SolidDesignerCommand/EditCommands/SolidEditSelectAllCommand.cpp new file mode 100644 index 00000000..4e8a87bc --- /dev/null +++ b/Designer/UI/SolidDesignerCommand/EditCommands/SolidEditSelectAllCommand.cpp @@ -0,0 +1,42 @@ +#include "SolidEditSelectAllCommand.h" +#include "SolidDesignerCommands.h" +#include "AliceIOperation.h" + +using namespace sdr; +using namespace alice; + +sdr::SolidEditSelectAllCommand::SolidEditSelectAllCommand() noexcept + : AppCommandBase(std::string(Cmd::EDIT_SELECTALL)) +{ + +} + +sdr::SolidEditSelectAllCommand::~SolidEditSelectAllCommand() +{ + +} + +bool SolidEditSelectAllCommand::IsSupported() const +{ + return false; +} + +bool SolidEditSelectAllCommand::IsVisible() const +{ + return false; +} + +bool SolidEditSelectAllCommand::IsEnabled() const +{ + return false; +} + +std::string SolidEditSelectAllCommand::DisabledReason() const +{ + return {}; +} + +std::unique_ptr SolidEditSelectAllCommand::Execute(const alice::CommandParameter& param) +{ + return nullptr; +} \ No newline at end of file diff --git a/Designer/UI/SolidDesignerCommand/EditCommands/SolidEditSelectAllCommand.h b/Designer/UI/SolidDesignerCommand/EditCommands/SolidEditSelectAllCommand.h new file mode 100644 index 00000000..1bbf7f8c --- /dev/null +++ b/Designer/UI/SolidDesignerCommand/EditCommands/SolidEditSelectAllCommand.h @@ -0,0 +1,32 @@ +#pragma once +#include "BaseCommands/SolidBaseCommand.h" +#include +#include + +namespace alice +{ + class IMainWindow; + class IDocument; + class IDocumentManager; + struct CommandParameter; + class IOperation; +} + +namespace sdr +{ + class SolidEditSelectAllCommand final : public AppCommandBase + { + public: + SolidEditSelectAllCommand() noexcept; + + ~SolidEditSelectAllCommand() override ; + + bool IsSupported() const override; + bool IsVisible() const override; + bool IsEnabled() const override; + std::string DisabledReason() const override; + + std::unique_ptr Execute(const alice::CommandParameter& param) override; + }; + +} // namespace sdr \ No newline at end of file diff --git a/Designer/UI/SolidDesignerCommand/EditCommands/SolidEditUndoCommand.cpp b/Designer/UI/SolidDesignerCommand/EditCommands/SolidEditUndoCommand.cpp index dc7c8444..3d5da522 100644 --- a/Designer/UI/SolidDesignerCommand/EditCommands/SolidEditUndoCommand.cpp +++ b/Designer/UI/SolidDesignerCommand/EditCommands/SolidEditUndoCommand.cpp @@ -6,6 +6,7 @@ using namespace sdr; using namespace alice; sdr::SolidEditUndoCommand::SolidEditUndoCommand() noexcept + : AppCommandBase(std::string(Cmd::EDIT_UNDO)) { } @@ -15,11 +16,6 @@ sdr::SolidEditUndoCommand::~SolidEditUndoCommand() } -const std::string_view& sdr::SolidEditUndoCommand::Id() const noexcept -{ - return Cmd::EDIT_UNDO; -} - bool SolidEditUndoCommand::IsSupported() const { return false; diff --git a/Designer/UI/SolidDesignerCommand/EditCommands/SolidEditUndoCommand.h b/Designer/UI/SolidDesignerCommand/EditCommands/SolidEditUndoCommand.h index d36baa23..9c678731 100644 --- a/Designer/UI/SolidDesignerCommand/EditCommands/SolidEditUndoCommand.h +++ b/Designer/UI/SolidDesignerCommand/EditCommands/SolidEditUndoCommand.h @@ -21,8 +21,6 @@ namespace sdr ~SolidEditUndoCommand() override ; - const std::string_view& Id() const noexcept override; - bool IsSupported() const override; bool IsVisible() const override; bool IsEnabled() const override; diff --git a/Designer/UI/SolidDesignerCommand/GeneralCommands/SolidFileNewCommand.cpp b/Designer/UI/SolidDesignerCommand/GeneralCommands/SolidFileNewCommand.cpp index 8db88f2a..6915b6b3 100644 --- a/Designer/UI/SolidDesignerCommand/GeneralCommands/SolidFileNewCommand.cpp +++ b/Designer/UI/SolidDesignerCommand/GeneralCommands/SolidFileNewCommand.cpp @@ -14,15 +14,11 @@ SolidFileNewCommand::~SolidFileNewCommand() } SolidFileNewCommand::SolidFileNewCommand() noexcept + : AppCommandBase(std::string(Cmd::FILE_NEW)) { } -const std::string_view& sdr::SolidFileNewCommand::Id() const noexcept -{ - return sdr::Cmd::FILE_NEW; -} - std::string SolidFileNewCommand::DisabledReason() const { return std::string(); diff --git a/Designer/UI/SolidDesignerCommand/GeneralCommands/SolidFileNewCommand.h b/Designer/UI/SolidDesignerCommand/GeneralCommands/SolidFileNewCommand.h index 49bbf96f..e5610fa3 100644 --- a/Designer/UI/SolidDesignerCommand/GeneralCommands/SolidFileNewCommand.h +++ b/Designer/UI/SolidDesignerCommand/GeneralCommands/SolidFileNewCommand.h @@ -21,9 +21,6 @@ namespace sdr ~SolidFileNewCommand() override; - /// \brief Logical command id, must match CommandsConfig.xml: id="file.new" - const std::string_view& Id() const noexcept override; - bool IsSupported() const override; bool IsVisible() const override; bool IsEnabled() const override; diff --git a/Designer/UI/SolidDesignerCommand/GeneralCommands/SolidFileOpenCommand.cpp b/Designer/UI/SolidDesignerCommand/GeneralCommands/SolidFileOpenCommand.cpp index 96822c1c..39cece33 100644 --- a/Designer/UI/SolidDesignerCommand/GeneralCommands/SolidFileOpenCommand.cpp +++ b/Designer/UI/SolidDesignerCommand/GeneralCommands/SolidFileOpenCommand.cpp @@ -11,12 +11,13 @@ using namespace alice; using namespace sdr; SolidFileOpenCommand::SolidFileOpenCommand() noexcept + : AppCommandBase(std::string(Cmd::FILE_OPEN)) { } -const std::string_view& SolidFileOpenCommand::Id() const noexcept +SolidFileOpenCommand::~SolidFileOpenCommand() { - return sdr::Cmd::FILE_OPEN; + } bool SolidFileOpenCommand::IsSupported() const diff --git a/Designer/UI/SolidDesignerCommand/GeneralCommands/SolidFileOpenCommand.h b/Designer/UI/SolidDesignerCommand/GeneralCommands/SolidFileOpenCommand.h index cf8bc2dc..7ee4f72a 100644 --- a/Designer/UI/SolidDesignerCommand/GeneralCommands/SolidFileOpenCommand.h +++ b/Designer/UI/SolidDesignerCommand/GeneralCommands/SolidFileOpenCommand.h @@ -20,9 +20,7 @@ namespace sdr public: SolidFileOpenCommand() noexcept; - ~SolidFileOpenCommand() override = default; - - const std::string_view& Id() const noexcept override; + ~SolidFileOpenCommand() override; bool IsSupported() const override; bool IsVisible() const override; diff --git a/Designer/UI/SolidDesignerCommand/GeneralCommands/SolidFileSaveCommand.cpp b/Designer/UI/SolidDesignerCommand/GeneralCommands/SolidFileSaveCommand.cpp index cadf178c..5607f03b 100644 --- a/Designer/UI/SolidDesignerCommand/GeneralCommands/SolidFileSaveCommand.cpp +++ b/Designer/UI/SolidDesignerCommand/GeneralCommands/SolidFileSaveCommand.cpp @@ -11,12 +11,13 @@ using namespace alice; using namespace sdr; SolidFileSaveCommand::SolidFileSaveCommand() noexcept + : AppCommandBase(std::string(Cmd::FILE_SAVE)) { } -const std::string_view& SolidFileSaveCommand::Id() const noexcept +SolidFileSaveCommand::~SolidFileSaveCommand() { - return sdr::Cmd::FILE_SAVE; + } bool SolidFileSaveCommand::IsSupported() const @@ -151,3 +152,5 @@ bool SolidFileSaveCommand::saveDocument_(IDocument& doc, const std::wstring& pat //} return false; } + + diff --git a/Designer/UI/SolidDesignerCommand/GeneralCommands/SolidFileSaveCommand.h b/Designer/UI/SolidDesignerCommand/GeneralCommands/SolidFileSaveCommand.h index d6b51a1d..05ff2ff6 100644 --- a/Designer/UI/SolidDesignerCommand/GeneralCommands/SolidFileSaveCommand.h +++ b/Designer/UI/SolidDesignerCommand/GeneralCommands/SolidFileSaveCommand.h @@ -20,9 +20,7 @@ namespace sdr public: SolidFileSaveCommand() noexcept; - ~SolidFileSaveCommand() override = default; - - const std::string_view& Id() const noexcept override; + ~SolidFileSaveCommand() override; bool IsSupported() const override; bool IsVisible() const override; diff --git a/Designer/UI/SolidDesignerCommand/HelpCommands/SolidHelpAboutCommand.cpp b/Designer/UI/SolidDesignerCommand/HelpCommands/SolidHelpAboutCommand.cpp index b14db6fe..025edc83 100644 --- a/Designer/UI/SolidDesignerCommand/HelpCommands/SolidHelpAboutCommand.cpp +++ b/Designer/UI/SolidDesignerCommand/HelpCommands/SolidHelpAboutCommand.cpp @@ -9,6 +9,7 @@ using namespace sdr; using namespace alice; sdr::SolidHelpAboutCommand::SolidHelpAboutCommand() noexcept + : AppCommandBase(std::string(Cmd::HELP_ABOUT)) { } @@ -18,11 +19,6 @@ sdr::SolidHelpAboutCommand::~SolidHelpAboutCommand() } -const std::string_view& sdr::SolidHelpAboutCommand::Id() const noexcept -{ - return Cmd::HELP_ABOUT; -} - bool sdr::SolidHelpAboutCommand::IsSupported() const { return false; diff --git a/Designer/UI/SolidDesignerCommand/HelpCommands/SolidHelpAboutCommand.h b/Designer/UI/SolidDesignerCommand/HelpCommands/SolidHelpAboutCommand.h index f92989c4..da5d4875 100644 --- a/Designer/UI/SolidDesignerCommand/HelpCommands/SolidHelpAboutCommand.h +++ b/Designer/UI/SolidDesignerCommand/HelpCommands/SolidHelpAboutCommand.h @@ -22,8 +22,6 @@ namespace sdr ~SolidHelpAboutCommand() override; - const std::string_view& Id() const noexcept override; - bool IsSupported() const override; bool IsVisible() const override; bool IsEnabled() const override; diff --git a/Designer/UI/SolidDesignerCommand/HelpCommands/SolidHelpContentsCommand.cpp b/Designer/UI/SolidDesignerCommand/HelpCommands/SolidHelpContentsCommand.cpp index 0494fc19..5c109e31 100644 --- a/Designer/UI/SolidDesignerCommand/HelpCommands/SolidHelpContentsCommand.cpp +++ b/Designer/UI/SolidDesignerCommand/HelpCommands/SolidHelpContentsCommand.cpp @@ -9,6 +9,7 @@ using namespace alice; using namespace sdr; sdr::SolidHelpContentsCommand::SolidHelpContentsCommand() noexcept + : AppCommandBase(std::string(Cmd::CMD_HELP_CONTENTS)) { } @@ -18,11 +19,6 @@ SolidHelpContentsCommand::~SolidHelpContentsCommand() } -const std::string_view& SolidHelpContentsCommand::Id() const noexcept -{ - return sdr::Cmd::CMD_HELP_CONTENTS; -} - bool SolidHelpContentsCommand::IsSupported() const { return false; diff --git a/Designer/UI/SolidDesignerCommand/HelpCommands/SolidHelpContentsCommand.h b/Designer/UI/SolidDesignerCommand/HelpCommands/SolidHelpContentsCommand.h index 022c04e6..015f8f3f 100644 --- a/Designer/UI/SolidDesignerCommand/HelpCommands/SolidHelpContentsCommand.h +++ b/Designer/UI/SolidDesignerCommand/HelpCommands/SolidHelpContentsCommand.h @@ -22,8 +22,6 @@ namespace sdr ~SolidHelpContentsCommand() override; - const std::string_view& Id() const noexcept override; - bool IsSupported() const override; bool IsVisible() const override; bool IsEnabled() const override; diff --git a/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelBlendCommand.cpp b/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelBlendCommand.cpp new file mode 100644 index 00000000..ce17d4e8 --- /dev/null +++ b/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelBlendCommand.cpp @@ -0,0 +1,42 @@ +#include "SolidModelBlendCommand.h" +#include "SolidDesignerCommands.h" +#include "AliceIOperation.h" + +using namespace sdr; +using namespace alice; + +sdr::SolidModelBlendCommand::SolidModelBlendCommand() noexcept + : AppCommandBase(std::string(Cmd::MODEL_BLEND)) +{ + +} + +sdr::SolidModelBlendCommand::~SolidModelBlendCommand() +{ + +} + +bool SolidModelBlendCommand::IsSupported() const +{ + return false; +} + +bool SolidModelBlendCommand::IsVisible() const +{ + return false; +} + +bool SolidModelBlendCommand::IsEnabled() const +{ + return false; +} + +std::string SolidModelBlendCommand::DisabledReason() const +{ + return {}; +} + +std::unique_ptr SolidModelBlendCommand::Execute(const alice::CommandParameter& param) +{ + return nullptr; +} \ No newline at end of file diff --git a/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelBlendCommand.h b/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelBlendCommand.h new file mode 100644 index 00000000..8a1b1791 --- /dev/null +++ b/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelBlendCommand.h @@ -0,0 +1,32 @@ +#pragma once +#include "BaseCommands/SolidBaseCommand.h" +#include +#include + +namespace alice +{ + class IMainWindow; + class IDocument; + class IDocumentManager; + struct CommandParameter; + class IOperation; +} + +namespace sdr +{ + class SolidModelBlendCommand final : public AppCommandBase + { + public: + SolidModelBlendCommand() noexcept; + + ~SolidModelBlendCommand() override ; + + bool IsSupported() const override; + bool IsVisible() const override; + bool IsEnabled() const override; + std::string DisabledReason() const override; + + std::unique_ptr Execute(const alice::CommandParameter& param) override; + }; + +} // namespace sdr \ No newline at end of file diff --git a/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelExtrudeCommand.cpp b/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelExtrudeCommand.cpp new file mode 100644 index 00000000..8f2c6bb7 --- /dev/null +++ b/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelExtrudeCommand.cpp @@ -0,0 +1,42 @@ +#include "SolidModelExtrudeCommand.h" +#include "SolidDesignerCommands.h" +#include "AliceIOperation.h" + +using namespace sdr; +using namespace alice; + +sdr::SolidModelExtrudeCommand::SolidModelExtrudeCommand() noexcept + : AppCommandBase(std::string(Cmd::MODEL_EXTRUDE)) +{ + +} + +sdr::SolidModelExtrudeCommand::~SolidModelExtrudeCommand() +{ + +} + +bool SolidModelExtrudeCommand::IsSupported() const +{ + return false; +} + +bool SolidModelExtrudeCommand::IsVisible() const +{ + return false; +} + +bool SolidModelExtrudeCommand::IsEnabled() const +{ + return false; +} + +std::string SolidModelExtrudeCommand::DisabledReason() const +{ + return {}; +} + +std::unique_ptr SolidModelExtrudeCommand::Execute(const alice::CommandParameter& param) +{ + return nullptr; +} \ No newline at end of file diff --git a/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelExtrudeCommand.h b/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelExtrudeCommand.h new file mode 100644 index 00000000..34fa68b0 --- /dev/null +++ b/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelExtrudeCommand.h @@ -0,0 +1,32 @@ +#pragma once +#include "BaseCommands/SolidBaseCommand.h" +#include +#include + +namespace alice +{ + class IMainWindow; + class IDocument; + class IDocumentManager; + struct CommandParameter; + class IOperation; +} + +namespace sdr +{ + class SolidModelExtrudeCommand final : public AppCommandBase + { + public: + SolidModelExtrudeCommand() noexcept; + + ~SolidModelExtrudeCommand() override ; + + bool IsSupported() const override; + bool IsVisible() const override; + bool IsEnabled() const override; + std::string DisabledReason() const override; + + std::unique_ptr Execute(const alice::CommandParameter& param) override; + }; + +} // namespace sdr \ No newline at end of file diff --git a/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelHelicalSweepCommand.cpp b/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelHelicalSweepCommand.cpp new file mode 100644 index 00000000..50b3afaa --- /dev/null +++ b/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelHelicalSweepCommand.cpp @@ -0,0 +1,42 @@ +#include "SolidModelHelicalSweepCommand.h" +#include "SolidDesignerCommands.h" +#include "AliceIOperation.h" + +using namespace sdr; +using namespace alice; + +sdr::SolidModelHelicalSweepCommand::SolidModelHelicalSweepCommand() noexcept + : AppCommandBase(std::string(Cmd::MODEL_SWEEP_HELICAL)) +{ + +} + +sdr::SolidModelHelicalSweepCommand::~SolidModelHelicalSweepCommand() +{ + +} + +bool SolidModelHelicalSweepCommand::IsSupported() const +{ + return false; +} + +bool SolidModelHelicalSweepCommand::IsVisible() const +{ + return false; +} + +bool SolidModelHelicalSweepCommand::IsEnabled() const +{ + return false; +} + +std::string SolidModelHelicalSweepCommand::DisabledReason() const +{ + return {}; +} + +std::unique_ptr SolidModelHelicalSweepCommand::Execute(const alice::CommandParameter& param) +{ + return nullptr; +} \ No newline at end of file diff --git a/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelHelicalSweepCommand.h b/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelHelicalSweepCommand.h new file mode 100644 index 00000000..30ef3e81 --- /dev/null +++ b/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelHelicalSweepCommand.h @@ -0,0 +1,32 @@ +#pragma once +#include "BaseCommands/SolidBaseCommand.h" +#include +#include + +namespace alice +{ + class IMainWindow; + class IDocument; + class IDocumentManager; + struct CommandParameter; + class IOperation; +} + +namespace sdr +{ + class SolidModelHelicalSweepCommand final : public AppCommandBase + { + public: + SolidModelHelicalSweepCommand() noexcept; + + ~SolidModelHelicalSweepCommand() override ; + + bool IsSupported() const override; + bool IsVisible() const override; + bool IsEnabled() const override; + std::string DisabledReason() const override; + + std::unique_ptr Execute(const alice::CommandParameter& param) override; + }; + +} // namespace sdr \ No newline at end of file diff --git a/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelHoleCommand.cpp b/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelHoleCommand.cpp new file mode 100644 index 00000000..d5dc2124 --- /dev/null +++ b/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelHoleCommand.cpp @@ -0,0 +1,42 @@ +#include "SolidModelHoleCommand.h" +#include "SolidDesignerCommands.h" +#include "AliceIOperation.h" + +using namespace sdr; +using namespace alice; + +sdr::SolidModelHoleCommand::SolidModelHoleCommand() noexcept + : AppCommandBase(std::string(Cmd::MODEL_HOLE)) +{ + +} + +sdr::SolidModelHoleCommand::~SolidModelHoleCommand() +{ + +} + +bool SolidModelHoleCommand::IsSupported() const +{ + return false; +} + +bool SolidModelHoleCommand::IsVisible() const +{ + return false; +} + +bool SolidModelHoleCommand::IsEnabled() const +{ + return false; +} + +std::string SolidModelHoleCommand::DisabledReason() const +{ + return {}; +} + +std::unique_ptr SolidModelHoleCommand::Execute(const alice::CommandParameter& param) +{ + return nullptr; +} \ No newline at end of file diff --git a/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelHoleCommand.h b/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelHoleCommand.h new file mode 100644 index 00000000..ed54493a --- /dev/null +++ b/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelHoleCommand.h @@ -0,0 +1,32 @@ +#pragma once +#include "BaseCommands/SolidBaseCommand.h" +#include +#include + +namespace alice +{ + class IMainWindow; + class IDocument; + class IDocumentManager; + struct CommandParameter; + class IOperation; +} + +namespace sdr +{ + class SolidModelHoleCommand final : public AppCommandBase + { + public: + SolidModelHoleCommand() noexcept; + + ~SolidModelHoleCommand() override ; + + bool IsSupported() const override; + bool IsVisible() const override; + bool IsEnabled() const override; + std::string DisabledReason() const override; + + std::unique_ptr Execute(const alice::CommandParameter& param) override; + }; + +} // namespace sdr \ No newline at end of file diff --git a/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelRevolveCommand.cpp b/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelRevolveCommand.cpp new file mode 100644 index 00000000..709cb3e6 --- /dev/null +++ b/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelRevolveCommand.cpp @@ -0,0 +1,42 @@ +#include "SolidModelRevolveCommand.h" +#include "SolidDesignerCommands.h" +#include "AliceIOperation.h" + +using namespace sdr; +using namespace alice; + +sdr::SolidModelRevolveCommand::SolidModelRevolveCommand() noexcept + : AppCommandBase(std::string(Cmd::MODEL_REVOLVE)) +{ + +} + +sdr::SolidModelRevolveCommand::~SolidModelRevolveCommand() +{ + +} + +bool SolidModelRevolveCommand::IsSupported() const +{ + return false; +} + +bool SolidModelRevolveCommand::IsVisible() const +{ + return false; +} + +bool SolidModelRevolveCommand::IsEnabled() const +{ + return false; +} + +std::string SolidModelRevolveCommand::DisabledReason() const +{ + return {}; +} + +std::unique_ptr SolidModelRevolveCommand::Execute(const alice::CommandParameter& param) +{ + return nullptr; +} \ No newline at end of file diff --git a/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelRevolveCommand.h b/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelRevolveCommand.h new file mode 100644 index 00000000..70b0b4df --- /dev/null +++ b/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelRevolveCommand.h @@ -0,0 +1,32 @@ +#pragma once +#include "BaseCommands/SolidBaseCommand.h" +#include +#include + +namespace alice +{ + class IMainWindow; + class IDocument; + class IDocumentManager; + struct CommandParameter; + class IOperation; +} + +namespace sdr +{ + class SolidModelRevolveCommand final : public AppCommandBase + { + public: + SolidModelRevolveCommand() noexcept; + + ~SolidModelRevolveCommand() override ; + + bool IsSupported() const override; + bool IsVisible() const override; + bool IsEnabled() const override; + std::string DisabledReason() const override; + + std::unique_ptr Execute(const alice::CommandParameter& param) override; + }; + +} // namespace sdr \ No newline at end of file diff --git a/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelRotationalBlendCommand.cpp b/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelRotationalBlendCommand.cpp new file mode 100644 index 00000000..198f8c7b --- /dev/null +++ b/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelRotationalBlendCommand.cpp @@ -0,0 +1,42 @@ +#include "SolidModelRotationalBlendCommand.h" +#include "SolidDesignerCommands.h" +#include "AliceIOperation.h" + +using namespace sdr; +using namespace alice; + +sdr::SolidModelRotationalBlendCommand::SolidModelRotationalBlendCommand() noexcept + : AppCommandBase(std::string(Cmd::MODEL_BLEND_ROTATIONAL)) +{ + +} + +sdr::SolidModelRotationalBlendCommand::~SolidModelRotationalBlendCommand() +{ + +} + +bool SolidModelRotationalBlendCommand::IsSupported() const +{ + return false; +} + +bool SolidModelRotationalBlendCommand::IsVisible() const +{ + return false; +} + +bool SolidModelRotationalBlendCommand::IsEnabled() const +{ + return false; +} + +std::string SolidModelRotationalBlendCommand::DisabledReason() const +{ + return {}; +} + +std::unique_ptr SolidModelRotationalBlendCommand::Execute(const alice::CommandParameter& param) +{ + return nullptr; +} \ No newline at end of file diff --git a/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelRotationalBlendCommand.h b/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelRotationalBlendCommand.h new file mode 100644 index 00000000..5e77d079 --- /dev/null +++ b/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelRotationalBlendCommand.h @@ -0,0 +1,32 @@ +#pragma once +#include "BaseCommands/SolidBaseCommand.h" +#include +#include + +namespace alice +{ + class IMainWindow; + class IDocument; + class IDocumentManager; + struct CommandParameter; + class IOperation; +} + +namespace sdr +{ + class SolidModelRotationalBlendCommand final : public AppCommandBase + { + public: + SolidModelRotationalBlendCommand() noexcept; + + ~SolidModelRotationalBlendCommand() override ; + + bool IsSupported() const override; + bool IsVisible() const override; + bool IsEnabled() const override; + std::string DisabledReason() const override; + + std::unique_ptr Execute(const alice::CommandParameter& param) override; + }; + +} // namespace sdr \ No newline at end of file diff --git a/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelSweepCommand.cpp b/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelSweepCommand.cpp new file mode 100644 index 00000000..24497de6 --- /dev/null +++ b/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelSweepCommand.cpp @@ -0,0 +1,42 @@ +#include "SolidModelSweepCommand.h" +#include "SolidDesignerCommands.h" +#include "AliceIOperation.h" + +using namespace sdr; +using namespace alice; + +sdr::SolidModelSweepCommand::SolidModelSweepCommand() noexcept + : AppCommandBase(std::string(Cmd::MODEL_SWEEP)) +{ + +} + +sdr::SolidModelSweepCommand::~SolidModelSweepCommand() +{ + +} + +bool SolidModelSweepCommand::IsSupported() const +{ + return false; +} + +bool SolidModelSweepCommand::IsVisible() const +{ + return false; +} + +bool SolidModelSweepCommand::IsEnabled() const +{ + return false; +} + +std::string SolidModelSweepCommand::DisabledReason() const +{ + return {}; +} + +std::unique_ptr SolidModelSweepCommand::Execute(const alice::CommandParameter& param) +{ + return nullptr; +} \ No newline at end of file diff --git a/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelSweepCommand.h b/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelSweepCommand.h new file mode 100644 index 00000000..1e29ccb2 --- /dev/null +++ b/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelSweepCommand.h @@ -0,0 +1,32 @@ +#pragma once +#include "BaseCommands/SolidBaseCommand.h" +#include +#include + +namespace alice +{ + class IMainWindow; + class IDocument; + class IDocumentManager; + struct CommandParameter; + class IOperation; +} + +namespace sdr +{ + class SolidModelSweepCommand final : public AppCommandBase + { + public: + SolidModelSweepCommand() noexcept; + + ~SolidModelSweepCommand() override ; + + bool IsSupported() const override; + bool IsVisible() const override; + bool IsEnabled() const override; + std::string DisabledReason() const override; + + std::unique_ptr Execute(const alice::CommandParameter& param) override; + }; + +} // namespace sdr \ No newline at end of file diff --git a/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelSweptBlendCommand.cpp b/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelSweptBlendCommand.cpp new file mode 100644 index 00000000..e52d9a35 --- /dev/null +++ b/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelSweptBlendCommand.cpp @@ -0,0 +1,42 @@ +#include "SolidModelSweptBlendCommand.h" +#include "SolidDesignerCommands.h" +#include "AliceIOperation.h" + +using namespace sdr; +using namespace alice; + +sdr::SolidModelSweptBlendCommand::SolidModelSweptBlendCommand() noexcept + : AppCommandBase(std::string(Cmd::MODEL_SWEEPBLEND)) +{ + +} + +sdr::SolidModelSweptBlendCommand::~SolidModelSweptBlendCommand() +{ + +} + +bool SolidModelSweptBlendCommand::IsSupported() const +{ + return false; +} + +bool SolidModelSweptBlendCommand::IsVisible() const +{ + return false; +} + +bool SolidModelSweptBlendCommand::IsEnabled() const +{ + return false; +} + +std::string SolidModelSweptBlendCommand::DisabledReason() const +{ + return {}; +} + +std::unique_ptr SolidModelSweptBlendCommand::Execute(const alice::CommandParameter& param) +{ + return nullptr; +} \ No newline at end of file diff --git a/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelSweptBlendCommand.h b/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelSweptBlendCommand.h new file mode 100644 index 00000000..0cf6a9f9 --- /dev/null +++ b/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelSweptBlendCommand.h @@ -0,0 +1,32 @@ +#pragma once +#include "BaseCommands/SolidBaseCommand.h" +#include +#include + +namespace alice +{ + class IMainWindow; + class IDocument; + class IDocumentManager; + struct CommandParameter; + class IOperation; +} + +namespace sdr +{ + class SolidModelSweptBlendCommand final : public AppCommandBase + { + public: + SolidModelSweptBlendCommand() noexcept; + + ~SolidModelSweptBlendCommand() override ; + + bool IsSupported() const override; + bool IsVisible() const override; + bool IsEnabled() const override; + std::string DisabledReason() const override; + + std::unique_ptr Execute(const alice::CommandParameter& param) override; + }; + +} // namespace sdr \ No newline at end of file diff --git a/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelVolumeHelicalSweepCommand.cpp b/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelVolumeHelicalSweepCommand.cpp new file mode 100644 index 00000000..0d347750 --- /dev/null +++ b/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelVolumeHelicalSweepCommand.cpp @@ -0,0 +1,42 @@ +#include "SolidModelVolumeHelicalSweepCommand.h" +#include "SolidDesignerCommands.h" +#include "AliceIOperation.h" + +using namespace sdr; +using namespace alice; + +sdr::SolidModelVolumeHelicalSweepCommand::SolidModelVolumeHelicalSweepCommand() noexcept + : AppCommandBase(std::string(Cmd::MODEL_SWEEP_VOLUMEHELICAL)) +{ + +} + +sdr::SolidModelVolumeHelicalSweepCommand::~SolidModelVolumeHelicalSweepCommand() +{ + +} + +bool SolidModelVolumeHelicalSweepCommand::IsSupported() const +{ + return false; +} + +bool SolidModelVolumeHelicalSweepCommand::IsVisible() const +{ + return false; +} + +bool SolidModelVolumeHelicalSweepCommand::IsEnabled() const +{ + return false; +} + +std::string SolidModelVolumeHelicalSweepCommand::DisabledReason() const +{ + return {}; +} + +std::unique_ptr SolidModelVolumeHelicalSweepCommand::Execute(const alice::CommandParameter& param) +{ + return nullptr; +} \ No newline at end of file diff --git a/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelVolumeHelicalSweepCommand.h b/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelVolumeHelicalSweepCommand.h new file mode 100644 index 00000000..ab546da4 --- /dev/null +++ b/Designer/UI/SolidDesignerCommand/ModelCommands/SolidModelVolumeHelicalSweepCommand.h @@ -0,0 +1,32 @@ +#pragma once +#include "BaseCommands/SolidBaseCommand.h" +#include +#include + +namespace alice +{ + class IMainWindow; + class IDocument; + class IDocumentManager; + struct CommandParameter; + class IOperation; +} + +namespace sdr +{ + class SolidModelVolumeHelicalSweepCommand final : public AppCommandBase + { + public: + SolidModelVolumeHelicalSweepCommand() noexcept; + + ~SolidModelVolumeHelicalSweepCommand() override ; + + bool IsSupported() const override; + bool IsVisible() const override; + bool IsEnabled() const override; + std::string DisabledReason() const override; + + std::unique_ptr Execute(const alice::CommandParameter& param) override; + }; + +} // namespace sdr \ No newline at end of file diff --git a/Designer/UI/SolidDesignerCommand/SolidDesignerCommand.h b/Designer/UI/SolidDesignerCommand/SolidDesignerCommand.h index 9f133884..b401db08 100644 --- a/Designer/UI/SolidDesignerCommand/SolidDesignerCommand.h +++ b/Designer/UI/SolidDesignerCommand/SolidDesignerCommand.h @@ -18,32 +18,5 @@ namespace soliddesignercommand extern const Guid MODULE_ID; } -namespace -{ - void InitTest() - { - int i = 0; - std::cout << "Here is init test..." << std::endl; - } - - void UnInitTest() - { - int i = 0; - std::cout << "Here is uninit test..." << std::endl; - } -} - - -extern "C" void InitializePlugin() -{ - InitTest(); -} - - -extern "C" void UnInitializePlugin() -{ - UnInitTest(); -} - diff --git a/Designer/UI/SolidDesignerCommand/SolidDesignerCommandComponent.cpp b/Designer/UI/SolidDesignerCommand/SolidDesignerCommandComponent.cpp new file mode 100644 index 00000000..7a378a1c --- /dev/null +++ b/Designer/UI/SolidDesignerCommand/SolidDesignerCommandComponent.cpp @@ -0,0 +1,40 @@ +#include "SolidDesignerCommandComponent.h" +#include +#include "SolidDesignerCommandRegister.h" +#include "AliceGuidUtils.h" +#include "SolidDesignerCommand.h" + +using namespace sdr; +using namespace alice; + +namespace +{ + void TestInitialisationFinished() + { + std::cout << "calling init finish..." << std::endl; + } +} + +ALICE_IMPL_CONCRETE_OBJECT_TYPE(SolidDesignerCommandComponent, "SolidDesignerCommand") +sdr::SolidDesignerCommandComponent::~SolidDesignerCommandComponent() +{ + +} + +bool SolidDesignerCommandComponent::InitialiseEvent() +{ + SolidDesignerCommandRegister& oRegister = SolidDesignerCommandRegister::GetInstance(); + oRegister.RegisterCommands(); + return true; +} + +void SolidDesignerCommandComponent::InitialisationFinishedEvent() +{ + TestInitialisationFinished(); +} + +void SolidDesignerCommandComponent::FinaliseEvent() +{ + SolidDesignerCommandRegister& oRegister = SolidDesignerCommandRegister::GetInstance(); + oRegister.UnRegisterCommands(); +} \ No newline at end of file diff --git a/Designer/UI/SolidDesignerCommand/SolidDesignerCommandComponent.h b/Designer/UI/SolidDesignerCommand/SolidDesignerCommandComponent.h new file mode 100644 index 00000000..18504d0a --- /dev/null +++ b/Designer/UI/SolidDesignerCommand/SolidDesignerCommandComponent.h @@ -0,0 +1,22 @@ +#pragma once + +#include "AliceObjectMacros.h" +#include "AliceIPluginComponent.h" +#include "AlicePluginExports.h" + +namespace sdr +{ + class SolidDesignerCommandComponent final : public alice::IPluginComponent + { + ALICE_DECLARE_OBJECT_TYPE(SolidDesignerCommandComponent, IPluginComponent) + public: + ~SolidDesignerCommandComponent() override; + + bool InitialiseEvent() override; + void InitialisationFinishedEvent() override; + void FinaliseEvent() override; + }; +} + +ALICE_PLUGIN_EXPORT_INTERFACES(sdr::SolidDesignerCommandComponent, + /*AbiMajorValue*/ 1, "SolidDesigner", "SolidDesignerCommandComponent", "Solid Designer Command Component", "1.0.0"); \ No newline at end of file diff --git a/Designer/UI/SolidDesignerCommand/SolidDesignerCommandFactory.cpp b/Designer/UI/SolidDesignerCommand/SolidDesignerCommandFactory.cpp new file mode 100644 index 00000000..9aa0929f --- /dev/null +++ b/Designer/UI/SolidDesignerCommand/SolidDesignerCommandFactory.cpp @@ -0,0 +1,61 @@ +#include "SolidDesignerCommandFactory.h" +#include "EditCommands/SolidEditUndoCommand.h" +#include "GeneralCommands/SolidFileNewCommand.h" +#include "GeneralCommands/SolidFileOpenCommand.h" +#include "GeneralCommands/SolidFileSaveCommand.h" +#include "HelpCommands/SolidHelpAboutCommand.h" +#include "HelpCommands/SolidHelpContentsCommand.h" +#include "ModelCommands/SolidModelBlendCommand.h" +#include "ModelCommands/SolidModelExtrudeCommand.h" +#include "ModelCommands/SolidModelHelicalSweepCommand.h" +#include "ModelCommands/SolidModelHoleCommand.h" +#include "ModelCommands/SolidModelRevolveCommand.h" +#include "ModelCommands/SolidModelRotationalBlendCommand.h" +#include "ModelCommands/SolidModelSweepCommand.h" +#include "ModelCommands/SolidModelSweptBlendCommand.h" +#include "ModelCommands/SolidModelVolumeHelicalSweepCommand.h" +#include "EditCommands/SolidEditCopyCommand.h" +#include "EditCommands/SolidEditCutCommand.h" +#include "EditCommands/SolidEditDeleteCommand.h" +#include "EditCommands/SolidEditPasteCommand.h" +#include "EditCommands/SolidEditRedoCommand.h" +#include "EditCommands/SolidEditSelectAllCommand.h" + +using namespace sdr; + +sdr::SolidDesignerCommandFactory& SolidDesignerCommandFactory::GetInstance() +{ + static SolidDesignerCommandFactory s_Instance; + return s_Instance; +} + +std::vector> SolidDesignerCommandFactory::CreateCommands() +{ + std::vector> vecCommands; + vecCommands.emplace_back(std::make_shared()); + vecCommands.emplace_back(std::make_shared()); + vecCommands.emplace_back(std::make_shared()); + vecCommands.emplace_back(std::make_shared()); + vecCommands.emplace_back(std::make_shared()); + vecCommands.emplace_back(std::make_shared()); + vecCommands.emplace_back(std::make_shared()); + + vecCommands.emplace_back(std::make_shared()); + vecCommands.emplace_back(std::make_shared()); + vecCommands.emplace_back(std::make_shared()); + + vecCommands.emplace_back(std::make_shared()); + vecCommands.emplace_back(std::make_shared()); + + vecCommands.emplace_back(std::make_shared()); + vecCommands.emplace_back(std::make_shared()); + vecCommands.emplace_back(std::make_shared()); + vecCommands.emplace_back(std::make_shared()); + vecCommands.emplace_back(std::make_shared()); + vecCommands.emplace_back(std::make_shared()); + vecCommands.emplace_back(std::make_shared()); + vecCommands.emplace_back(std::make_shared()); + vecCommands.emplace_back(std::make_shared()); + + return vecCommands; +} diff --git a/Designer/UI/SolidDesignerCommand/SolidDesignerCommandFactory.h b/Designer/UI/SolidDesignerCommand/SolidDesignerCommandFactory.h new file mode 100644 index 00000000..8b91bb67 --- /dev/null +++ b/Designer/UI/SolidDesignerCommand/SolidDesignerCommandFactory.h @@ -0,0 +1,20 @@ +#pragma once + +#include "AliceObjectMacros.h" +#include "AliceIPluginComponent.h" +#include "AlicePluginExports.h" +#include "AliceMacroDefinitions.h" + +namespace alice { class ICommand; } + +namespace sdr +{ + class SolidDesignerCommandFactory final + { + ALICE_PRIVATE_CTOR_DTOR(SolidDesignerCommandFactory) + public: + static SolidDesignerCommandFactory& GetInstance(); + + std::vector> CreateCommands(); + }; +} \ No newline at end of file diff --git a/Designer/UI/SolidDesignerCommand/SolidDesignerCommandRegister.cpp b/Designer/UI/SolidDesignerCommand/SolidDesignerCommandRegister.cpp new file mode 100644 index 00000000..9d81b987 --- /dev/null +++ b/Designer/UI/SolidDesignerCommand/SolidDesignerCommandRegister.cpp @@ -0,0 +1,54 @@ +#include "SolidDesignerCommandRegister.h" +#include "AliceDiagnosticMacro.h" +#include "AliceISession.h" +#include "AliceICommandRouter.h" +#include "AliceICommandRegistry.h" +#include "SolidDesignerCommandFactory.h" +#include "SolidDesignerCommand.h" +#include "AliceCoreAppUtil.h" + +using namespace sdr; +using namespace alice; + +bool SolidDesignerCommandRegister::RegisterCommands() +{ + ISession* pSession = CoreAppUtil::GetCurrentSession(); + DIAG_RETURN_FALSE_IF_FALSE(pSession, "pSession is null", "hananiah", "2025.11.2"); + + const std::shared_ptr& pCmdRouter = pSession->GetCommandRouter(); + DIAG_RETURN_FALSE_IF_FALSE(pCmdRouter, "pCmdRouter is null", "hananiah", "2025.11.2"); + ICommandRegistry* pCmdRegistry = pCmdRouter->GetCommandRegistry(); + DIAG_RETURN_FALSE_IF_FALSE(pCmdRegistry, "pCmdRouter is null", "hananiah", "2025.11.2"); + + SolidDesignerCommandFactory& oCmdFactory = SolidDesignerCommandFactory::GetInstance(); + std::vector> vecCommands = oCmdFactory.CreateCommands(); + for (const auto& pCmd : vecCommands) + { + pCmdRegistry->RegisterCommand(pCmd); + } + + return true; +} + +bool SolidDesignerCommandRegister::UnRegisterCommands() +{ + ISession* pSession = CoreAppUtil::GetCurrentSession(); + DIAG_RETURN_FALSE_IF_FALSE(pSession, "pSession is null", "hananiah", "2025.11.2"); + + const std::shared_ptr& pCmdRouter = pSession->GetCommandRouter(); + DIAG_RETURN_FALSE_IF_FALSE(pCmdRouter, "pCmdRouter is null", "hananiah", "2025.11.2"); + + ICommandRegistry* pCmdRegistry = pCmdRouter->GetCommandRegistry(); + DIAG_RETURN_FALSE_IF_FALSE(pCmdRegistry, "pCmdRouter is null", "hananiah", "2025.11.2"); + + std::wstring strModuleId = GuidUtils::ToString(soliddesignercommand::MODULE_ID); + pCmdRegistry->UnRegisterCommandByModule(strModuleId); + return true; +} + +sdr::SolidDesignerCommandRegister& SolidDesignerCommandRegister::GetInstance() +{ + static SolidDesignerCommandRegister s_Instance; + return s_Instance; +} + diff --git a/Designer/UI/SolidDesignerCommand/SolidDesignerCommandRegister.h b/Designer/UI/SolidDesignerCommand/SolidDesignerCommandRegister.h new file mode 100644 index 00000000..6b153fa6 --- /dev/null +++ b/Designer/UI/SolidDesignerCommand/SolidDesignerCommandRegister.h @@ -0,0 +1,21 @@ +#pragma once + +#include "AliceObjectMacros.h" +#include "AliceIPluginComponent.h" +#include "AlicePluginExports.h" +#include "AliceMacroDefinitions.h" + +namespace alice { class ICommand; } + +namespace sdr +{ + class SolidDesignerCommandRegister final + { + ALICE_PRIVATE_CTOR_DTOR(SolidDesignerCommandRegister) + public: + static SolidDesignerCommandRegister& GetInstance(); + + bool RegisterCommands(); + bool UnRegisterCommands(); + }; +} \ No newline at end of file diff --git a/Designer/UI/SolidDesignerCommand/SolidDesignerCommands.h b/Designer/UI/SolidDesignerCommand/SolidDesignerCommands.h index cb37ba02..769ba31f 100644 --- a/Designer/UI/SolidDesignerCommand/SolidDesignerCommands.h +++ b/Designer/UI/SolidDesignerCommand/SolidDesignerCommands.h @@ -44,14 +44,22 @@ namespace sdr inline constexpr std::string_view ASM_REPLACECOMPONENT = "asm.replaceComponent"; // Replace Component inline constexpr std::string_view ASM_UNEXPLODE = "asm.unexplode"; // Collapse - // === Category: boolean === - inline constexpr std::string_view MODEL_BOOLEAN_INTERSECT = "model.boolean.intersect"; // Intersect - inline constexpr std::string_view MODEL_BOOLEAN_SUBTRACT = "model.boolean.subtract"; // Subtract - inline constexpr std::string_view MODEL_BOOLEAN_UNION = "model.boolean.union"; // Union - // === Category: curve === inline constexpr std::string_view CURVE_ARC = "curve.arc"; // Arc + inline constexpr std::string_view CURVE_ARC_3POINTTANGENTEND = "curve.arc.3PointTangentEnd"; // 3-Point / Tangent End + inline constexpr std::string_view CURVE_ARC_3TANGENT = "curve.arc.3Tangent"; // 3 Tangent + inline constexpr std::string_view CURVE_ARC_CENTERANDENDS = "curve.arc.centerAndEnds"; // Center and Ends + inline constexpr std::string_view CURVE_ARC_CONCENTRIC = "curve.arc.concentric"; // Concentric + inline constexpr std::string_view CURVE_ARC_CONIC = "curve.arc.conic"; // Conic + inline constexpr std::string_view CURVE_CENTERLINE = "curve.centerline"; // Centerline inline constexpr std::string_view CURVE_CIRCLE = "curve.circle"; // Circle + inline constexpr std::string_view CURVE_CIRCLE_3POINT = "curve.circle.3Point"; // 3 Point + inline constexpr std::string_view CURVE_CIRCLE_3TANGENT = "curve.circle.3Tangent"; // 3 Tangent + inline constexpr std::string_view CURVE_CIRCLE_CENTERANDPOINT = "curve.circle.centerAndPoint"; // Center and Point + inline constexpr std::string_view CURVE_CIRCLE_CONCENTRIC = "curve.circle.concentric"; // Concentric + inline constexpr std::string_view CURVE_ELLIPSE = "curve.ellipse"; // Ellipse + inline constexpr std::string_view CURVE_ELLIPSE_AXISANDENDS = "curve.ellipse.axisAndEnds"; // Axis and Ends Ellipse + inline constexpr std::string_view CURVE_ELLIPSE_CENTERANDAXIS = "curve.ellipse.centerAndAxis"; // Center and Axis Ellipse inline constexpr std::string_view CURVE_EXTEND = "curve.extend"; // Extend Curve inline constexpr std::string_view CURVE_FILLET = "curve.fillet"; // Curve Fillet inline constexpr std::string_view CURVE_FITSPLINE = "curve.fitSpline"; // Fit Spline @@ -60,15 +68,25 @@ namespace sdr inline constexpr std::string_view CURVE_OFFSET = "curve.offset"; // Offset Curve inline constexpr std::string_view CURVE_POINT = "curve.point"; // Point inline constexpr std::string_view CURVE_RECTANGLE = "curve.rectangle"; // Rectangle + inline constexpr std::string_view CURVE_RECTANGLE_CENTER = "curve.rectangle.center"; // Center Rectangle + inline constexpr std::string_view CURVE_RECTANGLE_CORNER = "curve.rectangle.corner"; // Corner Rectangle + inline constexpr std::string_view CURVE_RECTANGLE_PARALLELOGRAM = "curve.rectangle.parallelogram"; // Parallelogram + inline constexpr std::string_view CURVE_RECTANGLE_SLANTED = "curve.rectangle.slanted"; // Slanted Rectangle inline constexpr std::string_view CURVE_SPLINETHROUGH = "curve.splineThrough"; // Spline Through Points inline constexpr std::string_view CURVE_STUDIOSPLINE = "curve.studioSpline"; // Studio Spline inline constexpr std::string_view CURVE_TRIM = "curve.trim"; // Trim Curve // === Category: datum === - inline constexpr std::string_view DATUM_AXIS = "datum.axis"; // Datum Axis + inline constexpr std::string_view DATUM_AXIS = "datum.axis"; // Axis inline constexpr std::string_view DATUM_CS = "datum.cs"; // Coordinate System - inline constexpr std::string_view DATUM_PLANE = "datum.plane"; // Datum Plane + inline constexpr std::string_view DATUM_CURVE = "datum.curve"; // Curve + inline constexpr std::string_view DATUM_DEFAULTCOORDINATESYSTEM = "datum.defaultCoordinateSystem"; // Default Coordinate System + inline constexpr std::string_view DATUM_GRAPH = "datum.graph"; // Graph + inline constexpr std::string_view DATUM_OFFSETPLANES = "datum.offsetPlanes"; // Offset Planes + inline constexpr std::string_view DATUM_PLANE = "datum.plane"; // Plane inline constexpr std::string_view DATUM_POINT = "datum.point"; // Point + inline constexpr std::string_view DATUM_REFERENCE = "datum.reference"; // Reference + inline constexpr std::string_view DATUM_RIBBON = "datum.ribbon"; // Ribbon // === Category: display === inline constexpr std::string_view DISPLAY_HIDDENLINE = "display.hiddenLine"; // Hidden Line @@ -88,10 +106,48 @@ namespace sdr inline constexpr std::string_view EDIT_SELECTALL = "edit.selectAll"; // Select All inline constexpr std::string_view EDIT_UNDO = "edit.undo"; // Undo + // === Category: editing === + inline constexpr std::string_view MODEL_EXTEND = "model.extend"; // Extend + inline constexpr std::string_view MODEL_INTERSECT = "model.intersect"; // Intersect + inline constexpr std::string_view MODEL_MERGE = "model.merge"; // Merge + inline constexpr std::string_view MODEL_MIRROR = "model.mirror"; // Mirror + inline constexpr std::string_view MODEL_OFFSET = "model.offset"; // Offset + inline constexpr std::string_view MODEL_PROJECT = "model.project"; // Project + inline constexpr std::string_view MODEL_PROJECT_COLLAPSE = "model.project.collapse"; // Collapse + inline constexpr std::string_view MODEL_PROJECT_FLIPNORMAL = "model.project.flipNormal"; // Flip Normal + inline constexpr std::string_view MODEL_PROJECT_REMOVE = "model.project.remove"; // Remove + inline constexpr std::string_view MODEL_PROJECT_SPLITSURFACE = "model.project.splitSurface"; // Split Surface + inline constexpr std::string_view MODEL_PROJECT_WRAP = "model.project.wrap"; // Wrap + inline constexpr std::string_view MODEL_SOLIDIFY = "model.solidify"; // Solidify + inline constexpr std::string_view MODEL_THICKEN = "model.thicken"; // Thicken + inline constexpr std::string_view MODEL_TRIM = "model.trim"; // Trim + + // === Category: engineering === + inline constexpr std::string_view MODEL_AREA_DESIGNATED = "model.area.designated"; // Designated Area + inline constexpr std::string_view MODEL_AREA_ECAD = "model.area.ecad"; // ECAD Area + inline constexpr std::string_view MODEL_BEND_SPIRAL = "model.bend.spiral"; // Spiral Bend + inline constexpr std::string_view MODEL_BEND_TOROIDAL = "model.bend.toroidal"; // Toroidal Bend + inline constexpr std::string_view MODEL_CHAMFER = "model.chamfer"; // Chamfer + inline constexpr std::string_view MODEL_CHAMFER_CORNER = "model.chamfer.corner"; // Corner Chamfer + inline constexpr std::string_view MODEL_CHAMFER_EDGE = "model.chamfer.edge"; // Edge Chamfer + inline constexpr std::string_view MODEL_COSMETIC_GROOVE = "model.cosmetic.groove"; // Cosmetic Groove + inline constexpr std::string_view MODEL_COSMETIC_SKETCH = "model.cosmetic.sketch"; // Cosmetic Sketch + inline constexpr std::string_view MODEL_COSMETIC_THREAD = "model.cosmetic.thread"; // Cosmetic Thread + inline constexpr std::string_view MODEL_DRAFT = "model.draft"; // Draft + inline constexpr std::string_view MODEL_DRAFT_VARIABLEPULLDIRECTION = "model.draft.variablePullDirection"; // Variable Pull Direction Draft + inline constexpr std::string_view MODEL_HOLE = "model.hole"; // Hole + inline constexpr std::string_view MODEL_LATTICE = "model.lattice"; // Lattice + inline constexpr std::string_view MODEL_RIB = "model.rib"; // Rib + inline constexpr std::string_view MODEL_RIB_PROFILE = "model.rib.profile"; // Profile Rib + inline constexpr std::string_view MODEL_RIB_TRAJECTORY = "model.rib.trajectory"; // Trajectory Rib + inline constexpr std::string_view MODEL_ROUND = "model.round"; // Round + inline constexpr std::string_view MODEL_ROUND_AUTO = "model.round.auto"; // Auto Round + inline constexpr std::string_view MODEL_SHELL = "model.shell"; // Shell + // === Category: feature === inline constexpr std::string_view MODEL_FEATURE_DELETE = "model.feature.delete"; // Delete Feature - inline constexpr std::string_view MODEL_FEATURE_SUPPRESS = "model.feature.suppress"; // Suppress Feature - inline constexpr std::string_view MODEL_FEATURE_UNSUPPRESS = "model.feature.unsuppress"; // Unsuppress Feature + inline constexpr std::string_view MODEL_FEATURE_SUPPRESS = "model.feature.suppress"; // Suppress + inline constexpr std::string_view MODEL_FEATURE_UNSUPPRESS = "model.feature.unsuppress"; // Resume // === Category: file === inline constexpr std::string_view FILE_CLOSE = "file.close"; // Close @@ -119,21 +175,48 @@ namespace sdr inline constexpr std::string_view MEASURE_RADIUS = "measure.radius"; // Radius inline constexpr std::string_view MEASURE_SECTION = "measure.section"; // Section Measurement - // === Category: modeling === - inline constexpr std::string_view MODEL_CHAMFER = "model.chamfer"; // Chamfer - inline constexpr std::string_view MODEL_DRAFT = "model.draft"; // Draft - inline constexpr std::string_view MODEL_EXTRUDE = "model.extrude"; // Extrude - inline constexpr std::string_view MODEL_FILLET = "model.fillet"; // Fillet - inline constexpr std::string_view MODEL_HOLE = "model.hole"; // Hole - inline constexpr std::string_view MODEL_REVOLVE = "model.revolve"; // Revolve - inline constexpr std::string_view MODEL_SHELL = "model.shell"; // Shell - inline constexpr std::string_view MODEL_SLOT = "model.slot"; // Slot + // === Category: model.getData === + inline constexpr std::string_view MODEL_GETDATA_COPYFROM = "model.getData.copyFrom"; // Copy From + inline constexpr std::string_view MODEL_GETDATA_COPYGEOMETRY = "model.getData.copyGeometry"; // Copy Geometry + inline constexpr std::string_view MODEL_GETDATA_IMPORT = "model.getData.import"; // Import + inline constexpr std::string_view MODEL_GETDATA_INDEPENDENTGEOMETRY = "model.getData.independentGeometry"; // Independent Geometry + inline constexpr std::string_view MODEL_GETDATA_LAYOUTFEATURE = "model.getData.layoutFeature"; // Layout Feature + inline constexpr std::string_view MODEL_GETDATA_MERGEINHERITANCE = "model.getData.mergeInheritance"; // Merge/Inheritance + inline constexpr std::string_view MODEL_GETDATA_SHRINKWRAP = "model.getData.shrinkwrap"; // Shrinkwrap + inline constexpr std::string_view MODEL_GETDATA_USERDEFINEDFEATURE = "model.getData.userDefinedFeature"; // User-Defined Feature + + // === Category: model.ops === + inline constexpr std::string_view MODEL_DELETE = "model.delete"; // Delete + inline constexpr std::string_view MODEL_REGENERATE = "model.regenerate"; // Regenerate + + // === Category: modelIntent === + inline constexpr std::string_view MODELINTENT_COMPONENTINTERFACE = "modelIntent.componentInterface"; // Component Interface + inline constexpr std::string_view MODELINTENT_FAMILYTABLE = "modelIntent.familyTable"; // Family Table + inline constexpr std::string_view MODELINTENT_PARAMETERS = "modelIntent.parameters"; // Parameters + inline constexpr std::string_view MODELINTENT_PUBLISHGEOMETRY = "modelIntent.publishGeometry"; // Publish Geometry + inline constexpr std::string_view MODELINTENT_SWITCHDIMENSIONS = "modelIntent.switchDimensions"; // Switch Dimensions + + // === Category: pattern === + inline constexpr std::string_view MODEL_PATTERN = "model.pattern"; // Pattern + inline constexpr std::string_view MODEL_PATTERN_GEOMETRY = "model.pattern.geometry"; // Geometry Pattern + inline constexpr std::string_view MODEL_PATTERN_TABLE = "model.pattern.table"; // Pattern Table // === Category: selection === inline constexpr std::string_view SELECT_FILTER = "select.filter"; // Selection Filter inline constexpr std::string_view SELECT_LASSO = "select.lasso"; // Lasso Select inline constexpr std::string_view SELECT_RECTANGLE = "select.rectangle"; // Rectangle Select inline constexpr std::string_view SELECT_SINGLE = "select.single"; // Single Select + inline constexpr std::string_view SKETCH_SELECT = "sketch.select"; // Select + + // === Category: shapes === + inline constexpr std::string_view MODEL_BLEND = "model.blend"; // Blend + inline constexpr std::string_view MODEL_BLEND_ROTATIONAL = "model.blend.rotational"; // Rotational Blend + inline constexpr std::string_view MODEL_EXTRUDE = "model.extrude"; // Extrude + inline constexpr std::string_view MODEL_REVOLVE = "model.revolve"; // Revolve + inline constexpr std::string_view MODEL_SWEEP = "model.sweep"; // Sweep + inline constexpr std::string_view MODEL_SWEEP_HELICAL = "model.sweep.helical"; // Helical Sweep + inline constexpr std::string_view MODEL_SWEEP_VOLUMEHELICAL = "model.sweep.volumeHelical"; // Volume Helical Sweep + inline constexpr std::string_view MODEL_SWEEPBLEND = "model.sweepBlend"; // Sweep Blend // === Category: sheet === inline constexpr std::string_view SHEET_BASEFLANGE = "sheet.baseFlange"; // Base Flange @@ -153,16 +236,40 @@ namespace sdr inline constexpr std::string_view SHEET_UNBEND = "sheet.unbend"; // Unbend // === Category: sketch === + inline constexpr std::string_view SKETCH_DISPLAY_CONSTRAINTS = "sketch.display.constraints"; // Constraints Display + inline constexpr std::string_view SKETCH_DISPLAY_DIMENSIONS = "sketch.display.dimensions"; // Dimensions Display + inline constexpr std::string_view SKETCH_DISPLAY_GRID = "sketch.display.grid"; // Grid Display + inline constexpr std::string_view SKETCH_DISPLAY_VERTICES = "sketch.display.vertices"; // Vertices Display inline constexpr std::string_view SKETCH_EDIT = "sketch.edit"; // Edit Sketch + inline constexpr std::string_view SKETCH_FILESYSTEM = "sketch.fileSystem"; // File System + inline constexpr std::string_view SKETCH_GRIDSETTINGS = "sketch.gridSettings"; // Grid Settings + inline constexpr std::string_view SKETCH_INSPECT_ENTITY = "sketch.inspect.entity"; // Entity + inline constexpr std::string_view SKETCH_INSPECT_FEATUREREQUIREMENTS = "sketch.inspect.featureRequirements"; // Feature Requirements + inline constexpr std::string_view SKETCH_INSPECT_INTERSECTIONPOINT = "sketch.inspect.intersectionPoint"; // Intersection Point + inline constexpr std::string_view SKETCH_INSPECT_TANGENCYPOINT = "sketch.inspect.tangencyPoint"; // Tangency Point + inline constexpr std::string_view SKETCH_LINESTYLE_CLEAR = "sketch.lineStyle.clear"; // Clear Line Style + inline constexpr std::string_view SKETCH_LINESTYLE_SET = "sketch.lineStyle.set"; // Set Line Style inline constexpr std::string_view SKETCH_MIRROR = "sketch.mirror"; // Mirror Sketch inline constexpr std::string_view SKETCH_NEW = "sketch.new"; // Sketch + inline constexpr std::string_view SKETCH_PROPERTIES = "sketch.properties"; // Properties + inline constexpr std::string_view SKETCH_REFERENCES = "sketch.references"; // References inline constexpr std::string_view SKETCH_REUSE = "sketch.reuse"; // Reuse Sketch + inline constexpr std::string_view SKETCH_SECTION_FLIPSECTIONORIENTATION = "sketch.section.flipSectionOrientation"; // Flip section orientation + inline constexpr std::string_view SKETCH_SECTION_FLIPSKETCHINGPLANE = "sketch.section.flipSketchingPlane"; // Flip sketching plane + inline constexpr std::string_view SKETCH_SECTION_RESTORESECTIONORIENTATION = "sketch.section.restoreSectionOrientation"; // Restore section orientation + inline constexpr std::string_view SKETCH_SECTION_SETHORIZONTALREFERENCE = "sketch.section.setHorizontalReference"; // Set horizontal reference + inline constexpr std::string_view SKETCH_SECTION_SETVERTICALREFERENCE = "sketch.section.setVerticalReference"; // Set vertical reference + inline constexpr std::string_view SKETCH_SETUP = "sketch.setup"; // Sketch Setup + inline constexpr std::string_view SKETCH_TEXT = "sketch.text"; // Text + inline constexpr std::string_view SKETCH_UNDERCONSTRAINEDMODE = "sketch.underConstrainedMode"; // Under-Constrained Mode + inline constexpr std::string_view SKETCH_VIEW = "sketch.view"; // Sketch View // === Category: sketch.constraint === inline constexpr std::string_view SKETCH_CONSTRAINT_COINCIDENT = "sketch.constraint.coincident"; // Coincident inline constexpr std::string_view SKETCH_CONSTRAINT_EQUAL = "sketch.constraint.equal"; // Equal inline constexpr std::string_view SKETCH_CONSTRAINT_FIX = "sketch.constraint.fix"; // Fix inline constexpr std::string_view SKETCH_CONSTRAINT_HORIZONTAL = "sketch.constraint.horizontal"; // Horizontal + inline constexpr std::string_view SKETCH_CONSTRAINT_MIDPOINT = "sketch.constraint.midPoint"; // Mid-point inline constexpr std::string_view SKETCH_CONSTRAINT_PARALLEL = "sketch.constraint.parallel"; // Parallel inline constexpr std::string_view SKETCH_CONSTRAINT_PERPENDICULAR = "sketch.constraint.perpendicular"; // Perpendicular inline constexpr std::string_view SKETCH_CONSTRAINT_SYMMETRIC = "sketch.constraint.symmetric"; // Symmetric @@ -171,25 +278,59 @@ namespace sdr // === Category: sketch.dim === inline constexpr std::string_view SKETCH_DIM_ANGLE = "sketch.dim.angle"; // Angular Dimension + inline constexpr std::string_view SKETCH_DIM_BASELINE = "sketch.dim.baseline"; // Baseline inline constexpr std::string_view SKETCH_DIM_DIAMETER = "sketch.dim.diameter"; // Diameter Dimension + inline constexpr std::string_view SKETCH_DIM_DIMENSION = "sketch.dim.dimension"; // Dimension inline constexpr std::string_view SKETCH_DIM_GENERAL = "sketch.dim.general"; // Smart Dimension inline constexpr std::string_view SKETCH_DIM_HORIZONTAL = "sketch.dim.horizontal"; // Horizontal Dimension + inline constexpr std::string_view SKETCH_DIM_PERIMETER = "sketch.dim.perimeter"; // Perimeter inline constexpr std::string_view SKETCH_DIM_RADIUS = "sketch.dim.radius"; // Radius Dimension + inline constexpr std::string_view SKETCH_DIM_REFERENCE = "sketch.dim.reference"; // Reference inline constexpr std::string_view SKETCH_DIM_VERTICAL = "sketch.dim.vertical"; // Vertical Dimension // === Category: sketch.modify === + inline constexpr std::string_view SKETCH_FILLET_CIRCULAR = "sketch.fillet.circular"; // Circular + inline constexpr std::string_view SKETCH_FILLET_CIRCULARTRIM = "sketch.fillet.circularTrim"; // Circular Trim + inline constexpr std::string_view SKETCH_FILLET_ELLIPTICAL = "sketch.fillet.elliptical"; // Elliptical + inline constexpr std::string_view SKETCH_FILLET_ELLIPTICALTRIM = "sketch.fillet.ellipticalTrim"; // Elliptical Trim + inline constexpr std::string_view SKETCH_MODIFY_CHAMFER = "sketch.modify.chamfer"; // Chamfer + inline constexpr std::string_view SKETCH_MODIFY_CHAMFERTRIM = "sketch.modify.chamferTrim"; // Chamfer Trim + inline constexpr std::string_view SKETCH_MODIFY_CORNER = "sketch.modify.corner"; // Corner + inline constexpr std::string_view SKETCH_MODIFY_DELETESEGMENT = "sketch.modify.deleteSegment"; // Delete Segment + inline constexpr std::string_view SKETCH_MODIFY_DIVIDE = "sketch.modify.divide"; // Divide inline constexpr std::string_view SKETCH_MODIFY_EXTEND = "sketch.modify.extend"; // Extend inline constexpr std::string_view SKETCH_MODIFY_FILLET = "sketch.modify.fillet"; // Fillet inline constexpr std::string_view SKETCH_MODIFY_MIRROR = "sketch.modify.mirror"; // Mirror + inline constexpr std::string_view SKETCH_MODIFY_MODIFY = "sketch.modify.modify"; // Modify inline constexpr std::string_view SKETCH_MODIFY_OFFSET = "sketch.modify.offset"; // Offset inline constexpr std::string_view SKETCH_MODIFY_PATTERN = "sketch.modify.pattern"; // Pattern + inline constexpr std::string_view SKETCH_MODIFY_ROTATERESIZE = "sketch.modify.rotateResize"; // Rotate Resize inline constexpr std::string_view SKETCH_MODIFY_TRIM = "sketch.modify.trim"; // Trim + inline constexpr std::string_view SKETCH_OPS_CONSTRUCTION = "sketch.ops.construction"; // Construction + inline constexpr std::string_view SKETCH_OPS_CONVERTTO = "sketch.ops.convertTo"; // Convert To + inline constexpr std::string_view SKETCH_OPS_DELETE = "sketch.ops.delete"; // Delete + inline constexpr std::string_view SKETCH_OPS_REPLACE = "sketch.ops.replace"; // Replace + inline constexpr std::string_view SKETCH_OPS_TOGGLELOCK = "sketch.ops.toggleLock"; // Toggle Lock + inline constexpr std::string_view SKETCH_PROJECT = "sketch.project"; // Project + inline constexpr std::string_view SKETCH_THICKEN = "sketch.thicken"; // Thicken + + // === Category: surface === + inline constexpr std::string_view SURFACE_BOUNDARYBLEND = "surface.boundaryBlend"; // Boundary Blend + inline constexpr std::string_view SURFACE_FILL = "surface.fill"; // Fill + inline constexpr std::string_view SURFACE_FREESTYLE = "surface.freestyle"; // Freestyle + inline constexpr std::string_view SURFACE_STYLE = "surface.style"; // Style + inline constexpr std::string_view SURFACE_STYLE_BLENDTANGENT = "surface.style.blendTangent"; // Blend Tangent to Surfaces + inline constexpr std::string_view SURFACE_STYLE_FLATTENQUILT = "surface.style.flattenQuilt"; // Flatten Quilt + inline constexpr std::string_view SURFACE_STYLE_FLATTENQUILTDEFORMATION = "surface.style.flattenQuiltDeformation"; // Flatten-Quilt Deformation + inline constexpr std::string_view SURFACE_STYLE_FOREIGNSURFACE = "surface.style.foreignSurface"; // Foreign Surface + inline constexpr std::string_view SURFACE_STYLE_RESTYLE = "surface.style.restyle"; // Restyle + inline constexpr std::string_view SURFACE_STYLE_VERTEXROUND = "surface.style.vertexRound"; // Vertex Round // === Category: synchronous === inline constexpr std::string_view SMOVE_FACE = "smove.face"; // Move Face inline constexpr std::string_view SYNCHRONOUS_DELETEFACE = "synchronous.deleteFace"; // Delete Face inline constexpr std::string_view SYNCHRONOUS_OFFSETREGION = "synchronous.offsetRegion"; // Offset Region - inline constexpr std::string_view SYNCHRONOUS_PULL = "synchronous.pull"; // Pull Face + inline constexpr std::string_view SYNCHRONOUS_PULL = "synchronous.pull"; // Pull // === Category: tools === inline constexpr std::string_view TOOLS_COMMANDLINE = "tools.commandLine"; // Command Line @@ -200,6 +341,8 @@ namespace sdr inline constexpr std::string_view TOOLS_PYTHONCONSOLE = "tools.pythonConsole"; // Python Console // === Category: ui === + inline constexpr std::string_view SKETCH_CANCEL = "sketch.cancel"; // Cancel + inline constexpr std::string_view SKETCH_OK = "sketch.ok"; // OK inline constexpr std::string_view UI_RESTORELAYOUT = "ui.restoreLayout"; // Restore Layout inline constexpr std::string_view UI_SAVELAYOUT = "ui.saveLayout"; // Save Layout inline constexpr std::string_view UI_TOGGLEMODE = "ui.toggleMode"; // Toggle Ribbon / Classic From ba825a33f8889eaf8318bcf5a5ee86092396cd82 Mon Sep 17 00:00:00 2001 From: Hubery Hsu Date: Wed, 24 Dec 2025 15:20:26 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E3=80=90AL-75=E3=80=91sync=20the=20alice?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Alice | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Alice b/Alice index bdba4c52..91eff9b3 160000 --- a/Alice +++ b/Alice @@ -1 +1 @@ -Subproject commit bdba4c526da2b8e9d0a39b1ff8d182eaa4ede3a9 +Subproject commit 91eff9b3e6f4b864af87a7ca6ae192bce2cf41a4