From 34a2fb4e1f50e744228a7eb2182a45fb3b34f969 Mon Sep 17 00:00:00 2001 From: mzh Date: Tue, 12 Nov 2024 14:28:39 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81ui=E7=95=8C=E9=9D=A2=E4=B8=8A?= =?UTF-8?q?=EF=BC=8C=E8=BE=B9=E7=95=8C=E6=9D=A1=E4=BB=B6-=E6=80=BB?= =?UTF-8?q?=E5=8E=8B=E5=85=A5=E5=8F=A3=EF=BC=8C=E6=96=B9=E5=90=91=E7=9F=A2?= =?UTF-8?q?=E9=87=8F=E6=94=B9=E6=88=90=E7=9F=A2=E9=87=8F=202=E3=80=81ui?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E4=B8=8A=EF=BC=8C=E8=BE=B9=E7=95=8C=E6=9D=A1?= =?UTF-8?q?=E4=BB=B6-=E5=91=A8=E6=9C=9F=EF=BC=9A=E5=B9=B3=E7=A7=BB?= =?UTF-8?q?=E8=B7=9D=E7=A6=BB=20=E8=A6=81=E6=94=B9=E6=88=90=E7=9F=A2?= =?UTF-8?q?=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ructDataSolverBoundaryConditionManager.cpp | 167 +++++++++++++++--- ...StructDataSolverBoundaryConditionManager.h | 10 +- 2 files changed, 148 insertions(+), 29 deletions(-) diff --git a/CFDStruct/CFDStructDataManager/CFDStructDataSolverBoundaryConditionManager.cpp b/CFDStruct/CFDStructDataManager/CFDStructDataSolverBoundaryConditionManager.cpp index ffbf269..ceec5d6 100644 --- a/CFDStruct/CFDStructDataManager/CFDStructDataSolverBoundaryConditionManager.cpp +++ b/CFDStruct/CFDStructDataManager/CFDStructDataSolverBoundaryConditionManager.cpp @@ -434,13 +434,37 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genPressureInletModeSupe {"name", tr("Surface Normal")}, }), }), - new CUIConfig({ - {"type", "LineEdit"}, // 方向矢量 - {"name", tr("Direction Vector(r,theta,z)")}, - {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING}, - {"value_origin", QVA_GLOBAL(&m_DirectionVector)}, + // new CUIConfig({ + // {"type", "LineEdit"}, // 方向矢量 + // {"name", tr("Direction Vector(r,theta,z)")}, + // {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING}, + // {"value_origin", QVA_GLOBAL(&m_DirectionVector)}, + // }, + // {}), + new CUIConfig({ + {"type", "GroupBox"}, // 方向矢量 + {"name", tr("Direction Vector")}, }, - {}), + { + new CUIConfig({ + {"type", "LineEdit"}, + {"name", "X:"}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, + {"value_origin", QVA_GLOBAL(&m_DirectionVectorX)}, + }), + new CUIConfig({ + {"type", "LineEdit"}, + {"name", "Y:"}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, + {"value_origin", QVA_GLOBAL(&m_DirectionVectorY)}, + }), + new CUIConfig({ + {"type", "LineEdit"}, + {"name", "Z:"}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, + {"value_origin", QVA_GLOBAL(&m_DirectionVectorZ)}, + }), + }), }), groupbox, @@ -630,13 +654,37 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genPressureInletModeSupe {"name", tr("Surface Normal")}, }), }), - new CUIConfig({ - {"type", "LineEdit"}, // 方向矢量 - {"name", tr("Direction Vector(x,y,z)")}, - {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING}, - {"value_origin", QVA_GLOBAL(&m_DirectionVector)}, + // new CUIConfig({ + // {"type", "LineEdit"}, // 方向矢量 + // {"name", tr("Direction Vector(x,y,z)")}, + // {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING}, + // {"value_origin", QVA_GLOBAL(&m_DirectionVector)}, + // }, + // {}), + new CUIConfig({ + {"type", "GroupBox"}, // 方向矢量 + {"name", tr("Direction Vector")}, }, - {}), + { + new CUIConfig({ + {"type", "LineEdit"}, + {"name", "X:"}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, + {"value_origin", QVA_GLOBAL(&m_DirectionVectorX)}, + }), + new CUIConfig({ + {"type", "LineEdit"}, + {"name", "Y:"}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, + {"value_origin", QVA_GLOBAL(&m_DirectionVectorY)}, + }), + new CUIConfig({ + {"type", "LineEdit"}, + {"name", "Z:"}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, + {"value_origin", QVA_GLOBAL(&m_DirectionVectorZ)}, + }), + }), }), groupbox, @@ -1010,13 +1058,37 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genPressureInletModeSubs {"name", tr("Surface Normal")}, }), }), + // new CUIConfig({ + // {"type", "LineEdit"}, // 方向矢量 + // {"name", tr("Direction Vector(r,theta,z)")}, + // {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING}, + // {"value_origin", QVA_GLOBAL(&m_DirectionVector)}, + // }, + // {}), new CUIConfig({ - {"type", "LineEdit"}, // 方向矢量 - {"name", tr("Direction Vector(r,theta,z)")}, - {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING}, - {"value_origin", QVA_GLOBAL(&m_DirectionVector)}, + {"type", "GroupBox"}, + {"name", tr("Direction Vector")}, }, - {}), + { + new CUIConfig({ + {"type", "LineEdit"}, + {"name", "X:"}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, + {"value_origin", QVA_GLOBAL(&m_DirectionVectorX)}, + }), + new CUIConfig({ + {"type", "LineEdit"}, + {"name", "Y:"}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, + {"value_origin", QVA_GLOBAL(&m_DirectionVectorY)}, + }), + new CUIConfig({ + {"type", "LineEdit"}, + {"name", "Z:"}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, + {"value_origin", QVA_GLOBAL(&m_DirectionVectorZ)}, + }), + }), }), groupbox, @@ -1201,13 +1273,37 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genPressureInletModeSubs {"name", tr("Surface Normal")}, }), }), - new CUIConfig({ - {"type", "LineEdit"}, // 方向矢量 - {"name", tr("Direction Vector(x,y,z)")}, - {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING}, - {"value_origin", QVA_GLOBAL(&m_DirectionVector)}, + // new CUIConfig({ + // {"type", "LineEdit"}, // 方向矢量 + // {"name", tr("Direction Vector(x,y,z)")}, + // {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING}, + // {"value_origin", QVA_GLOBAL(&m_DirectionVector)}, + // }, + // {}), + new CUIConfig({ + {"type", "GroupBox"}, // 方向矢量 + {"name", tr("Direction Vector")}, }, - {}), + { + new CUIConfig({ + {"type", "LineEdit"}, + {"name", "X:"}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, + {"value_origin", QVA_GLOBAL(&m_DirectionVectorX)}, + }), + new CUIConfig({ + {"type", "LineEdit"}, + {"name", "Y:"}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, + {"value_origin", QVA_GLOBAL(&m_DirectionVectorY)}, + }), + new CUIConfig({ + {"type", "LineEdit"}, + {"name", "Z:"}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, + {"value_origin", QVA_GLOBAL(&m_DirectionVectorZ)}, + }), + }), }), groupbox, @@ -1816,12 +1912,29 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genCycleTranslationUICon }), }), new CUIConfig({ - {"type", "LineEdit"}, // 平移距离 + {"type", "GroupBox"}, // 平移距离 {"name", tr("TranslationDistance")}, - {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING}, - {"value_origin", QVA_GLOBAL(&m_TranslationDistance)}, }, - {}), + { + new CUIConfig({ + {"type", "LineEdit"}, + {"name", "X:"}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, + {"value_origin", QVA_GLOBAL(&m_TranslationDistanceX)}, + }), + new CUIConfig({ + {"type", "LineEdit"}, + {"name", "Y:"}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, + {"value_origin", QVA_GLOBAL(&m_TranslationDistanceY)}, + }), + new CUIConfig({ + {"type", "LineEdit"}, + {"name", "Z:"}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, + {"value_origin", QVA_GLOBAL(&m_TranslationDistanceZ)}, + }), + }), }); return nullptr; } diff --git a/CFDStruct/CFDStructDataManager/CFDStructDataSolverBoundaryConditionManager.h b/CFDStruct/CFDStructDataManager/CFDStructDataSolverBoundaryConditionManager.h index a43f47b..a691cdb 100644 --- a/CFDStruct/CFDStructDataManager/CFDStructDataSolverBoundaryConditionManager.h +++ b/CFDStruct/CFDStructDataManager/CFDStructDataSolverBoundaryConditionManager.h @@ -121,7 +121,10 @@ class CFDSTRUCTDATAMANAGER_EXPORT CFDStructDataSolverBoundaryConditionManager : int m_PeriodicType = 0; // Periodic Type // 平移距离 - QString m_TranslationDistance; // Translation Distance + // QString m_TranslationDistance; // Translation Distance + double m_TranslationDistanceX = 0; + double m_TranslationDistanceY = 0; + double m_TranslationDistanceZ = 0; // 旋转中心 QString m_RotationCenter; // Rotation Center @@ -163,7 +166,10 @@ class CFDSTRUCTDATAMANAGER_EXPORT CFDStructDataSolverBoundaryConditionManager : int m_VelocityDirectionType = 0; // 方向矢量 - QString m_DirectionVector = ""; + // QString m_DirectionVector = ""; + double m_DirectionVectorX = 0; + double m_DirectionVectorY = 0; + double m_DirectionVectorZ = 0; // 边界类型,选中总压入口时,出现的子选项,可选声速、亚声速 int m_BoundaryType_sub = 0;