]> SALOME platform Git repositories - modules/smesh.git/commitdiff
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 4e4002ee321eee827dc676a97d1117a0942295b5..968154d1a5fa788d2e659fc5a17f2f4e8c17fc78 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 cfe4c3e8669478173a7ab6c3629688ac6f5843f3..83066678d521b6a2a14d49571c42920c97972e1c 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 db6e60e8ca629adbb489633dcffe0758783b0583..51564bf7820973b8b05f420c17d2a7144fdfb93e 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 22fa65b99d5e44273d574cf5b00fe4a95e25ecce..2f89997baeae95d630520b9bd3821b3e2377251a 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 527386e743505990c0fe266a514929459d80822b..e92c78093340767f972195c03515fcc9a58f8ed0 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 5a32503a1ae6f702a5a77476fc44675e3a1cbbc8..2d48bf78a0bf82a79bc77927d3ec28a5cc0517be 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 05d00338731ce65d25add9145c7a92325d96dd34..1222c4b808ce93543284befb97f59ba42284b608 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 ec36f46d6e76900d8eb64f3ccbe901e8eccdc21d..08a43c7675be5d5c608730f252b0c80ccef7a23c 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 05d00a1b551b76b60b431565434e55b246ada466..44047a694d54aa70b71ece72df8df0430ca468c5 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 876365b0c6e16a769f742dc1fca594a1f353bb39..220e3d581eca960aa1bd84247f64381b0f89becc 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 6fd991533bd9188f7e6fc9f06a404adb5399f633..4531a38ed792404cb3e787ba0ca29af5bc75738b 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 9432b91170849f48a5f90112b48065f1f4cfbc86..95c338377faa8b5584e8839fa7c2ece8b9fbbe30 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 6dfd0d61efad2b128085bfbe0c14785ef70580a1..1c93dc90a0c9e5378c6ba66319096765394e5263 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 ca5bcd0d2e0c74d85f482bd6e15242916996fef0..70dab5de7d79f0f008e2766148c0044d93519bea 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 0b92acc5f2692f6221f48fad0fbe7c1a10e13c62..002f209619b9847b091359a6cedebcc15757e721 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 f1f26aebf554d577f7bf27457f24cef0c0bb8e98..7fb3956adfb85a8df5b99f57ecc881c46b548ac2 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 2ff7274fc2b0827483a13c14ec9adc555f7477c7..927e96d02ab10ac89622854ab2d5ea09a4c4d350 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 bbf339a8b124c022eda732e432df85d6ad46d563..23962cba2070d95def31e5867f2d8096784b3f25 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 7eb2f33484b97daa5729fcdb4ff5b7b893dc90cc..7761be258c16c08da6da945eba496e94a457f454 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;
         //