Porting to OCCT6.5.1

This commit is contained in:
jfa 2011-08-11 13:54:07 +00:00
parent 39841ffadd
commit d566947c69
5 changed files with 31 additions and 13 deletions

View File

@ -15,14 +15,13 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# #
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
# SMESH SMESH : implementaion of SMESH idl descriptions # SMESH SMESH : implementaion of SMESH idl descriptions
# File : Makefile.in # File : Makefile.in
# Author : Paul RASCLE, EDF # Author : Paul RASCLE, EDF
# Modified by : Alexander BORODIN (OCN) - autotools usage # Modified by : Alexander BORODIN (OCN) - autotools usage
# Module : SMESH # Module : SMESH
#
include $(top_srcdir)/adm_local/unix/make_common_starter.am include $(top_srcdir)/adm_local/unix/make_common_starter.am
# header files # header files
@ -70,6 +69,7 @@ dist_libSMESHimpl_la_SOURCES = \
# additionnal information to compile and link file # additionnal information to compile and link file
libSMESHimpl_la_CPPFLAGS = \ libSMESHimpl_la_CPPFLAGS = \
$(KERNEL_CXXFLAGS) \ $(KERNEL_CXXFLAGS) \
$(GUI_CXXFLAGS) \
$(CAS_CPPFLAGS) \ $(CAS_CPPFLAGS) \
$(MED_CXXFLAGS) \ $(MED_CXXFLAGS) \
$(GEOM_CXX_FLAGS) \ $(GEOM_CXX_FLAGS) \

View File

