From: eap Date: Tue, 14 Sep 2021 15:33:41 +0000 (+0300) Subject: bos #24400 [CEA] Option in SALOME for not storing in med files the indices (number... X-Git-Tag: V9_8_0a1~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=786657f54f6ddbea5be8600b7209f710308c52be;p=modules%2Fsmesh.git bos #24400 [CEA] Option in SALOME for not storing in med files the indices (number of nodes) Add the option to Export dialog --- diff --git a/src/SMESHGUI/SMESHGUI.cxx b/src/SMESHGUI/SMESHGUI.cxx index a4714beb7..ca9c78767 100644 --- a/src/SMESHGUI/SMESHGUI.cxx +++ b/src/SMESHGUI/SMESHGUI.cxx @@ -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++ ) { diff --git a/src/SMESHGUI/SMESH_msg_en.ts b/src/SMESHGUI/SMESH_msg_en.ts index a4b6cfd7a..9c982d71e 100644 --- a/src/SMESHGUI/SMESH_msg_en.ts +++ b/src/SMESHGUI/SMESH_msg_en.ts @@ -1614,6 +1614,10 @@ Please enter correct values and try again SMESH_AUTO_DIM Automatically define space dimension + + SMESH_MED_SAVE_NUMS + Export indices + SMESH_ZTOLERANCE Z tolerance diff --git a/src/StdMeshers/StdMeshers_Hexa_3D.cxx b/src/StdMeshers/StdMeshers_Hexa_3D.cxx index dbbace0e6..a912dd8be 100644 --- a/src/StdMeshers/StdMeshers_Hexa_3D.cxx +++ b/src/StdMeshers/StdMeshers_Hexa_3D.cxx @@ -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; }