From: jfa Date: Thu, 11 Aug 2011 13:54:07 +0000 (+0000) Subject: Porting to OCCT6.5.1 X-Git-Tag: V6_4_0a1~113 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d566947c693818c0156dfbcfe36428475de97146;p=modules%2Fsmesh.git Porting to OCCT6.5.1 --- diff --git a/src/SMESH/Makefile.am b/src/SMESH/Makefile.am index 461b4dc00..9c2ab4130 100644 --- a/src/SMESH/Makefile.am +++ b/src/SMESH/Makefile.am @@ -15,14 +15,13 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# # SMESH SMESH : implementaion of SMESH idl descriptions # File : Makefile.in # Author : Paul RASCLE, EDF # Modified by : Alexander BORODIN (OCN) - autotools usage # Module : SMESH -# + include $(top_srcdir)/adm_local/unix/make_common_starter.am # header files @@ -70,6 +69,7 @@ dist_libSMESHimpl_la_SOURCES = \ # additionnal information to compile and link file libSMESHimpl_la_CPPFLAGS = \ $(KERNEL_CXXFLAGS) \ + $(GUI_CXXFLAGS) \ $(CAS_CPPFLAGS) \ $(MED_CXXFLAGS) \ $(GEOM_CXX_FLAGS) \ diff --git a/src/SMESH/SMESH_Algo.cxx b/src/SMESH/SMESH_Algo.cxx index e509dd1b9..05a84cdcd 100644 --- a/src/SMESH/SMESH_Algo.cxx +++ b/src/SMESH/SMESH_Algo.cxx @@ -18,13 +18,12 @@ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// // SMESH SMESH : implementaion of SMESH idl descriptions // File : SMESH_Algo.cxx // Author : Paul RASCLE, EDF // Module : SMESH -// + #include "SMESH_Algo.hxx" #include "SMDS_EdgePosition.hxx" @@ -40,6 +39,8 @@ #include "SMESH_Mesh.hxx" #include "SMESH_TypeDefs.hxx" +#include + #include #include #include @@ -512,7 +513,7 @@ GeomAbs_Shape SMESH_Algo::Continuity(TopoDS_Edge E1, Standard_Real tol = BRep_Tool::Tolerance( V ); Standard_Real angTol = 2e-3; try { -#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 +#if OCC_VERSION_LARGE > 0x06010000 OCC_CATCH_SIGNALS; #endif return BRepLProp::Continuity(C1, C2, u1, u2, tol, angTol); diff --git a/src/SMESH/SMESH_MeshEditor.cxx b/src/SMESH/SMESH_MeshEditor.cxx index 76432855f..9ea2f7d1e 100644 --- a/src/SMESH/SMESH_MeshEditor.cxx +++ b/src/SMESH/SMESH_MeshEditor.cxx @@ -18,13 +18,12 @@ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -// SMESH SMESH : idl implementation based on 'SMESH' unit's classes +// SMESH SMESH : idl implementation based on 'SMESH' unit's classes // File : SMESH_MeshEditor.cxx // Created : Mon Apr 12 16:10:22 2004 // Author : Edward AGAPOV (eap) -// + #define CHRONODEF #include "SMESH_MeshEditor.hxx" @@ -50,6 +49,8 @@ #include "SMESH_OctreeNode.hxx" #include "SMESH_subMesh.hxx" +#include + #include "utilities.h" #include @@ -2829,8 +2830,13 @@ static bool getClosestUV (Extrema_GenExtPS& projector, if ( projector.IsDone() ) { double u, v, minVal = DBL_MAX; for ( int i = projector.NbExt(); i > 0; i-- ) +#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1 + if ( projector.SquareDistance( i ) < minVal ) { + minVal = projector.SquareDistance( i ); +#else if ( projector.Value( i ) < minVal ) { minVal = projector.Value( i ); +#endif projector.Point( i ).Parameter( u, v ); } result.SetCoord( u, v ); @@ -10785,7 +10791,11 @@ namespace { _extremum.Perform(aPnt); if ( _extremum.IsDone() ) for ( int iSol = 1; iSol <= _extremum.NbExt() && _state == TopAbs_OUT; ++iSol) +#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1 + _state = ( _extremum.SquareDistance(iSol) <= theTol ? TopAbs_IN : TopAbs_OUT ); +#else _state = ( _extremum.Value(iSol) <= theTol ? TopAbs_IN : TopAbs_OUT ); +#endif } TopAbs_State State() const { diff --git a/src/SMESH/SMESH_Pattern.cxx b/src/SMESH/SMESH_Pattern.cxx index ba49c219f..61c1ce73b 100644 --- a/src/SMESH/SMESH_Pattern.cxx +++ b/src/SMESH/SMESH_Pattern.cxx @@ -18,12 +18,11 @@ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// // File : SMESH_Pattern.hxx // Created : Mon Aug 2 10:30:00 2004 // Author : Edward AGAPOV (eap) -// + #include "SMESH_Pattern.hxx" #include @@ -74,6 +73,8 @@ #include "SMESH_MesherHelper.hxx" #include "SMESH_subMesh.hxx" +#include + #include #include "utilities.h" @@ -444,8 +445,13 @@ static gp_XY project (const SMDS_MeshNode* theNode, } double u, v, minVal = DBL_MAX; for ( int i = theProjectorPS.NbExt(); i > 0; i-- ) +#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1 + if ( theProjectorPS.SquareDistance( i ) < minVal ) { + minVal = theProjectorPS.SquareDistance( i ); +#else if ( theProjectorPS.Value( i ) < minVal ) { minVal = theProjectorPS.Value( i ); +#endif theProjectorPS.Point( i ).Parameter( u, v ); } return gp_XY( u, v ); diff --git a/src/SMESH/SMESH_subMesh.cxx b/src/SMESH/SMESH_subMesh.cxx index 0b3c98369..ddc7eb395 100644 --- a/src/SMESH/SMESH_subMesh.cxx +++ b/src/SMESH/SMESH_subMesh.cxx @@ -18,13 +18,12 @@ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// // SMESH SMESH : implementaion of SMESH idl descriptions // File : SMESH_subMesh.cxx // Author : Paul RASCLE, EDF // Module : SMESH -// + #include "SMESH_subMesh.hxx" #include "SMESH_Algo.hxx" @@ -38,6 +37,8 @@ #include "SMDS_SetIterator.hxx" #include "SMDSAbs_ElementType.hxx" +#include + #include "utilities.h" #include "OpUtil.hxx" #include "Basics_Utils.hxx" @@ -1368,7 +1369,7 @@ bool SMESH_subMesh::ComputeStateEngine(int event) _computeState = FAILED_TO_COMPUTE; _computeError = SMESH_ComputeError::New(COMPERR_OK,"",algo); try { -#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 +#if OCC_VERSION_LARGE > 0x06010000 OCC_CATCH_SIGNALS; #endif algo->InitComputeError();