From 9d73526fbc8ecc160281df9046ad4aed0b57e779 Mon Sep 17 00:00:00 2001 From: vsr Date: Mon, 25 Sep 2017 16:12:08 +0300 Subject: [PATCH] Clean-up deprecated OCCT-related code --- src/SMESH/SMESH_Algo.cxx | 2 -- src/SMESH/SMESH_MeshEditor.cxx | 2 -- src/SMESH/SMESH_Pattern.cxx | 2 -- src/SMESH/SMESH_subMesh.cxx | 2 -- src/SMESHGUI/SMESHGUI.cxx | 2 -- src/SMESHGUI/SMESHGUI_ComputeDlg.cxx | 8 ----- src/SMESHGUI/SMESHGUI_Filter.cxx | 14 ++++---- src/SMESHGUI/SMESHGUI_Filter.h | 14 ++++---- src/SMESHUtils/SMESH_TryCatch.hxx | 1 - src/SMESH_I/SMESH_2smeshpy.cxx | 32 ++++++++--------- src/SMESH_I/SMESH_2smeshpy.hxx | 34 +++++++++---------- src/SMESH_I/SMESH_Filter_i.cxx | 13 ------- src/SMESH_I/SMESH_MeshEditor_i.cxx | 16 --------- src/SMESH_I/SMESH_Pattern_i.cxx | 2 -- src/StdMeshers/StdMeshers_Cartesian_3D.cxx | 9 ----- src/StdMeshers/StdMeshers_Distribution.cxx | 15 -------- .../StdMeshers_NumberOfSegments.cxx | 11 ------ src/StdMeshers/StdMeshers_RadialPrism_3D.cxx | 2 -- .../StdMeshersGUI_DistrPreview.cxx | 15 -------- 19 files changed, 46 insertions(+), 150 deletions(-) diff --git a/src/SMESH/SMESH_Algo.cxx b/src/SMESH/SMESH_Algo.cxx index 4e4002ee3..968154d1a 100644 --- a/src/SMESH/SMESH_Algo.cxx +++ b/src/SMESH/SMESH_Algo.cxx @@ -42,8 +42,6 @@ #include "SMESH_TypeDefs.hxx" #include "SMESH_subMesh.hxx" -#include - #include #include #include diff --git a/src/SMESH/SMESH_MeshEditor.cxx b/src/SMESH/SMESH_MeshEditor.cxx index cfe4c3e86..83066678d 100644 --- a/src/SMESH/SMESH_MeshEditor.cxx +++ b/src/SMESH/SMESH_MeshEditor.cxx @@ -46,8 +46,6 @@ #include "SMESH_OctreeNode.hxx" #include "SMESH_subMesh.hxx" -#include - #include "utilities.h" #include "chrono.hxx" diff --git a/src/SMESH/SMESH_Pattern.cxx b/src/SMESH/SMESH_Pattern.cxx index db6e60e8c..51564bf78 100644 --- a/src/SMESH/SMESH_Pattern.cxx +++ b/src/SMESH/SMESH_Pattern.cxx @@ -75,8 +75,6 @@ #include #include -#include - #include #include "utilities.h" diff --git a/src/SMESH/SMESH_subMesh.cxx b/src/SMESH/SMESH_subMesh.cxx index 22fa65b99..2f89997ba 100644 --- a/src/SMESH/SMESH_subMesh.cxx +++ b/src/SMESH/SMESH_subMesh.cxx @@ -38,8 +38,6 @@ #include "SMESH_MesherHelper.hxx" #include "SMESH_subMeshEventListener.hxx" -#include - #include "utilities.h" #include "OpUtil.hxx" #include "Basics_Utils.hxx" diff --git a/src/SMESHGUI/SMESHGUI.cxx b/src/SMESHGUI/SMESHGUI.cxx index 527386e74..e92c78093 100644 --- a/src/SMESHGUI/SMESHGUI.cxx +++ b/src/SMESHGUI/SMESHGUI.cxx @@ -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) diff --git a/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx b/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx index 5a32503a1..2d48bf78a 100644 --- a/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx @@ -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){ diff --git a/src/SMESHGUI/SMESHGUI_Filter.cxx b/src/SMESHGUI/SMESHGUI_Filter.cxx index 05d003387..1222c4b80 100755 --- a/src/SMESHGUI/SMESHGUI_Filter.cxx +++ b/src/SMESHGUI/SMESHGUI_Filter.cxx @@ -33,13 +33,13 @@ #include #include -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 diff --git a/src/SMESHGUI/SMESHGUI_Filter.h b/src/SMESHGUI/SMESHGUI_Filter.h index ec36f46d6..08a43c767 100755 --- a/src/SMESHGUI/SMESHGUI_Filter.h +++ b/src/SMESHGUI/SMESHGUI_Filter.h @@ -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 diff --git a/src/SMESHUtils/SMESH_TryCatch.hxx b/src/SMESHUtils/SMESH_TryCatch.hxx index 05d00a1b5..44047a694 100644 --- a/src/SMESHUtils/SMESH_TryCatch.hxx +++ b/src/SMESHUtils/SMESH_TryCatch.hxx @@ -33,7 +33,6 @@ #include #include #include -#include #include // IMPORTANT: include this file _after_ OCC ones, else OCC_CATCH_SIGNALS can be undefined! diff --git a/src/SMESH_I/SMESH_2smeshpy.cxx b/src/SMESH_I/SMESH_2smeshpy.cxx index 876365b0c..220e3d581 100644 --- a/src/SMESH_I/SMESH_2smeshpy.cxx +++ b/src/SMESH_I/SMESH_2smeshpy.cxx @@ -50,22 +50,22 @@ #include #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; diff --git a/src/SMESH_I/SMESH_2smeshpy.hxx b/src/SMESH_I/SMESH_2smeshpy.hxx index 6fd991533..4531a38ed 100644 --- a/src/SMESH_I/SMESH_2smeshpy.hxx +++ b/src/SMESH_I/SMESH_2smeshpy.hxx @@ -40,8 +40,6 @@ #include #include -#include - #include #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 diff --git a/src/SMESH_I/SMESH_Filter_i.cxx b/src/SMESH_I/SMESH_Filter_i.cxx index 9432b9117..95c338377 100644 --- a/src/SMESH_I/SMESH_Filter_i.cxx +++ b/src/SMESH_I/SMESH_Filter_i.cxx @@ -40,8 +40,6 @@ #include #include -#include - #include #include #include @@ -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()< #include #include -#include #include #include @@ -76,15 +75,8 @@ #include #include -#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 -#define NO_CAS_CATCH -#endif - #include - -#ifdef NO_CAS_CATCH #include -#endif #include #include @@ -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::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 ) diff --git a/src/SMESH_I/SMESH_Pattern_i.cxx b/src/SMESH_I/SMESH_Pattern_i.cxx index ca5bcd0d2..70dab5de7 100644 --- a/src/SMESH_I/SMESH_Pattern_i.cxx +++ b/src/SMESH_I/SMESH_Pattern_i.cxx @@ -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) { diff --git a/src/StdMeshers/StdMeshers_Cartesian_3D.cxx b/src/StdMeshers/StdMeshers_Cartesian_3D.cxx index 0b92acc5f..002f20961 100644 --- a/src/StdMeshers/StdMeshers_Cartesian_3D.cxx +++ b/src/StdMeshers/StdMeshers_Cartesian_3D.cxx @@ -36,7 +36,6 @@ #include #include -#include #include @@ -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; diff --git a/src/StdMeshers/StdMeshers_Distribution.cxx b/src/StdMeshers/StdMeshers_Distribution.cxx index f1f26aebf..7fb3956ad 100644 --- a/src/StdMeshers/StdMeshers_Distribution.cxx +++ b/src/StdMeshers/StdMeshers_Distribution.cxx @@ -31,16 +31,9 @@ #include #include -#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 -#define NO_CAS_CATCH -#endif - #include #include - -#ifdef NO_CAS_CATCH #include -#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( const_cast (this) ), a, b, 20 ); if( _int.IsDone() ) diff --git a/src/StdMeshers/StdMeshers_NumberOfSegments.cxx b/src/StdMeshers/StdMeshers_NumberOfSegments.cxx index 2ff7274fc..927e96d02 100644 --- a/src/StdMeshers/StdMeshers_NumberOfSegments.cxx +++ b/src/StdMeshers/StdMeshers_NumberOfSegments.cxx @@ -42,15 +42,8 @@ #include #include -#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 -#define NO_CAS_CATCH -#endif - #include - -#ifdef NO_CAS_CATCH #include -#endif #include @@ -238,9 +231,7 @@ void StdMeshers_NumberOfSegments::SetTableFunction(const vector& 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) { diff --git a/src/StdMeshers/StdMeshers_RadialPrism_3D.cxx b/src/StdMeshers/StdMeshers_RadialPrism_3D.cxx index bbf339a8b..23962cba2 100644 --- a/src/StdMeshers/StdMeshers_RadialPrism_3D.cxx +++ b/src/StdMeshers/StdMeshers_RadialPrism_3D.cxx @@ -29,8 +29,6 @@ #include "StdMeshers_RadialPrism_3D.hxx" -#include - #include "StdMeshers_ProjectionUtils.hxx" #include "StdMeshers_NumberOfLayers.hxx" #include "StdMeshers_LayerDistribution.hxx" diff --git a/src/StdMeshersGUI/StdMeshersGUI_DistrPreview.cxx b/src/StdMeshersGUI/StdMeshersGUI_DistrPreview.cxx index 7eb2f3348..7761be258 100644 --- a/src/StdMeshersGUI/StdMeshersGUI_DistrPreview.cxx +++ b/src/StdMeshersGUI/StdMeshersGUI_DistrPreview.cxx @@ -37,15 +37,8 @@ #include #include -#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 -#define NO_CAS_CATCH -#endif - #include - -#ifdef NO_CAS_CATCH #include -#endif #ifdef WIN32 # include @@ -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; // -- 2.39.2