-//================================================================================
-/*!
- * \brief Create meshes by reading a MED file
- */
-//================================================================================
-
-SMESH::mesh_array* SMESH_Gen_i::CreateMeshesFromMED( const char* theFileName,
- SMESH::DriverMED_ReadStatus& theStatus)
-{
- Unexpect aCatch(SALOME_SalomeException);
- checkFileReadable( theFileName );
-
- SMESH::mesh_array* result = CreateMeshesFromMEDorSAUV(theFileName, theStatus,
- "CreateMeshesFromMED", theFileName);
- return result;
-}
-
-//=============================================================================
-/*!
- * SMESH_Gen_i::CreateMeshFromSAUV
- *
- * Create mesh and import data from SAUV file
- */
-//=============================================================================
-
-SMESH::mesh_array* SMESH_Gen_i::CreateMeshesFromSAUV( const char* theFileName,
- SMESH::DriverMED_ReadStatus& theStatus)
-{
- Unexpect aCatch(SALOME_SalomeException);
- checkFileReadable( theFileName );
-
- std::string sauvfilename(theFileName);
- std::string medfilename(theFileName);
- medfilename += ".med";
- std::string cmd;
-#ifdef WIN32
- cmd = "%PYTHONBIN% ";
-#else
- cmd = "python3 ";
-#endif
- cmd += "-c \"";
- cmd += "from medutilities import convert ; convert(r'" + sauvfilename + "', 'GIBI', 'MED', 1, r'" + medfilename + "')";
- cmd += "\"";
- system(cmd.c_str());
- SMESH::mesh_array* result = CreateMeshesFromMEDorSAUV(medfilename.c_str(),
- theStatus,
- "CreateMeshesFromSAUV",
- sauvfilename.c_str());
-#ifdef WIN32
- cmd = "%PYTHONBIN% ";
-#else
- cmd = "python3 ";
-#endif
- cmd += "-c \"";
- cmd += "from medutilities import my_remove ; my_remove(r'" + medfilename + "')";
- cmd += "\"";
- system(cmd.c_str());
- return result;
-}
-