3 #include "MEDMEM_GibiMeshDriver.hxx"
4 #include "MEDMEM_Mesh.hxx"
5 using namespace MEDMEM;
6 int main (int argc, char ** argv)
8 /* process the arguments */
11 cerr << "Usage : " << argv[0]
12 << "Gibifilename" << endl << endl
13 << "-> lit le fichier gibi filename ,crée un fichier MED" << endl;
16 string gibifilename = argv[1];
18 // Construction des noms de fichier
19 const string ext=".sauve";
20 string::size_type pos=gibifilename.find(ext,0);
21 string basename (gibifilename, 0, pos);
22 string medfile=basename+".med";
23 string cast2medfile="cast_"+basename+".med";
25 // lecture du fichier gibi
26 MESH * myMesh= new MESH() ;
27 GIBI_MESH_RDONLY_DRIVER myGibiMeshDriver(gibifilename, myMesh) ;
28 myGibiMeshDriver.open() ;
29 myGibiMeshDriver.read() ;
30 myGibiMeshDriver.close() ;
32 cout << "Impression de MESH : " << endl;
35 // creation d'un fichier med
36 int idMed = myMesh->addDriver(MED_DRIVER, medfile, basename);
37 myMesh->write(idMed) ;