mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-26 17:30:35 +05:00
Store mesh names and all meshes into one file (only one last mesh was saved before)
This commit is contained in:
parent
0925bd9c61
commit
26f9395ab8
@ -5057,7 +5057,7 @@ Engines::ListOfData* SMESH_Gen_i::getModifiedData(CORBA::Long studyId)
|
|||||||
Engines::ListOfData_var aResult = new Engines::ListOfData;
|
Engines::ListOfData_var aResult = new Engines::ListOfData;
|
||||||
|
|
||||||
if (!myImportedStudyChanged) {
|
if (!myImportedStudyChanged) {
|
||||||
MESSAGE("Study is not changed")
|
INFOS("SMESH module data was not changed")
|
||||||
return aResult._retn();
|
return aResult._retn();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5086,26 +5086,24 @@ Engines::ListOfData* SMESH_Gen_i::getModifiedData(CORBA::Long studyId)
|
|||||||
if(!aCORBAMesh->_is_nil()) {
|
if(!aCORBAMesh->_is_nil()) {
|
||||||
SMESH_Mesh_i* myImpl = dynamic_cast<SMESH_Mesh_i*>(GetServant(aCORBAMesh).in());
|
SMESH_Mesh_i* myImpl = dynamic_cast<SMESH_Mesh_i*>(GetServant(aCORBAMesh).in());
|
||||||
if (myImpl) {
|
if (myImpl) {
|
||||||
//CORBA::String_var objStr = GetORB()->object_to_string(anObj);
|
myImpl->Load();
|
||||||
//int id = myStudyContext->findId(string(objStr.in()));
|
|
||||||
CORBA::String_var objName = aSO->GetName();
|
CORBA::String_var objName = aSO->GetName();
|
||||||
SMESHDS_Mesh* mySMESHDSMesh = myImpl->GetImpl().GetMeshDS();
|
SMESHDS_Mesh* mySMESHDSMesh = myImpl->GetImpl().GetMeshDS();
|
||||||
if (mySMESHDSMesh->NbNodes() > 0) {
|
if (mySMESHDSMesh->NbNodes() > 0) {
|
||||||
// write mesh data to med file
|
// write mesh data to med file
|
||||||
aWriter.SetMesh(mySMESHDSMesh);
|
aWriter.SetMesh(mySMESHDSMesh);
|
||||||
//aWriter.SetMeshId(id);
|
|
||||||
aWriter.SetMeshName(objName.in());
|
aWriter.SetMeshName(objName.in());
|
||||||
|
aWriter.Perform();
|
||||||
aNumMeshes++;
|
aNumMeshes++;
|
||||||
} else {
|
} else {
|
||||||
MESSAGE("Mesh has zero nodes and can not be exported");
|
INFOS("Mesh has zero nodes and can not be exported "<<objName.in());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (aNumMeshes > 0) { // compund is correct, write it to the temporary file
|
if (aNumMeshes > 0) { // prepare a container to store files
|
||||||
MESSAGE("Write "<<aNumMeshes<<" meshes to "<<aFullPath.c_str());
|
INFOS("Write "<<aNumMeshes<<" meshes to "<<aFullPath.c_str());
|
||||||
aWriter.Perform();
|
|
||||||
aResult->length(1);
|
aResult->length(1);
|
||||||
Engines::DataContainer_var aData = (new Engines_DataContainer_i(
|
Engines::DataContainer_var aData = (new Engines_DataContainer_i(
|
||||||
aFullPath.c_str(), "", "", true))->_this();
|
aFullPath.c_str(), "", "", true))->_this();
|
||||||
|
Loading…
Reference in New Issue
Block a user