]> SALOME platform Git repositories - plugins/hybridplugin.git/commitdiff
Salome HOME
Add Use library to the advanced options in the GUI
authorChristophe Bourcier <christophe.bourcier@cea.fr>
Wed, 5 Jun 2024 15:17:30 +0000 (17:17 +0200)
committerChristophe Bourcier <christophe.bourcier@cea.fr>
Wed, 5 Jun 2024 15:17:30 +0000 (17:17 +0200)
src/GUI/HYBRIDPluginGUI_AdvWidget_QTD.ui
src/GUI/HYBRIDPluginGUI_HypothesisCreator.cxx
src/GUI/HYBRIDPluginGUI_HypothesisCreator.h
src/GUI/HYBRIDPlugin_msg_en.ts
src/GUI/HYBRIDPlugin_msg_fr.ts
src/GUI/HYBRIDPlugin_msg_ja.ts
src/HYBRIDPlugin/HYBRIDPlugin_Hypothesis.cxx
src/HYBRIDPlugin/HYBRIDPlugin_Hypothesis.hxx

index cb95c47ad35cb05115bfbb91e1bd8ece2eb3e802..c47b02af01d7c3831393600ffc6c48635e1052cd 100644 (file)
         </property>
        </widget>
       </item>
+      <item row="3" column="0">
+       <widget class="QCheckBox" name="useLibraryCheck">
+        <property name="text">
+         <string>HYBRID_USE_LIBRARY</string>
+        </property>
+        <property name="autoExclusive">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
      </layout>
     </widget>
    </item>
index da329c958dbb6381c5337c5e8b587ce83bc2bef4..0932368e08affb4d3ac6e1ed83dba075fc1007b0 100644 (file)
@@ -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();
index b9a2fe472781479c2adc34b68c5b949129c6d290..0e411a15368be90d946ccdc82b39732f58ee4395 100644 (file)
@@ -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;
index 8b031fa3808e9027b6a1369f83716c5df81b6c33..2a0117117d8731b24a16adfb94ede87dc5cd6e39 100644 (file)
@@ -178,6 +178,10 @@ downward means inward and upward means outward ...
         <source>KEEP_WORKING_FILES</source>
         <translation>Keep all working files</translation>
     </message>
+    <message>
+        <source>HYBRID_USE_LIBRARY</source>
+        <translation>Use library</translation>
+    </message>
     <message>
         <source>COLLISION_MODE</source>
         <translation>Behavior in case of collision between layers</translation>
index d4aeae7a76a2a9c9663f3c748a3e44bc4c99cf3e..140b81884e03eab1069c089720169b44053d0d21 100644 (file)
@@ -170,6 +170,10 @@ en conséquence au dessous signifie à l&apos;intérieur et au dessus signifie 
         <source>KEEP_WORKING_FILES</source>
         <translation>Conserver tous les fichiers temporaires</translation>
     </message>
+    <message>
+        <source>HYBRID_USE_LIBRARY</source>
+        <translation>Utiliser la librairie</translation>
+    </message>
     <message>
         <source>COLLISION_MODE</source>
         <translation>Comportement en cas de collision entre les couches</translation>
index 084178a64922433399e9545dbb606dbe011fc676..83fbb3217407e54548cdaf56fef3c213e694c844 100644 (file)
@@ -123,6 +123,10 @@ downward means inward and upward means outward ...
       <source>KEEP_WORKING_FILES</source>
       <translation>すべての作業ファイルを維持</translation>
     </message>
+    <message>
+        <source>HYBRID_USE_LIBRARY</source>
+        <translation>図書館を利用する</translation>
+    </message>
     <message>
       <source>COLLISION_MODE</source>
       <translation>レイヤー間の干渉時の振る舞い</translation>
index c228487068c2c7e37559b76a7f9466c16d8917d6..314f693d55580fe4a9ba3743fff477ca1c944be4 100644 (file)
@@ -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<bool>(load >> i))
+    myUseLib = (bool) i;
+
   return load;
 }
 
index 7504815a3254ccf245b3d9091e45badb8c3f6cac..b4164bb0815b10fc253148062a78572140de10ec 100644 (file)
@@ -456,7 +456,6 @@ private:
   short            myElementGeneration;
   double           myCoreSize;
 
-  bool             myUseLib;
   bool             myLayersOnAllWrap;
   std::vector<int> myFacesWithImprinting;
   std::vector<int> 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;