mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-04-15 21:21:21 +05:00
Issue 0020520: [CEA 358] Import - Export Sauv files in SMESH
This commit is contained in:
parent
4cd62d7138
commit
49c4dbd0bf
@ -226,6 +226,38 @@
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case 115:
|
||||||
|
{
|
||||||
|
std::string file_in = filename.toLatin1().constData();
|
||||||
|
std::string file_tmp = file_in + ".med";
|
||||||
|
std::string cmd;
|
||||||
|
#ifdef WNT
|
||||||
|
cmd = "%PYTHONBIN% ";
|
||||||
|
#else
|
||||||
|
cmd = "python ";
|
||||||
|
#endif
|
||||||
|
cmd += "-c \"";
|
||||||
|
cmd += "from medutilities import convert ; convert(r'" + file_in + "', 'GIBI', 'MED', 1, r'" + file_tmp + "')";
|
||||||
|
cmd += "\"";
|
||||||
|
system(cmd.c_str());
|
||||||
|
// MED format
|
||||||
|
SMESH::DriverMED_ReadStatus res;
|
||||||
|
aMeshes = theComponentMesh->CreateMeshesFromMED( file_tmp.c_str(), res );
|
||||||
|
if ( res != SMESH::DRS_OK ) {
|
||||||
|
errors.append( QString( "%1 :\n\t%2" ).arg( filename ).
|
||||||
|
arg( QObject::tr( QString( "SMESH_DRS_%1" ).arg( res ).toLatin1().data() ) ) );
|
||||||
|
}
|
||||||
|
#ifdef WNT
|
||||||
|
cmd = "%PYTHONBIN% ";
|
||||||
|
#else
|
||||||
|
cmd = "python ";
|
||||||
|
#endif
|
||||||
|
cmd += "-c \"";
|
||||||
|
cmd += "from medutilities import my_remove ; my_remove(r'" + file_tmp + "')";
|
||||||
|
cmd += "\"";
|
||||||
|
system(cmd.c_str());
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch ( const SALOME::SALOME_Exception& S_ex ) {
|
catch ( const SALOME::SALOME_Exception& S_ex ) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user