diff --git a/CMakeLists.txt b/CMakeLists.txt index abe280dd5..083efdcec 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,7 +31,7 @@ ENDIF(WIN32) STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC) SET(${PROJECT_NAME_UC}_MAJOR_VERSION 8) -SET(${PROJECT_NAME_UC}_MINOR_VERSION 3) +SET(${PROJECT_NAME_UC}_MINOR_VERSION 4) SET(${PROJECT_NAME_UC}_PATCH_VERSION 0) SET(${PROJECT_NAME_UC}_VERSION ${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION}) @@ -77,6 +77,11 @@ OPTION(SALOME_BUILD_DOC "Generate SALOME SMESH documentation" ON) OPTION(SALOME_BUILD_GUI "Enable GUI" ON) OPTION(SALOME_SMESH_USE_CGNS "Enable import/export to CGNS format" OFF) OPTION(SALOME_SMESH_USE_TBB "Enable parallel computation" OFF) +OPTION(SALOME_SMESH_DYNLOAD_LOCAL "Load plug-ins' symbols locally (Linux only)" ON) + +IF(SALOME_SMESH_DYNLOAD_LOCAL) + ADD_DEFINITIONS(-DDYNLOAD_LOCAL) +ENDIF(SALOME_SMESH_DYNLOAD_LOCAL) #On Linux use Fortran to compile MEFISTO2D IF(NOT WIN32) @@ -85,7 +90,7 @@ IF(NOT WIN32) ADD_DEFINITIONS(-DENABLE_MEFISTO) ENDIF(NOT WIN32) -MARK_AS_ADVANCED(SALOME_BUILD_GUI SALOME_SMESH_USE_CGNS SALOME_SMESH_USE_TBB) +MARK_AS_ADVANCED(SALOME_BUILD_GUI SALOME_SMESH_USE_CGNS SALOME_SMESH_USE_TBB SALOME_SMESH_DYNLOAD_LOCAL) # Prerequisites # ============= diff --git a/doc/salome/gui/SMESH/doxyfile.in b/doc/salome/gui/SMESH/doxyfile.in index 164ad9220..2b716b2c0 100755 --- a/doc/salome/gui/SMESH/doxyfile.in +++ b/doc/salome/gui/SMESH/doxyfile.in @@ -41,6 +41,7 @@ WARNINGS = YES INPUT = @CMAKE_CURRENT_SOURCE_DIR@/input $(GEOM_ROOT_DIR)/share/doc/salome/gui/GEOM/input FILE_PATTERNS = *.doc EXCLUDE = +EXCLUDE_PATTERNS = tui_*.doc IMAGE_PATH = $(GEOM_ROOT_DIR)/share/doc/salome/gui/GEOM @CMAKE_CURRENT_SOURCE_DIR@/images EXAMPLE_PATH = @CMAKE_SOURCE_DIR@/doc/salome/examples @CMAKE_SOURCE_DIR@/src/SMESH_SWIG diff --git a/idl/SMESH_Mesh.idl b/idl/SMESH_Mesh.idl index fbb9430d3..f01de1d07 100644 --- a/idl/SMESH_Mesh.idl +++ b/idl/SMESH_Mesh.idl @@ -238,11 +238,28 @@ module SMESH /*! * Enumeration for ExportToMED*() + * MED_V2_1 and MED_V2_2 are here for compatibility and mean respectively obsolete and MED_LATEST. + * MED_MINOR_0 to MED_MINOR_9 are use to specify the minor version used by MEDfichier + * to write MED files (major version cannot be changed). + * This allows backward compatibility from a newer version of SALOME to an older one: + * for instance, a MESH produced in SALOME 8.4 (med 3.3) can be written in med 3.2 format + * to be read in SALOME 8.3. */ enum MED_VERSION { MED_V2_1, - MED_V2_2 + MED_V2_2, + MED_LATEST, + MED_MINOR_0, + MED_MINOR_1, + MED_MINOR_2, + MED_MINOR_3, + MED_MINOR_4, + MED_MINOR_5, + MED_MINOR_6, + MED_MINOR_7, + MED_MINOR_8, + MED_MINOR_9 }; /*! @@ -686,8 +703,8 @@ module SMESH raises (SALOME::SALOME_Exception); /*! - * Export Mesh to MED_V2_1 MED format - * Works, just the same as ExportToMEDX with MED_VERSION parameter equal to MED_V2_1 + * Export Mesh to MED_LATEST MED format + * Works, just the same as ExportToMEDX with MED_VERSION parameter equal to MED_LATEST * and overwrite parameter equal to true * The method is kept in order to support old functionality */ diff --git a/src/DriverMED/DriverMED_W_SMESHDS_Mesh.cxx b/src/DriverMED/DriverMED_W_SMESHDS_Mesh.cxx index b4f49a216..82722c15f 100644 --- a/src/DriverMED/DriverMED_W_SMESHDS_Mesh.cxx +++ b/src/DriverMED/DriverMED_W_SMESHDS_Mesh.cxx @@ -70,6 +70,7 @@ void DriverMED_W_SMESHDS_Mesh::SetFile(const std::string& theFileName, { Driver_SMESHDS_Mesh::SetFile(theFileName); myMedVersion = theId; + //MESSAGE("myMedVersion:"<(majeur, mineur, release); -// else - MED::GetVersionRelease(majeur, mineur, release); + MED::GetVersionRelease(majeur, mineur, release); + TInt imposedMineur = mineur; + switch( theVersion ) { + case MED::eV2_1 : + case MED::eV2_2 : + case MED::eLATEST : break; + case MED::eMINOR_0 : imposedMineur = 0; break; + case MED::eMINOR_1 : imposedMineur = 1; break; + case MED::eMINOR_2 : imposedMineur = 2; break; + case MED::eMINOR_3 : imposedMineur = 3; break; + case MED::eMINOR_4 : imposedMineur = 4; break; + case MED::eMINOR_5 : imposedMineur = 5; break; + case MED::eMINOR_6 : imposedMineur = 6; break; + case MED::eMINOR_7 : imposedMineur = 7; break; + case MED::eMINOR_8 : imposedMineur = 8; break; + case MED::eMINOR_9 : imposedMineur = 9; break; + case MED::eVUnknown : imposedMineur = mineur; break; + } + if (imposedMineur > mineur) + imposedMineur = mineur; ostringstream name; if ( theNbDigits > 0 ) name << majeur; if ( theNbDigits > 1 ) - name << "." << mineur; + name << "." << imposedMineur; if ( theNbDigits > 2 ) name << "." << release; return name.str(); @@ -456,7 +477,7 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform() break; } } - + //MESSAGE("myMedVersion:"<CrMeshInfo(aMeshDimension,aSpaceDimension,aMeshName); //MESSAGE("Add - aMeshName : "<GetName()); diff --git a/src/MEDWrapper/Base/MED_Common.hxx b/src/MEDWrapper/Base/MED_Common.hxx index 8030d84bd..00eb32bdf 100644 --- a/src/MEDWrapper/Base/MED_Common.hxx +++ b/src/MEDWrapper/Base/MED_Common.hxx @@ -44,8 +44,10 @@ #endif namespace MED{ - - enum EVersion {eVUnknown = -1, eV2_1, eV2_2}; + // enum EVersion sould be synchronized with enum MED_VERSION in SMESH_Mesh.idl (.hh) + // i.e. same positive values! + enum EVersion {eVUnknown = -1, eV2_1, eV2_2, eLATEST, + eMINOR_0, eMINOR_1, eMINOR_2, eMINOR_3, eMINOR_4, eMINOR_5, eMINOR_6, eMINOR_7, eMINOR_8, eMINOR_9}; typedef enum {eFAUX, eVRAI} EBooleen ; typedef double TFloat; diff --git a/src/MEDWrapper/Factory/MED_Factory.cxx b/src/MEDWrapper/Factory/MED_Factory.cxx index 49d47fad5..6c1d9909b 100644 --- a/src/MEDWrapper/Factory/MED_Factory.cxx +++ b/src/MEDWrapper/Factory/MED_Factory.cxx @@ -23,7 +23,6 @@ #include "MED_Factory.hxx" #include "MED_Utilities.hxx" #include "MED_V2_2_Wrapper.hxx" - #include #include #include @@ -90,6 +89,7 @@ namespace MED if(aMajor == 2 && aMinor == 1) aVersion = eV2_1; else + // TODO: check major is not superior to library and switch on minor aVersion = eV2_2; } else { @@ -124,20 +124,19 @@ namespace MED } PWrapper CrWrapper(const std::string& theFileName, - bool theDoPreCheckInSeparateProcess) + bool theDoPreCheckInSeparateProcess, + int theMinor) { PWrapper aWrapper; + if (theMinor <0) + theMinor = MED_MINOR_NUM; EVersion aVersion = GetVersionId(theFileName,theDoPreCheckInSeparateProcess); switch(aVersion){ - case eV2_2: - aWrapper.reset(new MED::V2_2::TVWrapper(theFileName)); - break; case eV2_1: EXCEPTION(std::runtime_error,"Cannot open file '"< #include +#include #ifdef _DEBUG_ static int MYDEBUG = 0; @@ -99,11 +100,14 @@ namespace MED TFile(const TFile&); public: - TFile(const std::string& theFileName): + TFile(const std::string& theFileName, TInt theMinor=-1): myCount(0), myFid(0), - myFileName(theFileName) - {} + myFileName(theFileName), + myMinor(theMinor) + { + if ((myMinor < 0) || (myMinor > MED_MINOR_NUM)) myMinor = MED_MINOR_NUM; + } ~TFile() { @@ -115,12 +119,12 @@ namespace MED { if(myCount++ == 0){ const char* aFileName = myFileName.c_str(); - myFid = MEDfileOpen(aFileName,med_access_mode(theMode)); + myFid = MEDfileVersionOpen(aFileName,med_access_mode(theMode), MED_MAJOR_NUM, myMinor, MED_RELEASE_NUM); } if(theErr) *theErr = TErr(myFid); else if(myFid < 0) - EXCEPTION(std::runtime_error,"TFile - MEDfileOpen('"<Open(theMode,theErr); } @@ -163,15 +171,12 @@ namespace MED //--------------------------------------------------------------- - TVWrapper::TVWrapper(const std::string& theFileName): - myFile(new TFile(theFileName)) + TVWrapper::TVWrapper(const std::string& theFileName, TInt theMinor): + myMinor(theMinor), + myFile(new TFile(theFileName, theMinor)) { TErr aRet; myFile->Open( eLECTURE_ECRITURE, &aRet ); - // if(aRet < 0) - // myFile->Close(); - // myFile->Open( eLECTURE_AJOUT, &aRet ); - // } if(aRet < 0) { myFile->Close(); myFile->Open( eLECTURE, &aRet ); @@ -188,7 +193,7 @@ namespace MED TVWrapper ::GetNbMeshes(TErr* theErr) { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); + TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); if(theErr && *theErr < 0) return -1; @@ -204,7 +209,7 @@ namespace MED MED::TMeshInfo& theInfo, TErr* theErr) { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); + TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); if(theErr && *theErr < 0) return; @@ -247,7 +252,7 @@ namespace MED EModeAcces theMode, TErr* theErr) { - TFileWrapper aFileWrapper(myFile,theMode,theErr); + TFileWrapper aFileWrapper(myFile,theMode,theErr, myMinor); if(theErr && *theErr < 0) return; @@ -316,7 +321,7 @@ namespace MED ::GetNbFamilies(const MED::TMeshInfo& theInfo, TErr* theErr) { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); + TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); if(theErr && *theErr < 0) return -1; @@ -334,7 +339,7 @@ namespace MED const MED::TMeshInfo& theInfo, TErr* theErr) { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); + TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); if(theErr && *theErr < 0) return -1; @@ -354,7 +359,7 @@ namespace MED const MED::TMeshInfo& theInfo, TErr* theErr) { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); + TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); if(theErr && *theErr < 0) return -1; @@ -374,7 +379,7 @@ namespace MED MED::TFamilyInfo& theInfo, TErr* theErr) { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); + TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); if(theErr && *theErr < 0) return; @@ -417,7 +422,7 @@ namespace MED EModeAcces theMode, TErr* theErr) { - TFileWrapper aFileWrapper(myFile,theMode,theErr); + TFileWrapper aFileWrapper(myFile,theMode,theErr, myMinor); if(theErr && *theErr < 0) return; @@ -476,7 +481,7 @@ namespace MED EGeometrieElement theGeom, TErr* theErr) { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); + TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); if(theErr && *theErr < 0) return; @@ -514,7 +519,7 @@ namespace MED EGeometrieElement theGeom, TErr* theErr) { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); + TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); if(theErr && *theErr < 0) return; @@ -552,7 +557,7 @@ namespace MED EGeometrieElement theGeom, TErr* theErr) { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); + TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); if(theErr && *theErr < 0) return; @@ -613,7 +618,7 @@ namespace MED EGeometrieElement theGeom, TErr* theErr) { - TFileWrapper aFileWrapper(myFile,theMode,theErr); + TFileWrapper aFileWrapper(myFile,theMode,theErr, myMinor); if(theErr && *theErr < 0) return; @@ -669,7 +674,7 @@ namespace MED EGeometrieElement theGeom, TErr* theErr) { - TFileWrapper aFileWrapper(myFile,theMode,theErr); + TFileWrapper aFileWrapper(myFile,theMode,theErr, myMinor); if(theErr && *theErr < 0) return; @@ -723,7 +728,7 @@ namespace MED EGeometrieElement theGeom, TErr* theErr) { - TFileWrapper aFileWrapper(myFile,theMode,theErr); + TFileWrapper aFileWrapper(myFile,theMode,theErr, myMinor); if(theErr && *theErr < 0) return; @@ -761,7 +766,7 @@ namespace MED ETable theTable, TErr* theErr) { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); + TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); if(theErr && *theErr < 0) return -1; @@ -790,7 +795,7 @@ namespace MED ::GetNodeInfo(MED::TNodeInfo& theInfo, TErr* theErr) { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); + TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); if(theErr && *theErr < 0) return; @@ -867,7 +872,7 @@ namespace MED EModeAcces theMode, TErr* theErr) { - TFileWrapper aFileWrapper(myFile,theMode,theErr); + TFileWrapper aFileWrapper(myFile,theMode,theErr, myMinor); if(theErr && *theErr < 0) return; @@ -953,7 +958,7 @@ namespace MED ::GetPolygoneInfo(MED::TPolygoneInfo& theInfo, TErr* theErr) { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); + TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); if(theErr && *theErr < 0) return; @@ -1012,7 +1017,7 @@ namespace MED EModeAcces theMode, TErr* theErr) { - TFileWrapper aFileWrapper(myFile,theMode,theErr); + TFileWrapper aFileWrapper(myFile,theMode,theErr, myMinor); if(theErr && *theErr < 0) return; @@ -1071,7 +1076,7 @@ namespace MED EConnectivite theConnMode, TErr* theErr) { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); + TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); if(theErr && *theErr < 0) return 0; @@ -1105,7 +1110,7 @@ namespace MED ::GetPolyedreInfo(TPolyedreInfo& theInfo, TErr* theErr) { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); + TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); if(theErr && *theErr < 0) return; @@ -1168,7 +1173,7 @@ namespace MED EModeAcces theMode, TErr* theErr) { - TFileWrapper aFileWrapper(myFile,theMode,theErr); + TFileWrapper aFileWrapper(myFile,theMode,theErr, myMinor); if(theErr && *theErr < 0) return; @@ -1272,7 +1277,7 @@ namespace MED EConnectivite theConnMode, TErr* theErr) { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); + TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); if(theErr && *theErr < 0) EXCEPTION(std::runtime_error,"GetPolyedreConnSize - (...)"); @@ -1321,7 +1326,7 @@ namespace MED { TEntityInfo anInfo; - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); + TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); if(theErr && *theErr < 0) return anInfo; @@ -1431,7 +1436,7 @@ namespace MED EConnectivite theConnMode, TErr* theErr) { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); + TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); if(theErr && *theErr < 0) return -1; @@ -1478,7 +1483,7 @@ namespace MED //---------------------------------------------------------------------------- void TVWrapper::GetCellInfo(MED::TCellInfo& theInfo, TErr* theErr) { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); + TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); if(theErr && *theErr < 0) return; @@ -1537,7 +1542,7 @@ namespace MED EModeAcces theMode, TErr* theErr) { - TFileWrapper aFileWrapper(myFile,theMode,theErr); + TFileWrapper aFileWrapper(myFile,theMode,theErr, myMinor); if(theErr && *theErr < 0) return; @@ -1618,7 +1623,8 @@ namespace MED //! Read geom type of MED_BALL structural element EGeometrieElement TVWrapper::GetBallGeom(const TMeshInfo& theMeshInfo) { - TFileWrapper aFileWrapper(myFile,eLECTURE); + TErr anError; + TFileWrapper aFileWrapper(myFile, eLECTURE, &anError, myMinor); // read med_geometry_type of "MED_BALL" element char geotypename[ MED_NAME_SIZE + 1] = MED_BALL_NAME; @@ -1629,7 +1635,8 @@ namespace MED //! Read number of balls in the Mesh TInt TVWrapper::GetNbBalls(const TMeshInfo& theMeshInfo) { - TFileWrapper aFileWrapper(myFile,eLECTURE); + TErr anError; + TFileWrapper aFileWrapper(myFile, eLECTURE, &anError, myMinor); EGeometrieElement ballType = GetBallGeom( theMeshInfo ); if ( ballType < 0 ) @@ -1642,7 +1649,7 @@ namespace MED //! Read a MEDWrapped representation of MED_BALL from the MED file void TVWrapper::GetBallInfo(TBallInfo& theInfo, TErr* theErr) { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); + TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); // check geometry of MED_BALL if ( theInfo.myGeom == eBALL ) @@ -1681,7 +1688,7 @@ namespace MED //! Write a MEDWrapped representation of MED_BALL to the MED file void TVWrapper::SetBallInfo(const TBallInfo& theInfo, EModeAcces theMode, TErr* theErr) { - TFileWrapper aFileWrapper(myFile,theMode,theErr); + TFileWrapper aFileWrapper(myFile,theMode,theErr, myMinor); TErr ret; char ballsupportname[MED_NAME_SIZE+1]="BALL_SUPPORT_MESH"; @@ -1769,7 +1776,7 @@ namespace MED TVWrapper ::GetNbFields(TErr* theErr) { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); + TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); if(theErr && *theErr < 0) return -1; @@ -1784,7 +1791,7 @@ namespace MED ::GetNbComp(TInt theFieldId, TErr* theErr) { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); + TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); if(theErr && *theErr < 0) return -1; @@ -1800,7 +1807,7 @@ namespace MED MED::TFieldInfo& theInfo, TErr* theErr) { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); + TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); if(theErr && *theErr < 0) return; @@ -1850,7 +1857,7 @@ namespace MED EModeAcces theMode, TErr* theErr) { - TFileWrapper aFileWrapper(myFile,theMode,theErr); + TFileWrapper aFileWrapper(myFile,theMode,theErr, myMinor); if(theErr && *theErr < 0) return; @@ -1902,7 +1909,7 @@ namespace MED TVWrapper ::GetNbGauss(TErr* theErr) { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); + TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); if(theErr && *theErr < 0) return -1; @@ -1917,7 +1924,7 @@ namespace MED ::GetGaussPreInfo(TInt theId, TErr* theErr) { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); + TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); if(theErr && *theErr < 0) return TGaussInfo::TInfo( TGaussInfo::TKey(ePOINT1,""),0 ); @@ -1958,7 +1965,7 @@ namespace MED TGaussInfo& theInfo, TErr* theErr) { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); + TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); if(theErr && *theErr < 0) return; @@ -1989,7 +1996,7 @@ namespace MED TVWrapper ::GetNbProfiles(TErr* theErr) { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); + TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); if(theErr && *theErr < 0) return -1; @@ -2002,7 +2009,7 @@ namespace MED ::GetProfilePreInfo(TInt theId, TErr* theErr) { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); + TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); if(theErr && *theErr < 0) return TProfileInfo::TInfo(); @@ -2029,7 +2036,7 @@ namespace MED TProfileInfo& theInfo, TErr* theErr) { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); + TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); if(theErr && *theErr < 0) return; @@ -2054,7 +2061,7 @@ namespace MED EModeAcces theMode, TErr* theErr) { - TFileWrapper aFileWrapper(myFile,theMode,theErr); + TFileWrapper aFileWrapper(myFile,theMode,theErr, myMinor); if(theErr && *theErr < 0) return; @@ -2102,7 +2109,7 @@ namespace MED TErr* theErr) { theEntity = EEntiteMaillage(-1); - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); + TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); if(theErr){ if(theEntityInfo.empty()) @@ -2225,7 +2232,7 @@ namespace MED MED::TTimeStampInfo& theInfo, TErr* theErr) { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); + TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); const TGeom2Size& aGeom2Size = theInfo.myGeom2Size; @@ -2320,7 +2327,7 @@ namespace MED const TKey2Gauss& theKey2Gauss, TErr* theErr) { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); + TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); if(theErr && *theErr < 0) return; @@ -2488,7 +2495,7 @@ namespace MED EModeAcces theMode, TErr* theErr) { - TFileWrapper aFileWrapper(myFile,theMode,theErr); + TFileWrapper aFileWrapper(myFile,theMode,theErr, myMinor); if(theErr && *theErr < 0) return; @@ -2598,7 +2605,7 @@ namespace MED { if(theInfo.myMeshInfo->myType != eSTRUCTURE) return; - TFileWrapper aFileWrapper(myFile,theMode,theErr); + TFileWrapper aFileWrapper(myFile,theMode,theErr, myMinor); if(theErr && *theErr < 0) return; @@ -2675,7 +2682,7 @@ namespace MED ::GetGrilleInfo(TGrilleInfo& theInfo, TErr* theErr) { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); + TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); if(theErr && *theErr < 0) return; @@ -2831,7 +2838,7 @@ namespace MED EGrilleType& theGridType, TErr* theErr) { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); + TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); if(theErr && *theErr < 0) EXCEPTION(std::runtime_error," GetGrilleType - aFileWrapper (...)"); @@ -2856,7 +2863,7 @@ namespace MED TIntVector& theStruct, TErr* theErr) { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr); + TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); if(theErr && *theErr < 0) return; diff --git a/src/MEDWrapper/V2_2/MED_V2_2_Wrapper.hxx b/src/MEDWrapper/V2_2/MED_V2_2_Wrapper.hxx index a06e1c15c..45f9a14a5 100644 --- a/src/MEDWrapper/V2_2/MED_V2_2_Wrapper.hxx +++ b/src/MEDWrapper/V2_2/MED_V2_2_Wrapper.hxx @@ -91,7 +91,7 @@ namespace MED TVWrapper& operator=(const TVWrapper&); public: - TVWrapper(const std::string& theFileName); + TVWrapper(const std::string& theFileName, TInt theMinor=-1); //---------------------------------------------------------------------------- virtual @@ -482,6 +482,7 @@ namespace MED protected: PFile myFile; + TInt myMinor; }; } } diff --git a/src/SMESH/SMESH_Algo.cxx b/src/SMESH/SMESH_Algo.cxx index 95e775433..acb3e7137 100644 --- a/src/SMESH/SMESH_Algo.cxx +++ b/src/SMESH/SMESH_Algo.cxx @@ -42,8 +42,6 @@ #include "SMESH_TypeDefs.hxx" #include "SMESH_subMesh.hxx" -#include - #include #include #include diff --git a/src/SMESH/SMESH_Mesh.cxx b/src/SMESH/SMESH_Mesh.cxx index 93fbbac35..713869c25 100644 --- a/src/SMESH/SMESH_Mesh.cxx +++ b/src/SMESH/SMESH_Mesh.cxx @@ -1402,6 +1402,7 @@ void SMESH_Mesh::ExportMED(const char * file, bool theAllElemsToGroup) throw(SALOME_Exception) { + //MESSAGE("MED_VERSION:"<< theVersion); SMESH_TRY; DriverMED_W_SMESHDS_Mesh myWriter; diff --git a/src/SMESH/SMESH_MeshEditor.cxx b/src/SMESH/SMESH_MeshEditor.cxx index cfe4c3e86..83066678d 100644 --- a/src/SMESH/SMESH_MeshEditor.cxx +++ b/src/SMESH/SMESH_MeshEditor.cxx @@ -46,8 +46,6 @@ #include "SMESH_OctreeNode.hxx" #include "SMESH_subMesh.hxx" -#include - #include "utilities.h" #include "chrono.hxx" diff --git a/src/SMESH/SMESH_Pattern.cxx b/src/SMESH/SMESH_Pattern.cxx index db6e60e8c..51564bf78 100644 --- a/src/SMESH/SMESH_Pattern.cxx +++ b/src/SMESH/SMESH_Pattern.cxx @@ -75,8 +75,6 @@ #include #include -#include - #include #include "utilities.h" diff --git a/src/SMESH/SMESH_subMesh.cxx b/src/SMESH/SMESH_subMesh.cxx index 22fa65b99..2f89997ba 100644 --- a/src/SMESH/SMESH_subMesh.cxx +++ b/src/SMESH/SMESH_subMesh.cxx @@ -38,8 +38,6 @@ #include "SMESH_MesherHelper.hxx" #include "SMESH_subMeshEventListener.hxx" -#include - #include "utilities.h" #include "OpUtil.hxx" #include "Basics_Utils.hxx" diff --git a/src/SMESHGUI/SMESHGUI.cxx b/src/SMESHGUI/SMESHGUI.cxx index 0061006d9..f85aa4a45 100644 --- a/src/SMESHGUI/SMESHGUI.cxx +++ b/src/SMESHGUI/SMESHGUI.cxx @@ -143,6 +143,7 @@ #include CORBA_CLIENT_HEADER(SALOMEDS_Attributes) #include CORBA_CLIENT_HEADER(SMESH_MeshEditor) #include CORBA_CLIENT_HEADER(SMESH_Measurements) +#include CORBA_CLIENT_HEADER(SMESH_Mesh) // Qt includes // #define INCLUDE_MENUITEM_DEF // VSR commented ???????? @@ -653,7 +654,7 @@ namespace // Get parameters of export operation QString aFilename; - SMESH::MED_VERSION aFormat = SMESH::MED_V2_2; + SMESH::MED_VERSION aFormat = SMESH::MED_LATEST; // Init the parameters with the default values bool aIsASCII_STL = true; bool toCreateGroups = false; @@ -741,11 +742,17 @@ namespace else if ( isMED || isSAUV ) // Export to MED or SAUV { QMap aFilterMap; - //QString v21 (aMesh->GetVersionString(SMESH::MED_V2_1, 2)); if ( isMED ) { QString v22 (aMesh->GetVersionString(SMESH::MED_V2_2, 2)); - //aFilterMap.insert( QObject::tr( "MED_VX_FILES_FILTER" ).arg( v21 ) + " (*.med)", SMESH::MED_V2_1 ); aFilterMap.insert( QObject::tr( "MED_VX_FILES_FILTER" ).arg( v22 ) + " (*.med)", SMESH::MED_V2_2 ); + int minor = v22.split(".").last().toInt(); + int vv= int(SMESH::MED_MINOR_0); // add all minor from 0 to current + for (int ii=0; iiGetVersionString(SMESH::MED_VERSION(vv), 2); + aFilterMap.insert( QObject::tr( "MED_VX_FILES_FILTER" ).arg( vs ) + " (*.med)", SMESH::MED_VERSION(vv)); + vv = vv +1; + } } else { // isSAUV aFilterMap.insert("All files (*)", SMESH::MED_V2_1 ); @@ -826,7 +833,7 @@ namespace } if( !toOverwrite ) { // can't append to an existing using other format - SMESH::MED_VERSION aVersion = SMESH::MED_V2_1; + SMESH::MED_VERSION aVersion = aFormat; //SMESH::MED_V2_1; bool isVersionOk = SMESHGUI::GetSMESHGen()->GetMEDVersion( aFilename.toUtf8().constData(), aVersion ); if( !isVersionOk || aVersion != aFormat ) { int aRet = SUIT_MessageBox::warning(SMESHGUI::desktop(), @@ -2649,9 +2656,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) if(checkLock(aStudy)) break; SUIT_OverrideCursor wc; try { -#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 OCC_CATCH_SIGNALS; -#endif SMESH::UpdateView(); } catch (std::bad_alloc) { // PAL16774 (Crash after display of many groups) diff --git a/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx b/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx index ce634a4b3..dd82c712d 100644 --- a/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx @@ -1984,9 +1984,7 @@ void SMESHGUI_PrecomputeOp::onPreview() SMESH::long_array_var aShapesId = new SMESH::long_array(); try { -#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 OCC_CATCH_SIGNALS; -#endif SMESH::MeshPreviewStruct_var previewData = gen->Precompute(myMesh, myMainShape, (SMESH::Dimension)dim, aShapesId); @@ -2009,9 +2007,7 @@ void SMESHGUI_PrecomputeOp::onPreview() } try { -#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 OCC_CATCH_SIGNALS; -#endif aCompErrors = gen->GetComputeErrors( myMesh, myMainShape ); // check if there are memory problems for ( CORBA::ULong i = 0; (i < aCompErrors->length()) && !memoryLack; ++i ) @@ -2227,9 +2223,7 @@ void SMESHGUI_BaseComputeOp::evaluateMesh() } SUIT_OverrideCursor aWaitCursor; try { -#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 OCC_CATCH_SIGNALS; -#endif aRes = gen->Evaluate(myMesh, myMainShape); } catch(const SALOME::SALOME_Exception & S_ex){ @@ -2237,9 +2231,7 @@ void SMESHGUI_BaseComputeOp::evaluateMesh() } try { -#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 OCC_CATCH_SIGNALS; -#endif aCompErrors = gen->GetComputeErrors( myMesh, myMainShape ); } catch(const SALOME::SALOME_Exception & S_ex){ diff --git a/src/SMESHGUI/SMESHGUI_Filter.cxx b/src/SMESHGUI/SMESHGUI_Filter.cxx index 05d003387..1222c4b80 100755 --- a/src/SMESHGUI/SMESHGUI_Filter.cxx +++ b/src/SMESHGUI/SMESHGUI_Filter.cxx @@ -33,13 +33,13 @@ #include #include -OCCT_IMPLEMENT_STANDARD_RTTIEXT(SMESHGUI_Filter, VTKViewer_Filter) -OCCT_IMPLEMENT_STANDARD_RTTIEXT(SMESHGUI_PredicateFilter, SMESHGUI_Filter) -OCCT_IMPLEMENT_STANDARD_RTTIEXT(SMESHGUI_QuadrangleFilter, SMESHGUI_Filter) -OCCT_IMPLEMENT_STANDARD_RTTIEXT(SMESHGUI_TriangleFilter, SMESHGUI_Filter) -OCCT_IMPLEMENT_STANDARD_RTTIEXT(SMESHGUI_FacesFilter, SMESHGUI_Filter) -OCCT_IMPLEMENT_STANDARD_RTTIEXT(SMESHGUI_VolumesFilter, SMESHGUI_Filter) -OCCT_IMPLEMENT_STANDARD_RTTIEXT(SMESHGUI_VolumeShapeFilter, SMESHGUI_Filter) +IMPLEMENT_STANDARD_RTTIEXT(SMESHGUI_Filter, VTKViewer_Filter) +IMPLEMENT_STANDARD_RTTIEXT(SMESHGUI_PredicateFilter, SMESHGUI_Filter) +IMPLEMENT_STANDARD_RTTIEXT(SMESHGUI_QuadrangleFilter, SMESHGUI_Filter) +IMPLEMENT_STANDARD_RTTIEXT(SMESHGUI_TriangleFilter, SMESHGUI_Filter) +IMPLEMENT_STANDARD_RTTIEXT(SMESHGUI_FacesFilter, SMESHGUI_Filter) +IMPLEMENT_STANDARD_RTTIEXT(SMESHGUI_VolumesFilter, SMESHGUI_Filter) +IMPLEMENT_STANDARD_RTTIEXT(SMESHGUI_VolumeShapeFilter, SMESHGUI_Filter) /* Class : SMESHGUI_PredicateFilter diff --git a/src/SMESHGUI/SMESHGUI_Filter.h b/src/SMESHGUI/SMESHGUI_Filter.h index ec36f46d6..08a43c767 100755 --- a/src/SMESHGUI/SMESHGUI_Filter.h +++ b/src/SMESHGUI/SMESHGUI_Filter.h @@ -70,7 +70,7 @@ public: Standard_EXPORT virtual bool IsObjValid( const int ) const = 0; public: - OCCT_DEFINE_STANDARD_RTTIEXT(SMESHGUI_Filter,VTKViewer_Filter) + DEFINE_STANDARD_RTTIEXT(SMESHGUI_Filter,VTKViewer_Filter) }; /* @@ -99,7 +99,7 @@ private: SMESH::Predicate_var myPred; public: - OCCT_DEFINE_STANDARD_RTTIEXT(SMESHGUI_PredicateFilter,SMESHGUI_Filter) + DEFINE_STANDARD_RTTIEXT(SMESHGUI_PredicateFilter,SMESHGUI_Filter) }; /* @@ -121,7 +121,7 @@ public: Standard_EXPORT virtual bool IsNodeFilter() const; public: - OCCT_DEFINE_STANDARD_RTTIEXT(SMESHGUI_QuadrangleFilter,SMESHGUI_Filter) + DEFINE_STANDARD_RTTIEXT(SMESHGUI_QuadrangleFilter,SMESHGUI_Filter) }; /* @@ -143,7 +143,7 @@ public: Standard_EXPORT virtual bool IsNodeFilter() const; public: - OCCT_DEFINE_STANDARD_RTTIEXT(SMESHGUI_TriangleFilter,SMESHGUI_Filter) + DEFINE_STANDARD_RTTIEXT(SMESHGUI_TriangleFilter,SMESHGUI_Filter) }; /* @@ -165,7 +165,7 @@ public: Standard_EXPORT virtual bool IsNodeFilter() const; public: - OCCT_DEFINE_STANDARD_RTTIEXT(SMESHGUI_FacesFilter,SMESHGUI_Filter) + DEFINE_STANDARD_RTTIEXT(SMESHGUI_FacesFilter,SMESHGUI_Filter) }; /* @@ -187,7 +187,7 @@ public: Standard_EXPORT virtual bool IsNodeFilter() const; public: - OCCT_DEFINE_STANDARD_RTTIEXT(SMESHGUI_VolumesFilter,SMESHGUI_Filter) + DEFINE_STANDARD_RTTIEXT(SMESHGUI_VolumesFilter,SMESHGUI_Filter) }; /* @@ -211,7 +211,7 @@ public: Standard_EXPORT static int GetId( SMDSAbs_GeometryType geom ); public: - OCCT_DEFINE_STANDARD_RTTIEXT(SMESHGUI_VolumeShapeFilter,SMESHGUI_Filter) + DEFINE_STANDARD_RTTIEXT(SMESHGUI_VolumeShapeFilter,SMESHGUI_Filter) }; #endif // SMESHGUI_FILTER_H diff --git a/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx b/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx index 021e003b9..def3ff557 100644 --- a/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx +++ b/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx @@ -63,16 +63,20 @@ #endif #ifdef WIN32 -#define LibHandle HMODULE -#define LoadLib( name ) LoadLibrary( name ) -#define GetProc GetProcAddress -#define UnLoadLib( handle ) FreeLibrary( handle ); -#else -#define LibHandle void* -#define LoadLib( name ) dlopen( name, RTLD_LAZY | RTLD_GLOBAL ) -#define GetProc dlsym -#define UnLoadLib( handle ) dlclose( handle ); -#endif + #define LibHandle HMODULE + #define LoadLib( name ) LoadLibrary( name ) + #define GetProc GetProcAddress + #define UnLoadLib( handle ) FreeLibrary( handle ); +#else // WIN32 + #define LibHandle void* + #ifdef DYNLOAD_LOCAL + #define LoadLib( name ) dlopen( name, RTLD_LAZY | RTLD_LOCAL ) + #else // DYNLOAD_LOCAL + #define LoadLib( name ) dlopen( name, RTLD_LAZY | RTLD_GLOBAL ) + #endif // DYNLOAD_LOCAL + #define GetProc dlsym + #define UnLoadLib( handle ) dlclose( handle ); +#endif // WIN32 #ifdef _DEBUG_ static int MYDEBUG = 0; diff --git a/src/SMESHGUI/SMESH_msg_fr.ts b/src/SMESHGUI/SMESH_msg_fr.ts index 72358f7d0..2f5882e99 100755 --- a/src/SMESHGUI/SMESH_msg_fr.ts +++ b/src/SMESHGUI/SMESH_msg_fr.ts @@ -39,6 +39,10 @@ CGNS_FILES_FILTER Fichiers CGNS + + CGNS_EXPORT_ELEMS_BY_TYPE + Groupe les éléments par type + GMF_ASCII_FILES_FILTER Fichiers GMF ASCII @@ -384,6 +388,22 @@ MEN_DEL_GROUP Supprimer les groupes et leur contenu + + MEN_ADD_TO_GROUP + Ajoute dans le groupe + + + MEN_REMOVE_FROM_GROUP + Supprime du groupe + + + STB_ADD_TO_GROUP + Ajoute dans le groupe les éléments sélectionnés + + + STB_REMOVE_FROM_GROUP + Supprime du groupe les éléments sélectionnés + MEN_FACE_ORIENTATION Orientation des faces @@ -5337,6 +5357,10 @@ Choisissez un groupe et essayez de nouveau SEPARATE_CORNERS_AND_MEDIUM Pas de fusion du coin et des noeuds moyens des cellules quadratiques + + AVOID_MAKING_HOLES + Evite de créer des trous + KEEP_NODES Les noeuds à conserver pendant la fusion @@ -7011,6 +7035,14 @@ Il y a trop peu de points dans le fichier SMESH_CREATE_GROUP_FROM_GEOM Créer des groupes à partir de la géométrie + + ELEMENTS + Eléments + + + ELEMENTS_TOOLTIP + Pas d'éléments 0D + SMESHGUI_MeshOrderDlg @@ -7441,6 +7473,10 @@ en raison de leurs types incompatibles: ELEM_MODE Elément + + SHOW_IDS + Montre les IDs + BUT_DUMP_MESH &Dump diff --git a/src/SMESHGUI/SMESH_msg_ja.ts b/src/SMESHGUI/SMESH_msg_ja.ts index 5aa45dcb0..77c673410 100644 --- a/src/SMESHGUI/SMESH_msg_ja.ts +++ b/src/SMESHGUI/SMESH_msg_ja.ts @@ -39,6 +39,10 @@ CGNS_FILES_FILTER CGNS ファイル + + CGNS_EXPORT_ELEMS_BY_TYPE + タイプで要素をグループ化 + GMF_ASCII_FILES_FILTER GMFアスキーファイル @@ -383,6 +387,22 @@ MEN_DEL_GROUP グループとその内容を削除します。 + + MEN_ADD_TO_GROUP + グループに追加 + + + MEN_REMOVE_FROM_GROUP + グループから削除 + + + STB_ADD_TO_GROUP + 選択要素をグループに追加 + + + STB_REMOVE_FROM_GROUP + 選択要素をグループから削除 + MEN_FACE_ORIENTATION フェースの向き @@ -871,6 +891,10 @@ MEN_QUADRATIC_PENTAHEDRON 二次ウェッジ + + MEN_BIQUADRATIC_PENTAHEDRON + 4次五面体 + MEN_QUADRATIC_PYRAMID 四角錐 @@ -1343,6 +1367,10 @@ SMESH_ADD_QUADRATIC_PENTAHEDRON_TITLE 二次くさびを追加します。 + + SMESH_ADD_BIQUADRATIC_PENTAHEDRON_TITLE + 4次五面体の追加 + SMESH_ADD_QUADRATIC_PYRAMID_TITLE 四角錐を追加します。 @@ -2479,10 +2507,18 @@ SMESH_QUADRATIC_PENTAHEDRON 二次ウェッジ + + SMESH_BIQUADRATIC_PENTAHEDRON + 4次五面体 + SMESH_QUADRATIC_PENTAHEDRONS 二次ウェッジ + + SMESH_BIQUADRATIC_PENTAHEDRONS + 4次五面体 + SMESH_QUADRATIC_PYRAMID 四角錐 @@ -3327,6 +3363,10 @@ STB_QUADRATIC_PENTAHEDRON 二次ウェッジ + + STB_BIQUADRATIC_PENTAHEDRON + 4次五面体 + STB_QUADRATIC_PYRAMID 四角錐 @@ -4003,6 +4043,10 @@ TOP_QUADRATIC_PENTAHEDRON 二次ウェッジ + + TOP_BIQUADRATIC_PENTAHEDRON + 4次五面体 + TOP_QUADRATIC_PYRAMID 四角錐 @@ -4831,6 +4875,10 @@ SMESH_ADD_QUADRATIC_PENTAHEDRON 二次くさびを追加します。 + + SMESH_ADD_BIQUADRATIC_PENTAHEDRON + 4次五面体の追加 + SMESH_ADD_QUADRATIC_PYRAMID 二次ピラミッドの追加 @@ -5252,6 +5300,10 @@ SEPARATE_CORNERS_AND_MEDIUM 2次セルのコーナ節点と中間節点をマージできません + + AVOID_MAKING_HOLES + 穴作成の回避 + KEEP_NODES 維持節点 @@ -5848,108 +5900,108 @@ エンティティの種類 - ENTITY_TYPE_0 - NONE + ENTITY_TYPE_0 + POINT1 - ENTITY_TYPE_1 - POINT1 + ENTITY_TYPE_1 + POINT1 - ENTITY_TYPE_2 - SEG2 + ENTITY_TYPE_2 + SEG2 - ENTITY_TYPE_3 - SEG3 + ENTITY_TYPE_3 + SEG3 - ENTITY_TYPE_4 - TRIA3 + ENTITY_TYPE_4 + TRIA3 - ENTITY_TYPE_5 - TRIA6 + ENTITY_TYPE_5 + TRIA6 - ENTITY_TYPE_6 - TRIA7 + ENTITY_TYPE_6 + QUAD4 - ENTITY_TYPE_7 - QUAD4 + ENTITY_TYPE_7 + QUAD8 - ENTITY_TYPE_8 - QUAD8 + ENTITY_TYPE_8 + QUAD9 - ENTITY_TYPE_9 - QUAD9 + ENTITY_TYPE_9 + TETRA4 - ENTITY_TYPE_10 - POLYGON + ENTITY_TYPE_10 + TETRA10 - ENTITY_TYPE_11 - QPOLYGON + ENTITY_TYPE_11 + PYRA5 - ENTITY_TYPE_12 - TETRA4 + ENTITY_TYPE_12 + PYRA13 - ENTITY_TYPE_13 - TETRA10 + ENTITY_TYPE_13 + PENTA6 - ENTITY_TYPE_14 - PYRA5 + ENTITY_TYPE_14 + PENTA15 - ENTITY_TYPE_15 - PYRA13 + ENTITY_TYPE_15 + HEXA8 - ENTITY_TYPE_16 - HEXA8 + ENTITY_TYPE_16 + HEXA20 - ENTITY_TYPE_17 - HEXA20 + ENTITY_TYPE_17 + HEXA27 - ENTITY_TYPE_18 - HEXA27 + ENTITY_TYPE_18 + OCTA12 - ENTITY_TYPE_19 - PENTA6 + ENTITY_TYPE_19 + ポリゴン - ENTITY_TYPE_20 - PENTA15 + ENTITY_TYPE_20 + POLYEDRE - ENTITY_TYPE_21 - PENTA18 + ENTITY_TYPE_21 + [なし] - ENTITY_TYPE_22 - OCTA12 + ENTITY_TYPE_22 + ボール - ENTITY_TYPE_23 - POLYEDRE + ENTITY_TYPE_23 + QPOLYEDRE - ENTITY_TYPE_24 - QPOLYEDRE + ENTITY_TYPE_24 + ボール - ENTITY_TYPE_25 - BALL + ENTITY_TYPE_25 + ボール GEOM_TYPE @@ -6878,6 +6930,14 @@ SMESH_CREATE_GROUP_FROM_GEOM ジオメトリからグループを作成 + + ELEMENTS + 要素 + + + ELEMENTS_TOOLTIP + 0D要素がない + SMESHGUI_MeshOrderDlg @@ -7306,6 +7366,10 @@ ELEM_MODE 要素 + + SHOW_IDS + IDの表示 + BUT_DUMP_MESH 書き出し(&D) diff --git a/src/SMESHUtils/SMESH_TryCatch.hxx b/src/SMESHUtils/SMESH_TryCatch.hxx index 05d00a1b5..44047a694 100644 --- a/src/SMESHUtils/SMESH_TryCatch.hxx +++ b/src/SMESHUtils/SMESH_TryCatch.hxx @@ -33,7 +33,6 @@ #include #include #include -#include #include // IMPORTANT: include this file _after_ OCC ones, else OCC_CATCH_SIGNALS can be undefined! diff --git a/src/SMESH_I/SMESH_2smeshpy.cxx b/src/SMESH_I/SMESH_2smeshpy.cxx index 3c70da492..b8f06d7a4 100644 --- a/src/SMESH_I/SMESH_2smeshpy.cxx +++ b/src/SMESH_I/SMESH_2smeshpy.cxx @@ -50,22 +50,22 @@ #include #endif -OCCT_IMPLEMENT_STANDARD_RTTIEXT(_pyObject ,Standard_Transient); -OCCT_IMPLEMENT_STANDARD_RTTIEXT(_pyCommand ,Standard_Transient); -OCCT_IMPLEMENT_STANDARD_RTTIEXT(_pyHypothesisReader,Standard_Transient); -OCCT_IMPLEMENT_STANDARD_RTTIEXT(_pyGen ,_pyObject); -OCCT_IMPLEMENT_STANDARD_RTTIEXT(_pyMesh ,_pyObject); -OCCT_IMPLEMENT_STANDARD_RTTIEXT(_pySubMesh ,_pyObject); -OCCT_IMPLEMENT_STANDARD_RTTIEXT(_pyMeshEditor ,_pyObject); -OCCT_IMPLEMENT_STANDARD_RTTIEXT(_pyHypothesis ,_pyObject); -OCCT_IMPLEMENT_STANDARD_RTTIEXT(_pySelfEraser ,_pyObject); -OCCT_IMPLEMENT_STANDARD_RTTIEXT(_pyGroup ,_pyObject); -OCCT_IMPLEMENT_STANDARD_RTTIEXT(_pyFilter ,_pyObject); -OCCT_IMPLEMENT_STANDARD_RTTIEXT(_pyAlgorithm ,_pyHypothesis); -OCCT_IMPLEMENT_STANDARD_RTTIEXT(_pyComplexParamHypo,_pyHypothesis); -OCCT_IMPLEMENT_STANDARD_RTTIEXT(_pyNumberOfSegmentsHyp,_pyHypothesis); -OCCT_IMPLEMENT_STANDARD_RTTIEXT(_pyLayerDistributionHypo,_pyHypothesis); -OCCT_IMPLEMENT_STANDARD_RTTIEXT(_pySegmentLengthAroundVertexHyp,_pyHypothesis); +IMPLEMENT_STANDARD_RTTIEXT(_pyObject ,Standard_Transient); +IMPLEMENT_STANDARD_RTTIEXT(_pyCommand ,Standard_Transient); +IMPLEMENT_STANDARD_RTTIEXT(_pyHypothesisReader,Standard_Transient); +IMPLEMENT_STANDARD_RTTIEXT(_pyGen ,_pyObject); +IMPLEMENT_STANDARD_RTTIEXT(_pyMesh ,_pyObject); +IMPLEMENT_STANDARD_RTTIEXT(_pySubMesh ,_pyObject); +IMPLEMENT_STANDARD_RTTIEXT(_pyMeshEditor ,_pyObject); +IMPLEMENT_STANDARD_RTTIEXT(_pyHypothesis ,_pyObject); +IMPLEMENT_STANDARD_RTTIEXT(_pySelfEraser ,_pyObject); +IMPLEMENT_STANDARD_RTTIEXT(_pyGroup ,_pyObject); +IMPLEMENT_STANDARD_RTTIEXT(_pyFilter ,_pyObject); +IMPLEMENT_STANDARD_RTTIEXT(_pyAlgorithm ,_pyHypothesis); +IMPLEMENT_STANDARD_RTTIEXT(_pyComplexParamHypo,_pyHypothesis); +IMPLEMENT_STANDARD_RTTIEXT(_pyNumberOfSegmentsHyp,_pyHypothesis); +IMPLEMENT_STANDARD_RTTIEXT(_pyLayerDistributionHypo,_pyHypothesis); +IMPLEMENT_STANDARD_RTTIEXT(_pySegmentLengthAroundVertexHyp,_pyHypothesis); using namespace std; using SMESH::TPythonDump; diff --git a/src/SMESH_I/SMESH_2smeshpy.hxx b/src/SMESH_I/SMESH_2smeshpy.hxx index 6fd991533..4531a38ed 100644 --- a/src/SMESH_I/SMESH_2smeshpy.hxx +++ b/src/SMESH_I/SMESH_2smeshpy.hxx @@ -40,8 +40,6 @@ #include #include -#include - #include #include CORBA_CLIENT_HEADER(SALOMEDS) @@ -160,7 +158,7 @@ public: bool AddAccessorMethod( _pyID theObjectID, const char* theAcsMethod ); - OCCT_DEFINE_STANDARD_RTTIEXT(_pyCommand,Standard_Transient) + DEFINE_STANDARD_RTTIEXT(_pyCommand,Standard_Transient) }; // ------------------------------------------------------------------------------------- @@ -200,7 +198,7 @@ public: virtual void ClearCommands(); virtual void Free() {} - OCCT_DEFINE_STANDARD_RTTIEXT(_pyObject,Standard_Transient) + DEFINE_STANDARD_RTTIEXT(_pyObject,Standard_Transient) }; // ------------------------------------------------------------------------------------- @@ -331,7 +329,7 @@ private: std::map< _AString, ExportedMeshData > myFile2ExportedMesh; Handle( _pyHypothesisReader ) myHypReader; - OCCT_DEFINE_STANDARD_RTTIEXT(_pyGen,_pyObject) + DEFINE_STANDARD_RTTIEXT(_pyGen,_pyObject) }; // ------------------------------------------------------------------------------------- @@ -372,7 +370,7 @@ private: static void AddMeshAccess( const Handle(_pyCommand)& theCommand ) { theCommand->SetObject( theCommand->GetObject() + "." _pyMesh_ACCESS_METHOD ); } - OCCT_DEFINE_STANDARD_RTTIEXT(_pyMesh,_pyObject) + DEFINE_STANDARD_RTTIEXT(_pyMesh,_pyObject) }; #undef _pyMesh_ACCESS_METHOD @@ -392,7 +390,7 @@ public: virtual void Flush() {} virtual bool CanClear(); - OCCT_DEFINE_STANDARD_RTTIEXT(_pyMesh,_pyObject) + DEFINE_STANDARD_RTTIEXT(_pyMesh,_pyObject) }; // ------------------------------------------------------------------------------------- @@ -476,7 +474,7 @@ public: //void ComputeSaved ( const Handle(_pyCommand)& theComputeCommand ); - OCCT_DEFINE_STANDARD_RTTIEXT(_pyHypothesis,_pyObject) + DEFINE_STANDARD_RTTIEXT(_pyHypothesis,_pyObject) }; // ------------------------------------------------------------------------------------- @@ -493,7 +491,7 @@ public: virtual const char* AccessorMethod() const { return "GetAlgorithm()"; } virtual bool IsWrappable(const _pyID& theMesh) { return !myIsWrapped; } - OCCT_DEFINE_STANDARD_RTTIEXT(_pyAlgorithm,_pyHypothesis) + DEFINE_STANDARD_RTTIEXT(_pyAlgorithm,_pyHypothesis) }; // ------------------------------------------------------------------------------------- @@ -508,7 +506,7 @@ public: virtual void Process( const Handle(_pyCommand)& theCommand); virtual void Flush(); - OCCT_DEFINE_STANDARD_RTTIEXT(_pyComplexParamHypo,_pyHypothesis) + DEFINE_STANDARD_RTTIEXT(_pyComplexParamHypo,_pyHypothesis) }; DEFINE_STANDARD_HANDLE (_pyComplexParamHypo, _pyHypothesis); @@ -530,7 +528,7 @@ public: const _pyID& theMesh); virtual void Free() { my1dHyp.Nullify(); } - OCCT_DEFINE_STANDARD_RTTIEXT(_pyLayerDistributionHypo,_pyHypothesis) + DEFINE_STANDARD_RTTIEXT(_pyLayerDistributionHypo,_pyHypothesis) }; DEFINE_STANDARD_HANDLE (_pyLayerDistributionHypo, _pyHypothesis); @@ -547,7 +545,7 @@ public: const _pyID& theMesh); void Flush(); - OCCT_DEFINE_STANDARD_RTTIEXT(_pyNumberOfSegmentsHyp,_pyHypothesis) + DEFINE_STANDARD_RTTIEXT(_pyNumberOfSegmentsHyp,_pyHypothesis) }; DEFINE_STANDARD_HANDLE (_pyNumberOfSegmentsHyp, _pyHypothesis); @@ -562,7 +560,7 @@ public: _pySegmentLengthAroundVertexHyp(const Handle(_pyCommand)& theCrCmd): _pyHypothesis(theCrCmd) {} virtual bool Addition2Creation( const Handle(_pyCommand)& theAdditionCmd, const _pyID& theMesh); - OCCT_DEFINE_STANDARD_RTTIEXT(_pySegmentLengthAroundVertexHyp,_pyHypothesis) + DEFINE_STANDARD_RTTIEXT(_pySegmentLengthAroundVertexHyp,_pyHypothesis) }; DEFINE_STANDARD_HANDLE (_pySegmentLengthAroundVertexHyp, _pyHypothesis); @@ -581,7 +579,7 @@ public: virtual bool CanClear(); static bool IsAliveCmd( const Handle(_pyCommand)& theCmd ); - OCCT_DEFINE_STANDARD_RTTIEXT(_pySelfEraser,_pyObject) + DEFINE_STANDARD_RTTIEXT(_pySelfEraser,_pyObject) }; DEFINE_STANDARD_HANDLE (_pySelfEraser, _pyObject); @@ -603,7 +601,7 @@ public: void SetCreator( const Handle(_pyObject)& theCreator ) { myCreator = theCreator; } static bool CanBeArgOfMethod(const _AString& theMethodName); - OCCT_DEFINE_STANDARD_RTTIEXT(_pySubMesh,_pyObject) + DEFINE_STANDARD_RTTIEXT(_pySubMesh,_pyObject) }; // ------------------------------------------------------------------------------------- /*! @@ -623,7 +621,7 @@ public: //virtual void Free() { myUsers.clear(); } const _pyID& GetNewID() const { return myNewID; } - OCCT_DEFINE_STANDARD_RTTIEXT(_pyFilter,_pyObject) + DEFINE_STANDARD_RTTIEXT(_pyFilter,_pyObject) }; DEFINE_STANDARD_HANDLE (_pyFilter, _pyObject); @@ -644,7 +642,7 @@ public: virtual bool CanClear(); void RemovedWithContents(); - OCCT_DEFINE_STANDARD_RTTIEXT(_pyGroup,_pySubMesh) + DEFINE_STANDARD_RTTIEXT(_pyGroup,_pySubMesh) }; // ------------------------------------------------------------------------------------- @@ -659,7 +657,7 @@ public: _pyHypothesisReader(); Handle(_pyHypothesis) GetHypothesis(const _AString& hypType, const Handle(_pyCommand)& creationCmd) const; - OCCT_DEFINE_STANDARD_RTTIEXT(_pyHypothesisReader,Standard_Transient) + DEFINE_STANDARD_RTTIEXT(_pyHypothesisReader,Standard_Transient) }; #endif diff --git a/src/SMESH_I/SMESH_DumpPython.cxx b/src/SMESH_I/SMESH_DumpPython.cxx index 878b152f4..966fa7b0f 100644 --- a/src/SMESH_I/SMESH_DumpPython.cxx +++ b/src/SMESH_I/SMESH_DumpPython.cxx @@ -496,6 +496,17 @@ namespace SMESH switch (theVersion) { case SMESH::MED_V2_1: myStream << "SMESH.MED_V2_1"; break; case SMESH::MED_V2_2: myStream << "SMESH.MED_V2_2"; break; + case SMESH::MED_LATEST: myStream << "SMESH.MED_LATEST"; break; + case SMESH::MED_MINOR_0: myStream << "SMESH.MED_MINOR_0"; break; + case SMESH::MED_MINOR_1: myStream << "SMESH.MED_MINOR_1"; break; + case SMESH::MED_MINOR_2: myStream << "SMESH.MED_MINOR_2"; break; + case SMESH::MED_MINOR_3: myStream << "SMESH.MED_MINOR_3"; break; + case SMESH::MED_MINOR_4: myStream << "SMESH.MED_MINOR_4"; break; + case SMESH::MED_MINOR_5: myStream << "SMESH.MED_MINOR_5"; break; + case SMESH::MED_MINOR_6: myStream << "SMESH.MED_MINOR_6"; break; + case SMESH::MED_MINOR_7: myStream << "SMESH.MED_MINOR_7"; break; + case SMESH::MED_MINOR_8: myStream << "SMESH.MED_MINOR_8"; break; + case SMESH::MED_MINOR_9: myStream << "SMESH.MED_MINOR_9"; break; default: myStream << theVersion; } return *this; diff --git a/src/SMESH_I/SMESH_Filter_i.cxx b/src/SMESH_I/SMESH_Filter_i.cxx index 2ec349564..c62297be8 100644 --- a/src/SMESH_I/SMESH_Filter_i.cxx +++ b/src/SMESH_I/SMESH_Filter_i.cxx @@ -40,8 +40,6 @@ #include #include -#include - #include #include #include @@ -3969,16 +3967,6 @@ CORBA::Boolean FilterLibrary_i::Save() if ( myFileName == 0 || strlen( myFileName ) == 0 ) return false; -#if OCC_VERSION_MAJOR < 7 - FILE* aOutFile = fopen( myFileName, "wt" ); - if ( !aOutFile ) - return false; - - LDOM_XmlWriter aWriter( aOutFile ); - aWriter.SetIndentation( 2 ); - aWriter << myDoc; - fclose( aOutFile ); -#else std::filebuf fb; fb.open( myFileName, std::ios::out ); @@ -3988,7 +3976,6 @@ CORBA::Boolean FilterLibrary_i::Save() aWriter.SetIndentation( 2 ); aWriter.Write( os, myDoc ); fb.close(); -#endif TPythonDump()< #include #include -#include #include #include @@ -76,15 +75,8 @@ #include #include -#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 -#define NO_CAS_CATCH -#endif - #include - -#ifdef NO_CAS_CATCH #include -#endif #include #include @@ -3890,7 +3882,6 @@ SMESH_MeshEditor_i::scale(SMESH::SMESH_IDSource_ptr theObject, }; gp_Trsf aTrsf; -#if OCC_VERSION_LARGE > 0x06070100 // fight against orthogonalization // aTrsf.SetValues( S[0], 0, 0, thePoint.x * (1-S[0]), // 0, S[1], 0, thePoint.y * (1-S[1]), @@ -3903,13 +3894,6 @@ SMESH_MeshEditor_i::scale(SMESH::SMESH_IDSource_ptr theObject, thePoint.z * (1-S[2])); M.SetDiagonal( S[0], S[1], S[2] ); -#else - double tol = std::numeric_limits::max(); - aTrsf.SetValues( S[0], 0, 0, thePoint.x * (1-S[0]), - 0, S[1], 0, thePoint.y * (1-S[1]), - 0, 0, S[2], thePoint.z * (1-S[2]), tol, tol); -#endif - TIDSortedElemSet copyElements; TIDSortedElemSet* workElements = &elements; if ( myIsPreviewMode ) diff --git a/src/SMESH_I/SMESH_Mesh_i.cxx b/src/SMESH_I/SMESH_Mesh_i.cxx index b16d38f26..b598cc0eb 100644 --- a/src/SMESH_I/SMESH_Mesh_i.cxx +++ b/src/SMESH_I/SMESH_Mesh_i.cxx @@ -3022,6 +3022,7 @@ void SMESH_Mesh_i::ExportToMEDX (const char* file, CORBA::Boolean autoDimension) throw(SALOME::SALOME_Exception) { + //MESSAGE("SMESH::MED_VERSION:"<< theVersion); SMESH_TRY; if ( _preMeshInfo ) _preMeshInfo->FullLoadFromFile(); @@ -3048,6 +3049,7 @@ void SMESH_Mesh_i::ExportToMED (const char* file, SMESH::MED_VERSION theVersion) throw(SALOME::SALOME_Exception) { + //MESSAGE("SMESH::MED_VERSION:"<< theVersion); ExportToMEDX(file,auto_groups,theVersion,true); } @@ -3061,7 +3063,8 @@ void SMESH_Mesh_i::ExportMED (const char* file, CORBA::Boolean auto_groups) throw(SALOME::SALOME_Exception) { - ExportToMEDX(file,auto_groups,SMESH::MED_V2_2,true); + //MESSAGE("SMESH::MED_VERSION:"<< SMESH::MED_LATEST); + ExportToMEDX(file,auto_groups,SMESH::MED_LATEST,true); } //================================================================================ diff --git a/src/SMESH_I/SMESH_Pattern_i.cxx b/src/SMESH_I/SMESH_Pattern_i.cxx index ca5bcd0d2..70dab5de7 100644 --- a/src/SMESH_I/SMESH_Pattern_i.cxx +++ b/src/SMESH_I/SMESH_Pattern_i.cxx @@ -295,9 +295,7 @@ SMESH::point_array* } bool ok = false; try { -#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 OCC_CATCH_SIGNALS; -#endif ok = myPattern.Apply( aMesh, fset, theNodeIndexOnKeyPoint1, theReverse ); } catch (Standard_Failure& exc) { diff --git a/src/SMESH_SWIG/smeshBuilder.py b/src/SMESH_SWIG/smeshBuilder.py index 3d4dcf599..6e0f59579 100644 --- a/src/SMESH_SWIG/smeshBuilder.py +++ b/src/SMESH_SWIG/smeshBuilder.py @@ -1795,9 +1795,14 @@ class Mesh: # @param auto_groups boolean parameter for creating/not creating # the groups Group_On_All_Nodes, Group_On_All_Faces, ... ; # the typical use is auto_groups=False. - # @param version MED format version (MED_V2_1 or MED_V2_2, - # the latter meaning any current version). The parameter is - # obsolete since MED_V2_1 is no longer supported. + # @param version MED format version + # - MED_V2_1 is obsolete. + # - MED_V2_2 means current version (kept for compatibility reasons) + # - MED_LATEST means current version. + # - MED_MINOR_x where x from 0 to 9 indicates the minor version of MED + # to use for writing MED files, for backward compatibility : + # for instance, with SALOME 8.4 use MED 3.2 (minor=2) instead of 3.3, + # to allow the file to be read with SALOME 8.3. # @param overwrite boolean parameter for overwriting/not overwriting the file # @param meshPart a part of mesh (group, sub-mesh) to export instead of the mesh # @param autoDimension if @c True (default), a space dimension of a MED mesh can be either @@ -1813,7 +1818,7 @@ class Mesh: # - 'f' stands for "_faces _" field; # - 's' stands for "_solids _" field. # @ingroup l2_impexp - def ExportMED(self, f, auto_groups=0, version=MED_V2_2, + def ExportMED(self, f, auto_groups=0, version=MED_LATEST, overwrite=1, meshPart=None, autoDimension=True, fields=[], geomAssocFields=''): if meshPart or fields or geomAssocFields: unRegister = genObjUnRegister() @@ -1917,9 +1922,14 @@ class Mesh: # Export the mesh in a file in MED format # allowing to overwrite the file if it exists or add the exported data to its contents # @param f the file name - # @param version MED format version (MED_V2_1 or MED_V2_2, - # the latter meaning any current version). The parameter is - # obsolete since MED_V2_1 is no longer supported. + # @param version MED format version: + # - MED_V2_1 is obsolete. + # - MED_V2_2 means current version (kept for compatibility reasons) + # - MED_LATEST means current version. + # - MED_MINOR_x where x from 0 to 9 indicates the minor version of MED + # to use for writing MED files, for backward compatibility : + # for instance, with SALOME 8.4 use MED 3.2 (minor=2) instead of 3.3, + # to allow the file to be read with SALOME 8.3. # @param opt boolean parameter for creating/not creating # the groups Group_On_All_Nodes, Group_On_All_Faces, ... # @param overwrite boolean parameter for overwriting/not overwriting the file @@ -1929,7 +1939,7 @@ class Mesh: # - 3D in the rest cases.
# If @a autoDimension is @c False, the space dimension is always 3. # @ingroup l2_impexp - def ExportToMED(self, f, version=MED_V2_2, opt=0, overwrite=1, autoDimension=True): + def ExportToMED(self, f, version=MED_LATEST, opt=0, overwrite=1, autoDimension=True): self.mesh.ExportToMEDX(f, opt, version, overwrite, autoDimension) # Operations with groups: diff --git a/src/StdMeshers/StdMeshers_Cartesian_3D.cxx b/src/StdMeshers/StdMeshers_Cartesian_3D.cxx index 0b92acc5f..002f20961 100644 --- a/src/StdMeshers/StdMeshers_Cartesian_3D.cxx +++ b/src/StdMeshers/StdMeshers_Cartesian_3D.cxx @@ -36,7 +36,6 @@ #include #include -#include #include @@ -1371,11 +1370,7 @@ namespace } if ( surf->IsKind( STANDARD_TYPE(Geom_BSplineSurface )) || surf->IsKind( STANDARD_TYPE(Geom_BezierSurface ))) -#if OCC_VERSION_MAJOR < 7 - if ( !noSafeTShapes.insert((const Standard_Transient*) _face.TShape() ).second ) -#else if ( !noSafeTShapes.insert( _face.TShape().get() ).second ) -#endif isSafe = false; double f, l; @@ -1415,11 +1410,7 @@ namespace edgeIsSafe = false; } } -#if OCC_VERSION_MAJOR < 7 - if ( !edgeIsSafe && !noSafeTShapes.insert((const Standard_Transient*) e.TShape() ).second ) -#else if ( !edgeIsSafe && !noSafeTShapes.insert( e.TShape().get() ).second ) -#endif isSafe = false; } return isSafe; diff --git a/src/StdMeshers/StdMeshers_Distribution.cxx b/src/StdMeshers/StdMeshers_Distribution.cxx index f1f26aebf..aeef4e1ef 100644 --- a/src/StdMeshers/StdMeshers_Distribution.cxx +++ b/src/StdMeshers/StdMeshers_Distribution.cxx @@ -31,16 +31,9 @@ #include #include -#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 -#define NO_CAS_CATCH -#endif - #include #include - -#ifdef NO_CAS_CATCH #include -#endif using namespace std; @@ -60,12 +53,9 @@ bool Function::value( const double, double& f ) const bool ok = true; if (myConv == 0) { try { -#ifdef NO_CAS_CATCH OCC_CATCH_SIGNALS; -#endif f = pow( 10., f ); } catch(Standard_Failure) { - Handle(Standard_Failure) aFail = Standard_Failure::Caught(); f = 0.0; ok = false; } @@ -192,13 +182,10 @@ FunctionExpr::FunctionExpr( const char* str, const int conv ) { bool ok = true; try { -#ifdef NO_CAS_CATCH OCC_CATCH_SIGNALS; -#endif myExpr = ExprIntrp_GenExp::Create(); myExpr->Process( ( Standard_CString )str ); } catch(Standard_Failure) { - Handle(Standard_Failure) aFail = Standard_Failure::Caught(); ok = false; } @@ -228,12 +215,9 @@ bool FunctionExpr::value( const double t, double& f ) const ( ( TColStd_Array1OfReal& )myValues ).ChangeValue( 1 ) = t; bool ok = true; try { -#ifdef NO_CAS_CATCH OCC_CATCH_SIGNALS; -#endif f = myExpr->Expression()->Evaluate( myVars, myValues ); } catch(Standard_Failure) { - Handle(Standard_Failure) aFail = Standard_Failure::Caught(); f = 0.0; ok = false; } @@ -246,9 +230,7 @@ double FunctionExpr::integral( const double a, const double b ) const { double res = 0.0; try { -#ifdef NO_CAS_CATCH OCC_CATCH_SIGNALS; -#endif math_GaussSingleIntegration _int ( *static_cast( const_cast (this) ), a, b, 20 ); if( _int.IsDone() ) diff --git a/src/StdMeshers/StdMeshers_NumberOfSegments.cxx b/src/StdMeshers/StdMeshers_NumberOfSegments.cxx index 2ff7274fc..98dac7e84 100644 --- a/src/StdMeshers/StdMeshers_NumberOfSegments.cxx +++ b/src/StdMeshers/StdMeshers_NumberOfSegments.cxx @@ -42,15 +42,8 @@ #include #include -#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 -#define NO_CAS_CATCH -#endif - #include - -#ifdef NO_CAS_CATCH #include -#endif #include @@ -238,13 +231,10 @@ void StdMeshers_NumberOfSegments::SetTableFunction(const vector& table) if( _convMode==0 ) { try { -#ifdef NO_CAS_CATCH OCC_CATCH_SIGNALS; -#endif val = pow( 10.0, val ); } catch(Standard_Failure) { - Handle(Standard_Failure) aFail = Standard_Failure::Caught(); throw SALOME_Exception( LOCALIZED( "invalid value")); return; } @@ -335,13 +325,10 @@ bool process( const TCollection_AsciiString& str, int convMode, bool parsed_ok = true; Handle( ExprIntrp_GenExp ) myExpr; try { -#ifdef NO_CAS_CATCH OCC_CATCH_SIGNALS; -#endif myExpr = ExprIntrp_GenExp::Create(); myExpr->Process( str.ToCString() ); } catch(Standard_Failure) { - Handle(Standard_Failure) aFail = Standard_Failure::Caught(); parsed_ok = false; } diff --git a/src/StdMeshers/StdMeshers_RadialPrism_3D.cxx b/src/StdMeshers/StdMeshers_RadialPrism_3D.cxx index bbf339a8b..23962cba2 100644 --- a/src/StdMeshers/StdMeshers_RadialPrism_3D.cxx +++ b/src/StdMeshers/StdMeshers_RadialPrism_3D.cxx @@ -29,8 +29,6 @@ #include "StdMeshers_RadialPrism_3D.hxx" -#include - #include "StdMeshers_ProjectionUtils.hxx" #include "StdMeshers_NumberOfLayers.hxx" #include "StdMeshers_LayerDistribution.hxx" diff --git a/src/StdMeshersGUI/StdMeshersGUI_DistrPreview.cxx b/src/StdMeshersGUI/StdMeshersGUI_DistrPreview.cxx index 7eb2f3348..f9ad75818 100644 --- a/src/StdMeshersGUI/StdMeshersGUI_DistrPreview.cxx +++ b/src/StdMeshersGUI/StdMeshersGUI_DistrPreview.cxx @@ -37,15 +37,8 @@ #include #include -#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 -#define NO_CAS_CATCH -#endif - #include - -#ifdef NO_CAS_CATCH #include -#endif #ifdef WIN32 # include @@ -356,12 +349,9 @@ void StdMeshersGUI_DistrPreview::update() x = y = 0; try { -#ifdef NO_CAS_CATCH OCC_CATCH_SIGNALS; -#endif replot(); } catch(Standard_Failure) { - Handle(Standard_Failure) aFail = Standard_Failure::Caught(); } } @@ -404,13 +394,10 @@ bool StdMeshersGUI_DistrPreview::init( const QString& str ) Kernel_Utils::Localizer loc; bool parsed_ok = true; try { -#ifdef NO_CAS_CATCH OCC_CATCH_SIGNALS; -#endif myExpr = ExprIntrp_GenExp::Create(); myExpr->Process( ( Standard_CString ) str.toLatin1().data() ); } catch(Standard_Failure) { - Handle(Standard_Failure) aFail = Standard_Failure::Caught(); parsed_ok = false; } @@ -446,12 +433,9 @@ double StdMeshersGUI_DistrPreview::calc( bool& ok ) ok = true; try { -#ifdef NO_CAS_CATCH OCC_CATCH_SIGNALS; -#endif res = myExpr->Expression()->Evaluate( myVars, myValues ); } catch(Standard_Failure) { - Handle(Standard_Failure) aFail = Standard_Failure::Caught(); ok = false; res = 0.0; } @@ -472,16 +456,13 @@ bool StdMeshersGUI_DistrPreview::convert( double& v ) const case EXPONENT: { try { -#ifdef NO_CAS_CATCH OCC_CATCH_SIGNALS; -#endif // in StdMeshers_NumberOfSegments.cc // const double PRECISION = 1e-7; // if(v < -7) v = -7.0; v = pow( 10.0, v ); } catch(Standard_Failure) { - Handle(Standard_Failure) aFail = Standard_Failure::Caught(); v = 0.0; ok = false; } diff --git a/src/Tools/MGCleanerPlug/CMakeLists.txt b/src/Tools/MGCleanerPlug/CMakeLists.txt index 50a2d05c9..71758729d 100644 --- a/src/Tools/MGCleanerPlug/CMakeLists.txt +++ b/src/Tools/MGCleanerPlug/CMakeLists.txt @@ -16,36 +16,41 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + IF(SALOME_BUILD_DOC) ADD_SUBDIRECTORY(doc) ENDIF(SALOME_BUILD_DOC) -INCLUDE(UsePyQt) +IF(SALOME_BUILD_GUI) + INCLUDE(UsePyQt) +ENDIF(SALOME_BUILD_GUI) # --- scripts --- # scripts / static -SET(plugin_SCRIPTS +SET(_plugin_SCRIPTS MGCleanerMonPlugDialog.py MGCleanerMonViewText.py MGCleanerplug_plugin.py ) -# --- resources --- - -# uic files / to be processed by pyuic -SET(_pyuic_files - MGCleanerPlugDialog.ui - MGCleanerViewText.ui -) - -# scripts / pyuic wrappings -PYQT_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_files}) +IF(SALOME_BUILD_GUI) + # uic files / to be processed by pyuic + SET(_pyuic_FILES + MGCleanerPlugDialog.ui + MGCleanerViewText.ui + ) + # scripts / pyuic wrappings + PYQT_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_FILES} TARGET_NAME _target_name_pyuic) +ENDIF(SALOME_BUILD_GUI) # --- rules --- -SALOME_INSTALL_SCRIPTS("${plugin_SCRIPTS}" ${SALOME_SMESH_INSTALL_PLUGINS}) +SALOME_INSTALL_SCRIPTS("${_plugin_SCRIPTS}" ${SALOME_SMESH_INSTALL_PLUGINS}) IF(SALOME_BUILD_GUI) - SALOME_INSTALL_SCRIPTS("${_pyuic_SCRIPTS}" ${SALOME_SMESH_INSTALL_PLUGINS}) -ENDIF(SALOME_BUILD_GUI) \ No newline at end of file + SALOME_INSTALL_SCRIPTS("${_pyuic_SCRIPTS}" ${SALOME_SMESH_INSTALL_PLUGINS} TARGET_NAME _target_name_pyuic_py) + # add dependency of compiled py files on uic files in order + # to avoid races problems when compiling in parallel + ADD_DEPENDENCIES(${_target_name_pyuic_py} ${_target_name_pyuic}) +ENDIF(SALOME_BUILD_GUI) diff --git a/src/Tools/MeshCut/CMakeLists.txt b/src/Tools/MeshCut/CMakeLists.txt index 2125c0be1..44c8cae1c 100644 --- a/src/Tools/MeshCut/CMakeLists.txt +++ b/src/Tools/MeshCut/CMakeLists.txt @@ -38,7 +38,7 @@ SET(_link_LIBRARIES # --- scripts --- # scripts / static -SET(plugin_SCRIPTS +SET(_plugin_SCRIPTS meshcut_plugin.py ) @@ -61,26 +61,25 @@ SET(MeshCut_SOURCES ) IF(SALOME_BUILD_GUI) - # --- resources --- - # uic files / to be processed by pyuic - SET(_pyuic_files + SET(_pyuic_FILES MeshCutDialog.ui ) - # scripts / pyuic wrappings - PYQT_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_files}) - + PYQT_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_FILES} TARGET_NAME _target_name_pyuic) ENDIF(SALOME_BUILD_GUI) # --- rules --- -SALOME_INSTALL_SCRIPTS("${plugin_SCRIPTS}" ${SALOME_SMESH_INSTALL_PLUGINS}) +SALOME_INSTALL_SCRIPTS("${_plugin_SCRIPTS}" ${SALOME_SMESH_INSTALL_PLUGINS}) ADD_EXECUTABLE(MeshCut ${MeshCut_SOURCES}) TARGET_LINK_LIBRARIES(MeshCut ${_link_LIBRARIES}) INSTALL(TARGETS MeshCut EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS}) IF(SALOME_BUILD_GUI) - INSTALL(FILES ${_pyuic_SCRIPTS} DESTINATION ${SALOME_INSTALL_BINS}) + SALOME_INSTALL_SCRIPTS("${_pyuic_SCRIPTS}" ${SALOME_INSTALL_BINS} TARGET_NAME _target_name_pyuic_py) + # add dependency of compiled py files on uic files in order + # to avoid races problems when compiling in parallel + ADD_DEPENDENCIES(${_target_name_pyuic_py} ${_target_name_pyuic}) ENDIF(SALOME_BUILD_GUI) diff --git a/src/Tools/Verima/Gui/CMakeLists.txt b/src/Tools/Verima/Gui/CMakeLists.txt index 07c0275a1..1e0cf7b74 100644 --- a/src/Tools/Verima/Gui/CMakeLists.txt +++ b/src/Tools/Verima/Gui/CMakeLists.txt @@ -22,7 +22,7 @@ INCLUDE(UsePyQt) # --- scripts --- # scripts / static -SET(plugin_SCRIPTS +SET(_plugin_SCRIPTS maFenetreChoix.py monEditor.py monNomBase.py @@ -30,10 +30,8 @@ SET(plugin_SCRIPTS __init__.py ) -# --- resources --- - # uic files / to be processed by pyuic -SET(_pyuic_files +SET(_pyuic_FILES desFenetreChoix.ui desStat.ui myMainTotale.ui @@ -42,12 +40,14 @@ SET(_pyuic_files nomBase.ui tousLesJobs.ui ) - # scripts / pyuic wrappings -PYQT_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_files}) +PYQT_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_FILES} TARGET_NAME _target_name_pyuic) # --- rules --- -SALOME_INSTALL_SCRIPTS("${plugin_SCRIPTS}" ${SALOME_SMESH_INSTALL_PLUGINS}/Verima/Gui) +SALOME_INSTALL_SCRIPTS("${_plugin_SCRIPTS}" ${SALOME_SMESH_INSTALL_PLUGINS}/Verima/Gui) -SALOME_INSTALL_SCRIPTS("${_pyuic_SCRIPTS}" ${SALOME_SMESH_INSTALL_PLUGINS}/Verima/Gui) +SALOME_INSTALL_SCRIPTS("${_pyuic_SCRIPTS}" ${SALOME_SMESH_INSTALL_PLUGINS}/Verima/Gui TARGET_NAME _target_name_pyuic_py) +# add dependency of compiled py files on uic files in order +# to avoid races problems when compiling in parallel +ADD_DEPENDENCIES(${_target_name_pyuic_py} ${_target_name_pyuic}) diff --git a/src/Tools/YamsPlug/CMakeLists.txt b/src/Tools/YamsPlug/CMakeLists.txt index 29e6fc99f..9ab185c11 100644 --- a/src/Tools/YamsPlug/CMakeLists.txt +++ b/src/Tools/YamsPlug/CMakeLists.txt @@ -21,30 +21,36 @@ IF(SALOME_BUILD_DOC) ADD_SUBDIRECTORY(doc) ENDIF(SALOME_BUILD_DOC) -INCLUDE(UsePyQt) +IF(SALOME_BUILD_GUI) + INCLUDE(UsePyQt) +ENDIF(SALOME_BUILD_GUI) # --- scripts --- # scripts / static -SET(plugin_SCRIPTS +SET(_plugin_SCRIPTS monYamsPlugDialog.py monViewText.py yamsplug_plugin.py ) -# --- resources --- - -# uic files / to be processed by pyuic -SET(_pyuic_files - YamsPlugDialog.ui - ViewText.ui -) - -# scripts / pyuic wrappings -PYQT_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_files}) +IF(SALOME_BUILD_GUI) + # uic files / to be processed by pyuic + SET(_pyuic_FILES + YamsPlugDialog.ui + ViewText.ui + ) + # scripts / pyuic wrappings + PYQT_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_FILES} TARGET_NAME _target_name_pyuic) +ENDIF(SALOME_BUILD_GUI) # --- rules --- -SALOME_INSTALL_SCRIPTS("${plugin_SCRIPTS}" ${SALOME_SMESH_INSTALL_PLUGINS}) +SALOME_INSTALL_SCRIPTS("${_plugin_SCRIPTS}" ${SALOME_SMESH_INSTALL_PLUGINS}) -SALOME_INSTALL_SCRIPTS("${_pyuic_SCRIPTS}" ${SALOME_SMESH_INSTALL_PLUGINS}) \ No newline at end of file +IF(SALOME_BUILD_GUI) + SALOME_INSTALL_SCRIPTS("${_pyuic_SCRIPTS}" ${SALOME_SMESH_INSTALL_PLUGINS} TARGET_NAME _target_name_pyuic_py) + # add dependency of compiled py files on uic files in order + # to avoid races problems when compiling in parallel + ADD_DEPENDENCIES(${_target_name_pyuic_py} ${_target_name_pyuic}) +ENDIF(SALOME_BUILD_GUI) diff --git a/src/Tools/ZCracksPlug/CMakeLists.txt b/src/Tools/ZCracksPlug/CMakeLists.txt index 288b9d783..2f87a5cf1 100644 --- a/src/Tools/ZCracksPlug/CMakeLists.txt +++ b/src/Tools/ZCracksPlug/CMakeLists.txt @@ -19,12 +19,14 @@ ADD_SUBDIRECTORY(casTests) -INCLUDE(UsePyQt) +IF(SALOME_BUILD_GUI) + INCLUDE(UsePyQt) +ENDIF(SALOME_BUILD_GUI) # --- scripts --- # scripts / static -SET(plugin_SCRIPTS +SET(_plugin_SCRIPTS __init__.py ellipse.py genereCrack.py @@ -38,22 +40,27 @@ SET(plugin_SCRIPTS Zset.py ) -SET(command_SCRIPTS +SET(_command_SCRIPTS zcracksLaunch.py ) -# --- resources --- - -# uic files / to be processed by pyuic -SET(_pyuic_files - zcracks.ui -) - -# scripts / pyuic wrappings -PYQT_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_files}) +IF(SALOME_BUILD_GUI) + # uic files / to be processed by pyuic + SET(_pyuic_FILES + zcracks.ui + ) + # scripts / pyuic wrappings + PYQT_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_FILES} TARGET_NAME _target_name_pyuic) +ENDIF(SALOME_BUILD_GUI) # --- rules --- -SALOME_INSTALL_SCRIPTS("${plugin_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/Zcracks) -SALOME_INSTALL_SCRIPTS("${_pyuic_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/Zcracks) -SALOME_INSTALL_SCRIPTS("${command_SCRIPTS}" ${SALOME_INSTALL_BINS}) +SALOME_INSTALL_SCRIPTS("${_plugin_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/Zcracks) +SALOME_INSTALL_SCRIPTS("${_command_SCRIPTS}" ${SALOME_INSTALL_BINS}) +IF(SALOME_BUILD_GUI) + SALOME_INSTALL_SCRIPTS("${_pyuic_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/Zcracks TARGET_NAME _target_name_pyuic_py) + # add dependency of compiled py files on uic files in order + # to avoid races problems when compiling in parallel + ADD_DEPENDENCIES(${_target_name_pyuic_py} ${_target_name_pyuic}) +ENDIF(SALOME_BUILD_GUI) + diff --git a/src/Tools/blocFissure/ihm/CMakeLists.txt b/src/Tools/blocFissure/ihm/CMakeLists.txt index 5ba2e6075..a561ab816 100644 --- a/src/Tools/blocFissure/ihm/CMakeLists.txt +++ b/src/Tools/blocFissure/ihm/CMakeLists.txt @@ -22,7 +22,7 @@ INCLUDE(UsePyQt) # --- scripts --- # scripts / static -SET(plugin_SCRIPTS +SET(_plugin_SCRIPTS __init__.py fissureCoude_ihm.py fissureCoude_plugin.py @@ -30,19 +30,19 @@ SET(plugin_SCRIPTS dialogFissureCoude.dic ) -# --- resources --- - # uic files / to be processed by pyuic -SET(_pyuic_files +SET(_pyuic_FILES fissureCoude.ui fissureGenerale.ui ) - # scripts / pyuic wrappings -PYQT_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_files}) +PYQT_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_FILES} TARGET_NAME _target_name_pyuic) # --- rules --- -SALOME_INSTALL_SCRIPTS("${plugin_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/blocFissure/ihm) +SALOME_INSTALL_SCRIPTS("${_plugin_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/blocFissure/ihm) -SALOME_INSTALL_SCRIPTS("${_pyuic_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/blocFissure/ihm) +SALOME_INSTALL_SCRIPTS("${_pyuic_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/blocFissure/ihm TARGET_NAME _target_name_pyuic_py) +# add dependency of compiled py files on uic files in order +# to avoid races problems when compiling in parallel +ADD_DEPENDENCIES(${_target_name_pyuic_py} ${_target_name_pyuic}) diff --git a/src/Tools/padder/spadderpy/gui/CMakeLists.txt b/src/Tools/padder/spadderpy/gui/CMakeLists.txt index 8bffecdc7..3ee6b8567 100644 --- a/src/Tools/padder/spadderpy/gui/CMakeLists.txt +++ b/src/Tools/padder/spadderpy/gui/CMakeLists.txt @@ -22,7 +22,7 @@ INCLUDE(UsePyQt) # --- scripts --- # scripts / static -SET(py_SCRIPTS +SET(_py_SCRIPTS __init__.py plugindialog.py inputdialog.py @@ -32,7 +32,7 @@ SET(py_SCRIPTS # --- resources --- # uic files / to be processed by pyuic -SET(spadderpy_DATA +SET(_spadderpy_DATA parameters.png input.png select.png @@ -46,15 +46,20 @@ SET(spadderpy_DATA steelbar.png ) -SET(_pyuic_files +SET(_pyuic_FILES plugindialog.ui inputframe.ui ) # scripts / pyuic wrappings -PYQT_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_files}) +PYQT_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_FILES} TARGET_NAME _target_name_pyuic) # --- rules --- -SALOME_INSTALL_SCRIPTS("${_pyuic_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/salome/smesh/spadder/gui) -SALOME_INSTALL_SCRIPTS("${py_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/salome/smesh/spadder/gui) -INSTALL(FILES ${spadderpy_DATA} DESTINATION ${SALOME_INSTALL_PYTHON}/salome/smesh/spadder/gui) +SALOME_INSTALL_SCRIPTS("${_pyuic_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/salome/smesh/spadder/gui TARGET_NAME _target_name_pyuic_py) +# add dependency of compiled py files on uic files in order +# to avoid races problems when compiling in parallel +ADD_DEPENDENCIES(${_target_name_pyuic_py} ${_target_name_pyuic}) + +SALOME_INSTALL_SCRIPTS("${_py_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/salome/smesh/spadder/gui) + +INSTALL(FILES ${_spadderpy_DATA} DESTINATION ${SALOME_INSTALL_PYTHON}/salome/smesh/spadder/gui)