@ -18,13 +18,12 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// SMESH SMESH : implementaion of SMESH idl descriptions // SMESH SMESH : implementaion of SMESH idl descriptions
// File : SMESH_Algo.cxx // File : SMESH_Algo.cxx
// Author : Paul RASCLE, EDF // Author : Paul RASCLE, EDF
// Module : SMESH // Module : SMESH
//
#include "SMESH_Algo.hxx" #include "SMESH_Algo.hxx"
#include "SMDS_EdgePosition.hxx" #include "SMDS_EdgePosition.hxx"
@ -40,6 +39,8 @@
#include "SMESH_Mesh.hxx" #include "SMESH_Mesh.hxx"
#include "SMESH_TypeDefs.hxx" #include "SMESH_TypeDefs.hxx"
#include <CASCatch_OCCTVersion.hxx>
#include <BRepAdaptor_Curve.hxx> #include <BRepAdaptor_Curve.hxx>
#include <BRepLProp.hxx> #include <BRepLProp.hxx>
#include <BRep_Tool.hxx> #include <BRep_Tool.hxx>
@ -512,7 +513,7 @@ GeomAbs_Shape SMESH_Algo::Continuity(TopoDS_Edge E1,
Standard_Real tol = BRep_Tool::Tolerance( V ); Standard_Real tol = BRep_Tool::Tolerance( V );
Standard_Real angTol = 2e-3; Standard_Real angTol = 2e-3;
try { try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 #if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS; OCC_CATCH_SIGNALS;
#endif #endif
return BRepLProp::Continuity(C1, C2, u1, u2, tol, angTol); return BRepLProp::Continuity(C1, C2, u1, u2, tol, angTol);

View File

@ -18,13 +18,12 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // 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 // File : SMESH_MeshEditor.cxx
// Created : Mon Apr 12 16:10:22 2004 // Created : Mon Apr 12 16:10:22 2004
// Author : Edward AGAPOV (eap) // Author : Edward AGAPOV (eap)
//
#define CHRONODEF #define CHRONODEF
#include "SMESH_MeshEditor.hxx" #include "SMESH_MeshEditor.hxx"
@ -50,6 +49,8 @@
#include "SMESH_OctreeNode.hxx" #include "SMESH_OctreeNode.hxx"
#include "SMESH_subMesh.hxx" #include "SMESH_subMesh.hxx"
#include <CASCatch_OCCTVersion.hxx>
#include "utilities.h" #include "utilities.h"
#include <BRepAdaptor_Surface.hxx> #include <BRepAdaptor_Surface.hxx>
@ -2829,8 +2830,13 @@ static bool getClosestUV (Extrema_GenExtPS& projector,
if ( projector.IsDone() ) { if ( projector.IsDone() ) {
double u, v, minVal = DBL_MAX; double u, v, minVal = DBL_MAX;
for ( int i = projector.NbExt(); i > 0; i-- ) 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 ) { if ( projector.Value( i ) < minVal ) {
minVal = projector.Value( i ); minVal = projector.Value( i );
#endif
projector.Point( i ).Parameter( u, v ); projector.Point( i ).Parameter( u, v );
} }
result.SetCoord( u, v ); result.SetCoord( u, v );
@ -10785,7 +10791,11 @@ namespace {
_extremum.Perform(aPnt); _extremum.Perform(aPnt);
if ( _extremum.IsDone() ) if ( _extremum.IsDone() )
for ( int iSol = 1; iSol <= _extremum.NbExt() && _state == TopAbs_OUT; ++iSol) 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 ); _state = ( _extremum.Value(iSol) <= theTol ? TopAbs_IN : TopAbs_OUT );
#endif
} }
TopAbs_State State() const TopAbs_State State() const
{ {

View File

@ -18,12 +18,11 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File : SMESH_Pattern.hxx // File : SMESH_Pattern.hxx
// Created : Mon Aug 2 10:30:00 2004 // Created : Mon Aug 2 10:30:00 2004
// Author : Edward AGAPOV (eap) // Author : Edward AGAPOV (eap)
//
#include "SMESH_Pattern.hxx" #include "SMESH_Pattern.hxx"
#include <BRepAdaptor_Curve.hxx> #include <BRepAdaptor_Curve.hxx>
@ -74,6 +73,8 @@
#include "SMESH_MesherHelper.hxx" #include "SMESH_MesherHelper.hxx"
#include "SMESH_subMesh.hxx" #include "SMESH_subMesh.hxx"
#include <CASCatch_OCCTVersion.hxx>
#include <Basics_Utils.hxx> #include <Basics_Utils.hxx>
#include "utilities.h" #include "utilities.h"
@ -444,8 +445,13 @@ static gp_XY project (const SMDS_MeshNode* theNode,
} }
double u, v, minVal = DBL_MAX; double u, v, minVal = DBL_MAX;
for ( int i = theProjectorPS.NbExt(); i > 0; i-- ) 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 ) { if ( theProjectorPS.Value( i ) < minVal ) {
minVal = theProjectorPS.Value( i ); minVal = theProjectorPS.Value( i );
#endif
theProjectorPS.Point( i ).Parameter( u, v ); theProjectorPS.Point( i ).Parameter( u, v );
} }
return gp_XY( u, v ); return gp_XY( u, v );

View File

@ -18,13 +18,12 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// SMESH SMESH : implementaion of SMESH idl descriptions // SMESH SMESH : implementaion of SMESH idl descriptions
// File : SMESH_subMesh.cxx // File : SMESH_subMesh.cxx
// Author : Paul RASCLE, EDF // Author : Paul RASCLE, EDF
// Module : SMESH // Module : SMESH
//
#include "SMESH_subMesh.hxx" #include "SMESH_subMesh.hxx"
#include "SMESH_Algo.hxx" #include "SMESH_Algo.hxx"
@ -38,6 +37,8 @@
#include "SMDS_SetIterator.hxx" #include "SMDS_SetIterator.hxx"
#include "SMDSAbs_ElementType.hxx" #include "SMDSAbs_ElementType.hxx"
#include <CASCatch_OCCTVersion.hxx>
#include "utilities.h" #include "utilities.h"
#include "OpUtil.hxx" #include "OpUtil.hxx"
#include "Basics_Utils.hxx" #include "Basics_Utils.hxx"
@ -1368,7 +1369,7 @@ bool SMESH_subMesh::ComputeStateEngine(int event)
_computeState = FAILED_TO_COMPUTE; _computeState = FAILED_TO_COMPUTE;
_computeError = SMESH_ComputeError::New(COMPERR_OK,"",algo); _computeError = SMESH_ComputeError::New(COMPERR_OK,"",algo);
try { try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 #if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS; OCC_CATCH_SIGNALS;
#endif #endif
algo->InitComputeError(); algo->InitComputeError();