Salome HOME
bos #24400 [CEA] Option in SALOME for not storing in med files the indices (number...
authoreap <eap@opencascade.com>
Tue, 14 Sep 2021 15:33:41 +0000 (18:33 +0300)
committereap <eap@opencascade.com>
Tue, 14 Sep 2021 15:33:41 +0000 (18:33 +0300)
  Add the option to Export dialog

src/SMESHGUI/SMESHGUI.cxx
src/SMESHGUI/SMESH_msg_en.ts
src/StdMeshers/StdMeshers_Hexa_3D.cxx

index a4714beb732c231a73a095cd69da944bef372e12..ca9c787671c3d60192e31a4a93ef124ecdaf9636 100644 (file)
@@ -659,6 +659,7 @@ namespace
     bool toCreateGroups = resMgr->booleanValue( "SMESH", "auto_groups", false );
     bool   toOverwrite  = true;
     bool   toFindOutDim = true;
+    bool    saveNumbers = resMgr->booleanValue( "SMESH", "med_save_numbers", true );
     bool     toRenumber = true;
     double         zTol = resMgr->doubleValue( "SMESH", "med_ztolerance", 0. );
 
@@ -770,7 +771,9 @@ namespace
           aDefaultFilter = it.key();
       }
       QStringList checkBoxes;
-      checkBoxes << QObject::tr("SMESH_AUTO_GROUPS") << QObject::tr("SMESH_AUTO_DIM");
+      checkBoxes << QObject::tr("SMESH_AUTO_GROUPS")
+                 << QObject::tr("SMESH_AUTO_DIM")
+                 << QObject::tr("SMESH_MED_SAVE_NUMS");
 
       SMESHGUI_FieldSelectorWdg* fieldSelWdg = new SMESHGUI_FieldSelectorWdg();
       QList< QWidget* > wdgList;
@@ -798,6 +801,7 @@ namespace
       fd->selectNameFilter( aDefaultFilter );
       fd->SetChecked( toCreateGroups, 0 );
       fd->SetChecked( toFindOutDim,   1 );
+      fd->SetChecked( saveNumbers,    2 );
       if ( !anInitialPath.isEmpty() )
         fd->setDirectory( anInitialPath );
       fd->selectFile(aMeshName);
@@ -888,6 +892,7 @@ namespace
       }
       toCreateGroups = fd->IsChecked(0);
       toFindOutDim   = fd->IsChecked(1);
+      saveNumbers    = fd->IsChecked(2);
       zTol           = zTolCheck->isChecked() ? zTolSpin->value() : -1;
       fieldSelWdg->GetSelectedFields();
       if ( resMgr ) resMgr->setValue( "SMESH", "enable_ztolerance", zTolCheck->isChecked() );
@@ -927,7 +932,6 @@ namespace
 //         }
         if ( isMED && isOkToWrite )
         {
-          const bool saveNumbers = resMgr->booleanValue( "SMESH", "med_save_numbers", true );
           aMeshIter = aMeshList.begin();
           for( int aMeshIndex = 0; aMeshIter != aMeshList.end(); aMeshIter++, aMeshIndex++ )
           {
index a4b6cfd7ae8c2c8152aa26873157bcf61ac868cb..9c982d71ee1c68612d291e5fbf3bed00f2c4650d 100644 (file)
@@ -1614,6 +1614,10 @@ Please enter correct values and try again</translation>
         <source>SMESH_AUTO_DIM</source>
         <translation>Automatically define space dimension</translation>
     </message>
+    <message>
+        <source>SMESH_MED_SAVE_NUMS</source>
+        <translation>Export indices</translation>
+    </message>
     <message>
         <source>SMESH_ZTOLERANCE</source>
         <translation>Z tolerance</translation>
index dbbace0e6925608d9b0eca58597cd6657acb0a32..a912dd8bee191886cc9f9c0bf0c04459f0d74396 100644 (file)
@@ -1166,8 +1166,8 @@ SMESH_ComputeErrorPtr ComputePentahedralMesh(SMESH_Mesh &          aMesh,
     bool hasVLonFace = false;
     for ( TopExp_Explorer exp( aShape, TopAbs_FACE ); exp.More(); exp.Next() )
     {
-       const SMESHDS_SubMesh* sm1 = aMesh.GetSubMesh( exp.Current() )->GetSubMeshDS();
-       const SMESHDS_SubMesh* sm2 = proxyMesh->GetSubMesh( exp.Current() );
+      const SMESHDS_SubMesh* sm1 = aMesh.GetSubMesh( exp.Current() )->GetSubMeshDS();
+      const SMESHDS_SubMesh* sm2 = proxyMesh->GetSubMesh( exp.Current() );
       if (( hasVLonFace = ( sm2 && sm1->NbElements() != sm2->NbElements() )))
         break;
     }