Salome HOME
Remove obsolete OCC_VERSION_LARGE defines.
authorimn <imn@opencascade.com>
Fri, 8 Aug 2014 12:11:08 +0000 (16:11 +0400)
committervsr <vsr@opencascade.com>
Fri, 26 Sep 2014 07:09:09 +0000 (11:09 +0400)
src/SMESH/SMESH_Algo.cxx
src/SMESH/SMESH_MeshEditor.cxx
src/SMESH/SMESH_Pattern.cxx
src/StdMeshers/StdMeshers_Cartesian_3D.cxx
src/StdMeshers/StdMeshers_RadialPrism_3D.cxx

index 732c3e64ae2a9a96bf00ddd29c7e37fdfe5d77cf..5ec1240b00bdcb9c8fd007e413b47c2d9b18a589 100644 (file)
@@ -522,9 +522,7 @@ GeomAbs_Shape SMESH_Algo::Continuity(TopoDS_Edge E1,
   Standard_Real tol = BRep_Tool::Tolerance( V );
   Standard_Real angTol = 2e-3;
   try {
   Standard_Real tol = BRep_Tool::Tolerance( V );
   Standard_Real angTol = 2e-3;
   try {
-#if OCC_VERSION_LARGE > 0x06010000
     OCC_CATCH_SIGNALS;
     OCC_CATCH_SIGNALS;
-#endif
     return BRepLProp::Continuity(C1, C2, u1, u2, tol, angTol);
   }
   catch (Standard_Failure) {
     return BRepLProp::Continuity(C1, C2, u1, u2, tol, angTol);
   }
   catch (Standard_Failure) {
index e216b2e7448f86b80edb40a310c0fba76caab60f..831767d2915cf0592fb130557b62275e8008b4ad 100644 (file)
@@ -3701,13 +3701,8 @@ static bool getClosestUV (Extrema_GenExtPS& projector,
   if ( projector.IsDone() ) {
     double u, v, minVal = DBL_MAX;
     for ( int i = projector.NbExt(); i > 0; i-- )
   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 );
       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 );
         projector.Point( i ).Parameter( u, v );
       }
     result.SetCoord( u, v );
@@ -10401,11 +10396,7 @@ namespace {
       _extremum.Perform(aPnt);
       if ( _extremum.IsDone() )
         for ( int iSol = 1; iSol <= _extremum.NbExt() && _state == TopAbs_OUT; ++iSol)
       _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 );
           _state = ( _extremum.SquareDistance(iSol) <= theTol ? TopAbs_IN : TopAbs_OUT );
-#else
-          _state = ( _extremum.Value(iSol) <= theTol ? TopAbs_IN : TopAbs_OUT );
-#endif
     }
     TopAbs_State State() const
     {
     }
     TopAbs_State State() const
     {
index 75d26244d4b88a7ca74356cbad42cb0f85be903f..2264ba3d16503b8664ef57b2cf539d77bf44d631 100644 (file)
@@ -501,13 +501,8 @@ static gp_XY project (const SMDS_MeshNode* theNode,
   }
   double u, v, minVal = DBL_MAX;
   for ( int i = theProjectorPS.NbExt(); i > 0; i-- )
   }
   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 );
     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 );
       theProjectorPS.Point( i ).Parameter( u, v );
     }
   return gp_XY( u, v );
index 3cd23ff35d0a619006f38ac457062b5b1104f928..bec175bb39dde87462443df5733713eea0cb90cc 100644 (file)
@@ -100,17 +100,6 @@ using namespace std;
 //#define _MY_DEBUG_
 #endif
 
 //#define _MY_DEBUG_
 #endif
 
