From: Christophe Bourcier Date: Wed, 5 Jun 2024 15:17:30 +0000 (+0200) Subject: Add Use library to the advanced options in the GUI X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a0e09a3981f57e988c09206453b1ad4a8e960121;p=plugins%2Fhybridplugin.git Add Use library to the advanced options in the GUI --- diff --git a/src/GUI/HYBRIDPluginGUI_AdvWidget_QTD.ui b/src/GUI/HYBRIDPluginGUI_AdvWidget_QTD.ui index cb95c47..c47b02a 100644 --- a/src/GUI/HYBRIDPluginGUI_AdvWidget_QTD.ui +++ b/src/GUI/HYBRIDPluginGUI_AdvWidget_QTD.ui @@ -143,6 +143,16 @@ + + + + HYBRID_USE_LIBRARY + + + false + + + diff --git a/src/GUI/HYBRIDPluginGUI_HypothesisCreator.cxx b/src/GUI/HYBRIDPluginGUI_HypothesisCreator.cxx index da329c9..0932368 100644 --- a/src/GUI/HYBRIDPluginGUI_HypothesisCreator.cxx +++ b/src/GUI/HYBRIDPluginGUI_HypothesisCreator.cxx @@ -1459,6 +1459,7 @@ void HYBRIDPluginGUI_HypothesisCreator::retrieveParams() const myAdvWidget->verboseLevelSpin ->setValue ( data.myVerboseLevel ); myAdvWidget->logInFileCheck ->setChecked( !data.myLogInStandardOutput ); myAdvWidget->removeLogOnSuccessCheck ->setChecked( data.myRemoveLogOnSuccess ); + myAdvWidget->useLibraryCheck ->setChecked( data.myUseLib ); if ( myOptions.operator->() ) { for ( int i = 0, nb = myOptions->length(); i < nb; ++i ) @@ -1641,6 +1642,7 @@ bool HYBRIDPluginGUI_HypothesisCreator::readParamsFromHypo( HYBRIDHypothesisData h_data.myVerboseLevel = h->GetVerboseLevel(); h_data.myLogInStandardOutput = h->GetStandardOutputLog(); h_data.myRemoveLogOnSuccess = h->GetRemoveLogOnSuccess(); + h_data.myUseLib = h->GetToUseLibrary(); HYBRIDPluginGUI_HypothesisCreator* that = (HYBRIDPluginGUI_HypothesisCreator*)this; that->myOptions = h->GetOptionValues(); @@ -1736,6 +1738,8 @@ bool HYBRIDPluginGUI_HypothesisCreator::storeParamsToHypo( const HYBRIDHypothesi h->SetStandardOutputLog ( h_data.myLogInStandardOutput ); if ( h->GetRemoveLogOnSuccess() != h_data.myRemoveLogOnSuccess ) h->SetRemoveLogOnSuccess ( h_data.myRemoveLogOnSuccess ); + if ( h->GetToUseLibrary() != h_data.myUseLib ) + h->SetToUseLibrary ( h_data.myUseLib ); // Enforced vertices //int nbVertex = (int) h_data.myEnforcedVertices.size(); @@ -1834,6 +1838,7 @@ bool HYBRIDPluginGUI_HypothesisCreator::readParamsFromWidgets( HYBRIDHypothesisD h_data.myVerboseLevel = myAdvWidget->verboseLevelSpin->value(); h_data.myLogInStandardOutput = !myAdvWidget->logInFileCheck->isChecked(); h_data.myRemoveLogOnSuccess = myAdvWidget->removeLogOnSuccessCheck->isChecked(); + h_data.myUseLib = myAdvWidget->useLibraryCheck->isChecked(); // Enforced vertices h_data.myEnforcedVertices.clear(); diff --git a/src/GUI/HYBRIDPluginGUI_HypothesisCreator.h b/src/GUI/HYBRIDPluginGUI_HypothesisCreator.h index b9a2fe4..0e411a1 100644 --- a/src/GUI/HYBRIDPluginGUI_HypothesisCreator.h +++ b/src/GUI/HYBRIDPluginGUI_HypothesisCreator.h @@ -144,7 +144,7 @@ typedef std::set< TEnfMesh*, CompareEnfMeshes > TEnfMeshList; typedef struct { bool myHeightIsRelative, myImprinting, mySnapping, myLayersOnAllWrap, - myKeepFiles, myLogInStandardOutput, myRemoveLogOnSuccess; + myKeepFiles, myLogInStandardOutput, myRemoveLogOnSuccess, myUseLib; int myOptimizationLevel, myCollisionMode, myBoundaryLayersGrowth, myElementGeneration; QString myName,myWorkingDir; double myGradation; diff --git a/src/GUI/HYBRIDPlugin_msg_en.ts b/src/GUI/HYBRIDPlugin_msg_en.ts index 8b031fa..2a01171 100644 --- a/src/GUI/HYBRIDPlugin_msg_en.ts +++ b/src/GUI/HYBRIDPlugin_msg_en.ts @@ -178,6 +178,10 @@ downward means inward and upward means outward ... KEEP_WORKING_FILES Keep all working files + + HYBRID_USE_LIBRARY + Use library + COLLISION_MODE Behavior in case of collision between layers diff --git a/src/GUI/HYBRIDPlugin_msg_fr.ts b/src/GUI/HYBRIDPlugin_msg_fr.ts index d4aeae7..140b818 100644 --- a/src/GUI/HYBRIDPlugin_msg_fr.ts +++ b/src/GUI/HYBRIDPlugin_msg_fr.ts @@ -170,6 +170,10 @@ en conséquence au dessous signifie à l'intérieur et au dessus signifie KEEP_WORKING_FILES Conserver tous les fichiers temporaires + + HYBRID_USE_LIBRARY + Utiliser la librairie + COLLISION_MODE Comportement en cas de collision entre les couches diff --git a/src/GUI/HYBRIDPlugin_msg_ja.ts b/src/GUI/HYBRIDPlugin_msg_ja.ts index 084178a..83fbb32 100644 --- a/src/GUI/HYBRIDPlugin_msg_ja.ts +++ b/src/GUI/HYBRIDPlugin_msg_ja.ts @@ -123,6 +123,10 @@ downward means inward and upward means outward ... KEEP_WORKING_FILES すべての作業ファイルを維持 + + HYBRID_USE_LIBRARY + 図書館を利用する + COLLISION_MODE レイヤー間の干渉時の振る舞い diff --git a/src/HYBRIDPlugin/HYBRIDPlugin_Hypothesis.cxx b/src/HYBRIDPlugin/HYBRIDPlugin_Hypothesis.cxx index c228487..314f693 100644 --- a/src/HYBRIDPlugin/HYBRIDPlugin_Hypothesis.cxx +++ b/src/HYBRIDPlugin/HYBRIDPlugin_Hypothesis.cxx @@ -1633,6 +1633,9 @@ std::ostream & HYBRIDPlugin_Hypothesis::SaveTo(std::ostream & save) for ( o2v = _customOption2value.begin(); o2v != _customOption2value.end(); ++o2v ) save << " -" << o2v->first << " -" << o2v->second; + // New in SALOME 9.13 + save << " " << myUseLib; + return save; } @@ -2010,6 +2013,10 @@ std::istream & HYBRIDPlugin_Hypothesis::LoadFrom(std::istream & load) } } + // New in SALOME 9.13 + if ( static_cast(load >> i)) + myUseLib = (bool) i; + return load; } diff --git a/src/HYBRIDPlugin/HYBRIDPlugin_Hypothesis.hxx b/src/HYBRIDPlugin/HYBRIDPlugin_Hypothesis.hxx index 7504815..b4164bb 100644 --- a/src/HYBRIDPlugin/HYBRIDPlugin_Hypothesis.hxx +++ b/src/HYBRIDPlugin/HYBRIDPlugin_Hypothesis.hxx @@ -456,7 +456,6 @@ private: short myElementGeneration; double myCoreSize; - bool myUseLib; bool myLayersOnAllWrap; std::vector myFacesWithImprinting; std::vector myFacesWithSnapping; @@ -489,6 +488,7 @@ private: bool myToUseBoundaryRecoveryVersion; // missing from hybrid bool myToUseFemCorrection; // missing from hybrid bool myToRemoveCentralPoint; // missing from hybrid + bool myUseLib; THYBRIDEnforcedVertexList _enfVertexList;