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
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=" <<auto_groups << ", "
+ << "minor=" << minor << ", "
+ << "overwrite=" << overwrite << ", "
+ << "meshPart=None, "
+ << "autoDimension=" << autoDimension << " )";
SMESH_CATCH( SMESH::throwCorbaException );
}
void SMESH_Mesh_i::ExportPartToMED(SMESH::SMESH_IDSource_ptr meshPart,
const char* file,
CORBA::Boolean auto_groups,
+ CORBA::Long minor,
CORBA::Boolean overwrite,
CORBA::Boolean autoDimension,
const GEOM::ListOfFields& fields,
const char* geomAssocFields)
throw (SALOME::SALOME_Exception)
{
+ MESSAGE("MED minor version: "<< minor);
SMESH_TRY;
if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile();
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();
}
}
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;
}
GEOM::GEOM_BaseObject_var gbo = GEOM::GEOM_BaseObject::_narrow( fields[i] );
goList[i] = gbo;
}
- TPythonDump() << _this() << ".ExportPartToMED( "
- << meshPart << ", r'" << file << "', "
- << auto_groups << ", " << overwrite << ", "
- << autoDimension << ", " << goList
- << ", '" << ( geomAssocFields ? geomAssocFields : "" ) << "'" << " )";
+ TPythonDump() << _this() << ".ExportPartToMED( r'"
+ << file << "', "
+ << "auto_groups=" << auto_groups << ", "
+ << "minor=" << minor << ", "
+ << "overwrite=" << overwrite << ", "
+ << "meshPart=" << meshPart << ", "
+ << "autoDimension=" << autoDimension << ", "
+ << "fields=" << goList << ", geomAssocFields='"
+ << ( geomAssocFields ? geomAssocFields : "" ) << "'" << " )";
SMESH_CATCH( SMESH::throwCorbaException );
}