mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-04-12 17:07:27 +05:00
Add a MEDFILE attribut for selection in Efficas. Patch submited by P. Rascle on 2004-03-22.
This commit is contained in:
parent
260b44e5e4
commit
7ba9361906
@ -3567,9 +3567,10 @@ void SMESHGUI::Export_Mesh(QAD_Desktop * parent, int theCommandID)
|
|||||||
SMESH::SMESH_Mesh_var aMesh = smeshGUI->ConvertIOinMesh( IObject, res );
|
SMESH::SMESH_Mesh_var aMesh = smeshGUI->ConvertIOinMesh( IObject, res );
|
||||||
if ( res )
|
if ( res )
|
||||||
{
|
{
|
||||||
|
QString filename;
|
||||||
if (theCommandID==122)
|
if (theCommandID==122)
|
||||||
{ // EXPORT MED
|
{ // EXPORT MED
|
||||||
QString filename = QAD_FileDlg::getFileName(parent,
|
filename = QAD_FileDlg::getFileName(parent,
|
||||||
"",
|
"",
|
||||||
tr("MED files (*.med)"),
|
tr("MED files (*.med)"),
|
||||||
tr("Export mesh"),
|
tr("Export mesh"),
|
||||||
@ -3583,7 +3584,7 @@ void SMESHGUI::Export_Mesh(QAD_Desktop * parent, int theCommandID)
|
|||||||
}
|
}
|
||||||
else if (theCommandID==121)
|
else if (theCommandID==121)
|
||||||
{ // EXPORT DAT
|
{ // EXPORT DAT
|
||||||
QString filename = QAD_FileDlg::getFileName(parent,
|
filename = QAD_FileDlg::getFileName(parent,
|
||||||
"",
|
"",
|
||||||
tr("DAT files (*.dat)"),
|
tr("DAT files (*.dat)"),
|
||||||
tr("Export mesh"),
|
tr("Export mesh"),
|
||||||
@ -3597,7 +3598,7 @@ void SMESHGUI::Export_Mesh(QAD_Desktop * parent, int theCommandID)
|
|||||||
}
|
}
|
||||||
else if (theCommandID==123)
|
else if (theCommandID==123)
|
||||||
{ // EXPORT UNV
|
{ // EXPORT UNV
|
||||||
QString filename = QAD_FileDlg::getFileName(parent,
|
filename = QAD_FileDlg::getFileName(parent,
|
||||||
"",
|
"",
|
||||||
tr("IDEAS files (*.unv)"),
|
tr("IDEAS files (*.unv)"),
|
||||||
tr("Export mesh"),
|
tr("Export mesh"),
|
||||||
@ -3608,27 +3609,32 @@ void SMESHGUI::Export_Mesh(QAD_Desktop * parent, int theCommandID)
|
|||||||
aMesh->ExportUNV( filename.latin1() );
|
aMesh->ExportUNV( filename.latin1() );
|
||||||
QApplication::restoreOverrideCursor();
|
QApplication::restoreOverrideCursor();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
aMesh->ExportDAT( filename.latin1() );
|
aMesh->ExportDAT( filename.latin1() );
|
||||||
|
|
||||||
QApplication::restoreOverrideCursor();
|
SCRUTE(filename.latin1());
|
||||||
|
if ( IObject->hasEntry() && !filename.isEmpty() )
|
||||||
if (IObject->hasEntry())
|
|
||||||
{
|
{
|
||||||
MESSAGE("---");
|
SALOMEDS::SObject_var SO = smeshGUI->myStudy->FindObjectID( IObject->getEntry() );
|
||||||
SALOMEDS::SObject_var SO =
|
|
||||||
smeshGUI->myStudy->FindObjectID(IObject->getEntry());
|
|
||||||
SALOMEDS::GenericAttribute_var anAttr;
|
SALOMEDS::GenericAttribute_var anAttr;
|
||||||
SALOMEDS::AttributeComment_var aFileName;
|
SALOMEDS::AttributeComment_var aFileName;
|
||||||
SALOMEDS::StudyBuilder_var aStudyBuilder =
|
SALOMEDS::StudyBuilder_var aStudyBuilder = smeshGUI->myStudy->NewBuilder();
|
||||||
smeshGUI->myStudy->NewBuilder();
|
anAttr = aStudyBuilder->FindOrCreateAttribute(SO, "AttributeComment");
|
||||||
anAttr =
|
|
||||||
aStudyBuilder->FindOrCreateAttribute(SO,
|
|
||||||
"AttributeComment");
|
|
||||||
aFileName = SALOMEDS::AttributeComment::_narrow(anAttr);
|
aFileName = SALOMEDS::AttributeComment::_narrow(anAttr);
|
||||||
aFileName->SetValue(filename.latin1());
|
aFileName->SetValue(filename.latin1());
|
||||||
|
//PN 20/03/03 -- ajout d'un attribut MEDFILE pour selection dans Efficas
|
||||||
|
if (theCommandID==122)
|
||||||
|
{ // EXPORT MED
|
||||||
|
QString medfilename="FICHIERMED"+filename;
|
||||||
|
anAttr = aStudyBuilder->FindOrCreateAttribute(SO, "AttributeComment");
|
||||||
|
SALOMEDS::AttributeComment_var MEDFileName;
|
||||||
|
MEDFileName = SALOMEDS::AttributeComment::_narrow(anAttr);
|
||||||
|
MEDFileName->SetValue(medfilename.latin1());
|
||||||
|
} // EXPORT MED
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
QApplication::restoreOverrideCursor();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user