X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESH_I%2FSMESH_Mesh_i.cxx;h=8dc1b25b585e3bb0def9dcdef7cef4d507dc6adc;hp=94b83e290b83d275e25de16ba38177bdc80ca867;hb=14866e630942b5bf53793305c8d01ac390534795;hpb=fe4d201b78c5a39c2c1186498a481323d537e928 diff --git a/src/SMESH_I/SMESH_Mesh_i.cxx b/src/SMESH_I/SMESH_Mesh_i.cxx index 94b83e290..8dc1b25b5 100644 --- a/src/SMESH_I/SMESH_Mesh_i.cxx +++ b/src/SMESH_I/SMESH_Mesh_i.cxx @@ -455,6 +455,19 @@ SMESH::DriverMED_ReadStatus SMESH_Mesh_i::ImportCGNSFile( const char* theFileNa return ConvertDriverMEDReadStatus(status); } +//================================================================================ +/*! + * \brief Return string representation of a MED file version comprising nbDigits + */ +//================================================================================ + +char* SMESH_Mesh_i::GetVersionString(CORBA::Long minor, CORBA::Short nbDigits) +{ + string ver = DriverMED_W_SMESHDS_Mesh::GetVersionString(minor, + nbDigits); + return CORBA::string_dup( ver.c_str() ); +} + //============================================================================= /*! * ImportUNVFile @@ -3014,22 +3027,26 @@ string SMESH_Mesh_i::prepareMeshNameAndGroups(const char* file, void SMESH_Mesh_i::ExportMED(const char* file, CORBA::Boolean auto_groups, + CORBA::Long minor, CORBA::Boolean overwrite, CORBA::Boolean autoDimension) throw(SALOME::SALOME_Exception) { - //MESSAGE("SMESH::MED_VERSION:"<< theVersion); + //MESSAGE("MED minor version: "<< minor); SMESH_TRY; if ( _preMeshInfo ) _preMeshInfo->FullLoadFromFile(); string aMeshName = prepareMeshNameAndGroups(file, overwrite); - _impl->ExportMED( file, aMeshName.c_str(), auto_groups, 0, autoDimension ); + _impl->ExportMED( file, aMeshName.c_str(), auto_groups, minor, 0, autoDimension ); TPythonDump() << SMESH::SMESH_Mesh_var(_this()) << ".ExportMED( r'" - << file << "', " << auto_groups << ", " - << overwrite << ", " - << autoDimension << " )"; + << file << "', " + << "auto_groups=" <FullLoadFromFile(); @@ -3191,7 +3210,7 @@ void SMESH_Mesh_i::ExportPartToMED(SMESH::SMESH_IDSource_ptr meshPart, SMESH::DownCast< SMESH_Mesh_i* >( meshPart )) { aMeshName = prepareMeshNameAndGroups(file, overwrite); - _impl->ExportMED( file, aMeshName.c_str(), auto_groups, + _impl->ExportMED( file, aMeshName.c_str(), auto_groups, minor, 0, autoDimension, /*addODOnVertices=*/have0dField); meshDS = _impl->GetMeshDS(); } @@ -3209,7 +3228,7 @@ void SMESH_Mesh_i::ExportPartToMED(SMESH::SMESH_IDSource_ptr meshPart, } SMESH_MeshPartDS* partDS = new SMESH_MeshPartDS( meshPart ); - _impl->ExportMED( file, aMeshName.c_str(), auto_groups, + _impl->ExportMED( file, aMeshName.c_str(), auto_groups, minor, partDS, autoDimension, /*addODOnVertices=*/have0dField); meshDS = tmpDSDeleter._obj = partDS; } @@ -3235,10 +3254,14 @@ void SMESH_Mesh_i::ExportPartToMED(SMESH::SMESH_IDSource_ptr meshPart, goList[i] = gbo; } TPythonDump() << _this() << ".ExportPartToMED( " - << meshPart << ", r'" << file << "', " - << auto_groups << ", " << overwrite << ", " - << autoDimension << ", " << goList - << ", '" << ( geomAssocFields ? geomAssocFields : "" ) << "'" << " )"; + << meshPart << ", r'" + << file << "', " + << auto_groups << ", " + << minor << ", " + << overwrite << ", " + << autoDimension << ", " + << goList << ", '" + << ( geomAssocFields ? geomAssocFields : "" ) << "'" << " )"; SMESH_CATCH( SMESH::throwCorbaException ); }