-#if OCC_VERSION_LARGE <= 0x06050300
-// workaround is required only for OCCT6.5.3 and older (see OCC22809)
-#define ELLIPSOLID_WORKAROUND
-#endif
-
-#ifdef ELLIPSOLID_WORKAROUND
-#include <BRepIntCurveSurface_Inter.hxx>
-#include <BRepTopAdaptor_TopolTool.hxx>
-#include <BRepAdaptor_HSurface.hxx>
-#endif
-
 //=============================================================================
 /*!
  * Constructor
 //=============================================================================
 /*!
  * Constructor
@@ -317,41 +306,6 @@ namespace
     void ComputeUVW(const gp_XYZ& p, double uvw[3]);
     void ComputeNodes(SMESH_MesherHelper& helper);
   };
     void ComputeUVW(const gp_XYZ& p, double uvw[3]);
     void ComputeNodes(SMESH_MesherHelper& helper);
   };
-#ifdef ELLIPSOLID_WORKAROUND
-  // --------------------------------------------------------------------------
-  /*!
-   * \brief struct temporary replacing IntCurvesFace_Intersector until
-   *        OCCT bug 0022809 is fixed
-   *        http://tracker.dev.opencascade.org/view.php?id=22809
-   */
-  struct TMP_IntCurvesFace_Intersector
-  {
-    BRepAdaptor_Surface                       _surf;
-    double                                    _tol;
-    BRepIntCurveSurface_Inter                 _intcs;
-    vector<IntCurveSurface_IntersectionPoint> _points;
-    BRepTopAdaptor_TopolTool                  _clsf;
-
-    TMP_IntCurvesFace_Intersector(const TopoDS_Face& face, const double tol)
-      :_surf( face ), _tol( tol ), _clsf( new BRepAdaptor_HSurface(_surf) ) {}
-    Bnd_Box Bounding() const { Bnd_Box b; BRepBndLib::Add (_surf.Face(), b); return b; }
-    void Perform( const gp_Lin& line, const double w0, const double w1 )
-    {
-      _points.clear();
-      for ( _intcs.Init( _surf.Face(), line, _tol ); _intcs.More(); _intcs.Next() )
-        if ( w0 <= _intcs.W() && _intcs.W() <= w1 )
-          _points.push_back( _intcs.Point() );
-    }
-    bool IsDone() const { return true; }
-    int  NbPnt()  const { return _points.size(); }
-    IntCurveSurface_TransitionOnCurve Transition( const int i ) const { return _points[ i-1 ].Transition(); }
-    double       WParameter( const int i ) const { return _points[ i-1 ].W(); }
-    TopAbs_State ClassifyUVPoint(const gp_Pnt2d& p) { return _clsf.Classify( p, _tol ); }
-  };
-#define __IntCurvesFace_Intersector TMP_IntCurvesFace_Intersector
-#else
-#define __IntCurvesFace_Intersector IntCurvesFace_Intersector
-#endif
   // --------------------------------------------------------------------------
   /*!
    * \brief Intersector of TopoDS_Face with all GridLine's
   // --------------------------------------------------------------------------
   /*!
    * \brief Intersector of TopoDS_Face with all GridLine's
@@ -362,7 +316,7 @@ namespace
     TGeomID     _faceID;
     Grid*       _grid;
     Bnd_Box     _bndBox;
     TGeomID     _faceID;
     Grid*       _grid;
     Bnd_Box     _bndBox;
-    __IntCurvesFace_Intersector* _surfaceInt;
+    IntCurvesFace_Intersector* _surfaceInt;
     vector< std::pair< GridLine*, F_IntersectPoint > > _intersections;
 
     FaceGridIntersector(): _grid(0), _surfaceInt(0) {}
     vector< std::pair< GridLine*, F_IntersectPoint > > _intersections;
 
     FaceGridIntersector(): _grid(0), _surfaceInt(0) {}
@@ -383,11 +337,11 @@ namespace
       GetCurveFaceIntersector();
       return _bndBox;
     }
       GetCurveFaceIntersector();
       return _bndBox;
     }
-    __IntCurvesFace_Intersector* GetCurveFaceIntersector()
+    IntCurvesFace_Intersector* GetCurveFaceIntersector()
     {
       if ( !_surfaceInt )
       {
     {
       if ( !_surfaceInt )
       {
-        _surfaceInt = new __IntCurvesFace_Intersector( _face, Precision::PConfusion() );
+        _surfaceInt = new IntCurvesFace_Intersector( _face, Precision::PConfusion() );
         _bndBox     = _surfaceInt->Bounding();
         if ( _bndBox.IsVoid() )
           BRepBndLib::Add (_face, _bndBox);
         _bndBox     = _surfaceInt->Bounding();
         if ( _bndBox.IsVoid() )
           BRepBndLib::Add (_face, _bndBox);
@@ -412,7 +366,7 @@ namespace
     gp_Cone     _cone;
     gp_Sphere   _sphere;
     gp_Torus    _torus;
     gp_Cone     _cone;
     gp_Sphere   _sphere;
     gp_Torus    _torus;
-    __IntCurvesFace_Intersector* _surfaceInt;
+    IntCurvesFace_Intersector* _surfaceInt;
 
     vector< F_IntersectPoint > _intPoints;
 
 
     vector< F_IntersectPoint > _intPoints;
 
index a06cf86082e30e84a8f95ab62554ee7f8742faa3..3b36e0058a9c20103606b4f621589cabe9f2b5b4 100644 (file)
 #include <TopoDS_Solid.hxx>
 #include <gp.hxx>
 #include <gp_Pnt.hxx>
 #include <TopoDS_Solid.hxx>
 #include <gp.hxx>
 #include <gp_Pnt.hxx>
-#if OCC_VERSION_LARGE > 0x06050400
 #include <BRepClass3d.hxx>
 #include <BRepClass3d.hxx>
-#else
-#include <BRepTools.hxx>
-#endif
 
 using namespace std;
 
 
 using namespace std;
 
@@ -169,11 +165,7 @@ bool StdMeshers_RadialPrism_3D::Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& a
 
   // get 2 shells
   TopoDS_Solid solid = TopoDS::Solid( aShape );
 
   // get 2 shells
   TopoDS_Solid solid = TopoDS::Solid( aShape );
-#if OCC_VERSION_LARGE > 0x06050400
   TopoDS_Shell outerShell = BRepClass3d::OuterShell( solid );
   TopoDS_Shell outerShell = BRepClass3d::OuterShell( solid );
-#else
-  TopoDS_Shell outerShell = BRepTools::OuterShell( solid );
-#endif
   TopoDS_Shape innerShell;
   int nbShells = 0;
   for ( TopoDS_Iterator It (solid); It.More(); It.Next(), ++nbShells )
   TopoDS_Shape innerShell;
   int nbShells = 0;
   for ( TopoDS_Iterator It (solid); It.More(); It.Next(), ++nbShells )
@@ -439,11 +431,7 @@ bool StdMeshers_RadialPrism_3D::Evaluate(SMESH_Mesh& aMesh,
 {
   // get 2 shells
   TopoDS_Solid solid = TopoDS::Solid( aShape );
 {
   // get 2 shells
   TopoDS_Solid solid = TopoDS::Solid( aShape );
-#if OCC_VERSION_LARGE > 0x06050400
   TopoDS_Shell outerShell = BRepClass3d::OuterShell( solid );
   TopoDS_Shell outerShell = BRepClass3d::OuterShell( solid );
-#else
-  TopoDS_Shell outerShell = BRepTools::OuterShell( solid );
-#endif
   TopoDS_Shape innerShell;
   int nbShells = 0;
   for ( TopoDS_Iterator It (solid); It.More(); It.Next(), ++nbShells )
   TopoDS_Shape innerShell;
   int nbShells = 0;
   for ( TopoDS_Iterator It (solid); It.More(); It.Next(), ++nbShells )