Salome HOME
Clean-up deprecated OCCT-related code
authorvsr <vsr@opencascade.com>
Mon, 25 Sep 2017 13:12:08 +0000 (16:12 +0300)
committervsr <vsr@opencascade.com>
Mon, 25 Sep 2017 13:12:08 +0000 (16:12 +0300)
19 files changed:
src/SMESH/SMESH_Algo.cxx
src/SMESH/SMESH_MeshEditor.cxx
src/SMESH/SMESH_Pattern.cxx
src/SMESH/SMESH_subMesh.cxx
src/SMESHGUI/SMESHGUI.cxx
src/SMESHGUI/SMESHGUI_ComputeDlg.cxx
src/SMESHGUI/SMESHGUI_Filter.cxx
src/SMESHGUI/SMESHGUI_Filter.h
src/SMESHUtils/SMESH_TryCatch.hxx
src/SMESH_I/SMESH_2smeshpy.cxx
src/SMESH_I/SMESH_2smeshpy.hxx
src/SMESH_I/SMESH_Filter_i.cxx
src/SMESH_I/SMESH_MeshEditor_i.cxx
src/SMESH_I/SMESH_Pattern_i.cxx
src/StdMeshers/StdMeshers_Cartesian_3D.cxx
src/StdMeshers/StdMeshers_Distribution.cxx
src/StdMeshers/StdMeshers_NumberOfSegments.cxx
src/StdMeshers/StdMeshers_RadialPrism_3D.cxx
src/StdMeshersGUI/StdMeshersGUI_DistrPreview.cxx

index 4e4002e..968154d 100644 (file)
@@ -42,8 +42,6 @@
 #include "SMESH_TypeDefs.hxx"
 #include "SMESH_subMesh.hxx"
 
-#include <Basics_OCCTVersion.hxx>
-
 #include <BRepAdaptor_Curve.hxx>
 #include <BRepLProp.hxx>
 #include <BRep_Tool.hxx>
index cfe4c3e..8306667 100644 (file)
@@ -46,8 +46,6 @@
 #include "SMESH_OctreeNode.hxx"
 #include "SMESH_subMesh.hxx"
 
-#include <Basics_OCCTVersion.hxx>
-
 #include "utilities.h"
 #include "chrono.hxx"
 
index db6e60e..51564bf 100644 (file)
@@ -75,8 +75,6 @@
 #include <gp_XY.hxx>
 #include <gp_XYZ.hxx>
 
-#include <Basics_OCCTVersion.hxx>
-
 #include <Basics_Utils.hxx>
 #include "utilities.h"
 
index 22fa65b..2f89997 100644 (file)
@@ -38,8 +38,6 @@
 #include "SMESH_MesherHelper.hxx"
 #include "SMESH_subMeshEventListener.hxx"
 
-#include <Basics_OCCTVersion.hxx>
-
 #include "utilities.h"
 #include "OpUtil.hxx"
 #include "Basics_Utils.hxx"
index 527386e..e92c780 100644 (file)
@@ -2646,9 +2646,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)
index 5a32503..2d48bf7 100644 (file)
@@ -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){
index 05d0033..1222c4b 100755 (executable)
 #include <SMDS_Mesh.hxx>
 #include <SMDSAbs_ElementType.hxx>
 
-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
index ec36f46..08a43c7 100755 (executable)
@@ -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
index 05d00a1..44047a6 100644 (file)
@@ -33,7 +33,6 @@
 #include <Utils_SALOME_Exception.hxx>
 #include <Standard_Failure.hxx>
 #include <Standard_ErrorHandler.hxx>
-#include <Basics_OCCTVersion.hxx>
 #include <utilities.h>
 
 // IMPORTANT: include this file _after_ OCC ones, else OCC_CATCH_SIGNALS can be undefined!
index 876365b..220e3d5 100644 (file)
 #include <unistd.h>
 #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;
index 6fd9915..4531a38 100644 (file)
@@ -40,8 +40,6 @@
 #include <vector>
 #include <set>
 
-#include <Basics_OCCTVersion.hxx>
-
 #include <SALOMEconfig.h>
 #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
index 9432b91..95c3383 100644 (file)
@@ -40,8 +40,6 @@
 #include <SALOMEDS_wrap.hxx>
 #include <GEOM_wrap.hxx>
 
-#include <Basics_OCCTVersion.hxx>
-
 #include <BRep_Tool.hxx>
 #include <Geom_CylindricalSurface.hxx>
 #include <Geom_Plane.hxx>
@@ -3941,16 +3939,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 );
 
