bos #24400 [CEA] Option in SALOME for not storing in med files the indices (number of nodes)

Add the option to Export dialog
This commit is contained in:
eap 2021-09-14 18:33:41 +03:00
parent 45269c3fb4
commit 786657f54f
3 changed files with 12 additions and 4 deletions

View 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++ )
{

View 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>

View 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;
}