@@ -3960,7 +3948,6 @@ CORBA::Boolean FilterLibrary_i::Save()
   aWriter.SetIndentation( 2 );
   aWriter.Write( os, myDoc );
   fb.close();
-#endif
 
   TPythonDump()<<this<<".Save()";
   return true;
index 6dfd0d6..1c93dc9 100644 (file)
@@ -64,7 +64,6 @@
 #include <Utils_CorbaException.hxx>
 #include <SALOMEDS_wrap.hxx>
 #include <SALOME_GenericObj_i.hh>
-#include <Basics_OCCTVersion.hxx>
 
 #include <BRepAdaptor_Surface.hxx>
 #include <BRep_Tool.hxx>
 #include <gp_Ax2.hxx>
 #include <gp_Vec.hxx>
 
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
-#define NO_CAS_CATCH
-#endif
-
 #include <Standard_Failure.hxx>
-
-#ifdef NO_CAS_CATCH
 #include <Standard_ErrorHandler.hxx>
-#endif
 
 #include <sstream>
 #include <limits>
@@ -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<double>::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 )
index ca5bcd0..70dab5d 100644 (file)
@@ -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) {
index 0b92acc..002f209 100644 (file)
@@ -36,7 +36,6 @@
 
 #include <utilities.h>
 #include <Utils_ExceptHandlers.hxx>
-#include <Basics_OCCTVersion.hxx>
 
 #include <GEOMUtils.hxx>
 
@@ -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;
index f1f26ae..7fb3956 100644 (file)
 #include <math_GaussSingleIntegration.hxx>
 #include <utilities.h>
 
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
-#define NO_CAS_CATCH
-#endif
-
 #include <Standard_Failure.hxx>
 #include <Expr_NamedUnknown.hxx>
-
-#ifdef NO_CAS_CATCH
 #include <Standard_ErrorHandler.hxx>
-#endif
 
 using namespace std;
 
@@ -60,9 +53,7 @@ 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();
@@ -192,9 +183,7 @@ 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) {
@@ -228,9 +217,7 @@ 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();
@@ -246,9 +233,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<math_Function*>( const_cast<FunctionExpr*> (this) ), a, b, 20 );
     if( _int.IsDone() )
index 2ff7274..927e96d 100644 (file)
 #include <TopExp.hxx>
 #include <TopTools_IndexedMapOfShape.hxx>
 
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
-#define NO_CAS_CATCH
-#endif
-
 #include <Standard_Failure.hxx>
-
-#ifdef NO_CAS_CATCH
 #include <Standard_ErrorHandler.hxx>
-#endif
 
 #include <Basics_Utils.hxx>
 
@@ -238,9 +231,7 @@ void StdMeshers_NumberOfSegments::SetTableFunction(const vector<double>& table)
     if( _convMode==0 )
     {
       try {
-#ifdef NO_CAS_CATCH
         OCC_CATCH_SIGNALS;
-#endif
         val = pow( 10.0, val );
       }
       catch(Standard_Failure) {
@@ -335,9 +326,7 @@ 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) {
index bbf339a..23962cb 100644 (file)
@@ -29,8 +29,6 @@
 
 #include "StdMeshers_RadialPrism_3D.hxx"
 
-#include <Basics_OCCTVersion.hxx>
-
 #include "StdMeshers_ProjectionUtils.hxx"
 #include "StdMeshers_NumberOfLayers.hxx"
 #include "StdMeshers_LayerDistribution.hxx"
index 7eb2f33..7761be2 100644 (file)
 #include <Expr_NamedUnknown.hxx>
 #include <Expr_GeneralExpression.hxx>
 
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
-#define NO_CAS_CATCH
-#endif
-
 #include <Standard_Failure.hxx>
-
-#ifdef NO_CAS_CATCH
 #include <Standard_ErrorHandler.hxx>
-#endif
 
 #ifdef WIN32
 # include <algorithm>
@@ -356,9 +349,7 @@ 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,9 +395,7 @@ 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) {
@@ -446,9 +435,7 @@ 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();
@@ -472,9 +459,7 @@ 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;
         //