From: jfa Date: Fri, 30 Nov 2007 08:33:11 +0000 (+0000) Subject: NPAL18078: dependance on CASCADE in Salome. X-Git-Tag: V4_1_0rc2~8 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=666558e956dd2735fc907e0cca69e38da19c03c4;p=modules%2Fsmesh.git NPAL18078: dependance on CASCADE in Salome. --- diff --git a/src/SMESH_I/SMESH_MeshEditor_i.cxx b/src/SMESH_I/SMESH_MeshEditor_i.cxx index 77914d16e..7c8d3197a 100644 --- a/src/SMESH_I/SMESH_MeshEditor_i.cxx +++ b/src/SMESH_I/SMESH_MeshEditor_i.cxx @@ -38,7 +38,6 @@ #include "SMESH_Filter_i.hxx" #include "SMESH_PythonDump.hxx" -#include "CASCatch.hxx" #include "utilities.h" #include "Utils_ExceptHandlers.hxx" #include "Utils_CorbaException.hxx" @@ -61,8 +60,6 @@ #ifdef NO_CAS_CATCH #include -#else -#include "CASCatch.hxx" #endif #include @@ -1524,11 +1521,9 @@ SMESH_MeshEditor_i::extrusionSweep(const SMESH::long_array & theIDsOfElements, { initData(); -#ifdef NO_CAS_CATCH try { +#ifdef NO_CAS_CATCH OCC_CATCH_SIGNALS; -#else - CASCatch_TRY { #endif TIDSortedElemSet elements; arrayToSet(theIDsOfElements, GetMeshDS(), elements, theElementType); @@ -1545,11 +1540,7 @@ SMESH_MeshEditor_i::extrusionSweep(const SMESH::long_array & theIDsOfElements, return theMakeGroups ? getGroups(groupIds.get()) : 0; -#ifdef NO_CAS_CATCH } catch(Standard_Failure) { -#else - } CASCatch_CATCH(Standard_Failure) { -#endif Handle(Standard_Failure) aFail = Standard_Failure::Caught(); INFOS( "SMESH_MeshEditor_i::ExtrusionSweep fails - "<< aFail->GetMessageString() ); } diff --git a/src/StdMeshers/StdMeshers_Distribution.cxx b/src/StdMeshers/StdMeshers_Distribution.cxx index 441536327..fce8298f4 100644 --- a/src/StdMeshers/StdMeshers_Distribution.cxx +++ b/src/StdMeshers/StdMeshers_Distribution.cxx @@ -39,8 +39,6 @@ #ifdef NO_CAS_CATCH #include -#else -#include "CASCatch.hxx" #endif Function::Function( const int conv ) @@ -56,18 +54,12 @@ bool Function::value( const double, double& f ) const { bool ok = true; if (myConv == 0) { -#ifdef NO_CAS_CATCH try { +#ifdef NO_CAS_CATCH OCC_CATCH_SIGNALS; -#else - CASCatch_TRY { #endif f = pow( 10., f ); -#ifdef NO_CAS_CATCH } catch(Standard_Failure) { -#else - } CASCatch_CATCH(Standard_Failure) { -#endif Handle(Standard_Failure) aFail = Standard_Failure::Caught(); f = 0.0; ok = false; @@ -194,19 +186,13 @@ FunctionExpr::FunctionExpr( const char* str, const int conv ) myValues( 1, 1 ) { bool ok = true; -#ifdef NO_CAS_CATCH try { +#ifdef NO_CAS_CATCH OCC_CATCH_SIGNALS; -#else - CASCatch_TRY { #endif myExpr = ExprIntrp_GenExp::Create(); myExpr->Process( ( Standard_CString )str ); -#ifdef NO_CAS_CATCH } catch(Standard_Failure) { -#else - } CASCatch_CATCH(Standard_Failure) { -#endif Handle(Standard_Failure) aFail = Standard_Failure::Caught(); ok = false; } @@ -236,18 +222,12 @@ bool FunctionExpr::value( const double t, double& f ) const ( ( TColStd_Array1OfReal& )myValues ).ChangeValue( 1 ) = t; bool ok = true; -#ifdef NO_CAS_CATCH try { +#ifdef NO_CAS_CATCH OCC_CATCH_SIGNALS; -#else - CASCatch_TRY { #endif f = myExpr->Expression()->Evaluate( myVars, myValues ); -#ifdef NO_CAS_CATCH } catch(Standard_Failure) { -#else - } CASCatch_CATCH(Standard_Failure) { -#endif Handle(Standard_Failure) aFail = Standard_Failure::Caught(); f = 0.0; ok = false; @@ -260,21 +240,15 @@ bool FunctionExpr::value( const double t, double& f ) const double FunctionExpr::integral( const double a, const double b ) const { double res = 0.0; -#ifdef NO_CAS_CATCH try { +#ifdef NO_CAS_CATCH OCC_CATCH_SIGNALS; -#else - CASCatch_TRY { #endif math_GaussSingleIntegration _int ( *static_cast( const_cast (this) ), a, b, 20 ); if( _int.IsDone() ) res = _int.Value(); -#ifdef NO_CAS_CATCH } catch(Standard_Failure) { -#else - } CASCatch_CATCH(Standard_Failure) { -#endif res = 0.0; MESSAGE( "Exception in integral calculating" ); } diff --git a/src/StdMeshers/StdMeshers_NumberOfSegments.cxx b/src/StdMeshers/StdMeshers_NumberOfSegments.cxx index a6364114a..51300c137 100644 --- a/src/StdMeshers/StdMeshers_NumberOfSegments.cxx +++ b/src/StdMeshers/StdMeshers_NumberOfSegments.cxx @@ -49,8 +49,6 @@ #ifdef NO_CAS_CATCH #include -#else -#include "CASCatch.hxx" #endif using namespace std; @@ -233,18 +231,12 @@ void StdMeshers_NumberOfSegments::SetTableFunction(const vector& table) double val = table[i*2+1]; if( _convMode==0 ) { -#ifdef NO_CAS_CATCH try { +#ifdef NO_CAS_CATCH OCC_CATCH_SIGNALS; -#else - CASCatch_TRY { #endif val = pow( 10.0, val ); -#ifdef NO_CAS_CATCH } catch(Standard_Failure) { -#else - } CASCatch_CATCH(Standard_Failure) { -#endif Handle(Standard_Failure) aFail = Standard_Failure::Caught(); throw SALOME_Exception( LOCALIZED( "invalid value")); return; @@ -333,19 +325,13 @@ bool process( const TCollection_AsciiString& str, int convMode, { bool parsed_ok = true; Handle( ExprIntrp_GenExp ) myExpr; -#ifdef NO_CAS_CATCH try { +#ifdef NO_CAS_CATCH OCC_CATCH_SIGNALS; -#else - CASCatch_TRY { #endif myExpr = ExprIntrp_GenExp::Create(); myExpr->Process( str.ToCString() ); -#ifdef NO_CAS_CATCH } catch(Standard_Failure) { -#else - } CASCatch_CATCH(Standard_Failure) { -#endif Handle(Standard_Failure) aFail = Standard_Failure::Caught(); parsed_ok = false; } diff --git a/src/StdMeshersGUI/StdMeshersGUI_DistrPreview.cxx b/src/StdMeshersGUI/StdMeshersGUI_DistrPreview.cxx index 482aeb6be..460dfb4d5 100644 --- a/src/StdMeshersGUI/StdMeshersGUI_DistrPreview.cxx +++ b/src/StdMeshersGUI/StdMeshersGUI_DistrPreview.cxx @@ -31,8 +31,6 @@ #ifdef NO_CAS_CATCH #include -#else -#include "CASCatch.hxx" #endif StdMeshersGUI_DistrPreview::StdMeshersGUI_DistrPreview( QWidget* p, StdMeshers::StdMeshers_NumberOfSegments_ptr h ) @@ -251,18 +249,12 @@ void StdMeshersGUI_DistrPreview::update() delete[] y; x = y = 0; -#ifdef NO_CAS_CATCH try { +#ifdef NO_CAS_CATCH OCC_CATCH_SIGNALS; -#else - CASCatch_TRY { #endif replot(); -#ifdef NO_CAS_CATCH } catch(Standard_Failure) { -#else - } CASCatch_CATCH(Standard_Failure) { -#endif Handle(Standard_Failure) aFail = Standard_Failure::Caught(); } } @@ -302,19 +294,13 @@ bool isCorrectArg( const Handle( Expr_GeneralExpression )& expr ) bool StdMeshersGUI_DistrPreview::init( const QString& str ) { bool parsed_ok = true; -#ifdef NO_CAS_CATCH try { +#ifdef NO_CAS_CATCH OCC_CATCH_SIGNALS; -#else - CASCatch_TRY { #endif myExpr = ExprIntrp_GenExp::Create(); myExpr->Process( ( Standard_CString ) str.latin1() ); -#ifdef NO_CAS_CATCH } catch(Standard_Failure) { -#else - } CASCatch_CATCH(Standard_Failure) { -#endif Handle(Standard_Failure) aFail = Standard_Failure::Caught(); parsed_ok = false; } @@ -350,18 +336,12 @@ double StdMeshersGUI_DistrPreview::calc( bool& ok ) double res = 0.0; ok = true; -#ifdef NO_CAS_CATCH try { +#ifdef NO_CAS_CATCH OCC_CATCH_SIGNALS; -#else - CASCatch_TRY { #endif res = myExpr->Expression()->Evaluate( myVars, myValues ); -#ifdef NO_CAS_CATCH } catch(Standard_Failure) { -#else - } CASCatch_CATCH(Standard_Failure) { -#endif Handle(Standard_Failure) aFail = Standard_Failure::Caught(); ok = false; res = 0.0; @@ -382,22 +362,16 @@ bool StdMeshersGUI_DistrPreview::convert( double& v ) const { case EXPONENT: { -#ifdef NO_CAS_CATCH try { +#ifdef NO_CAS_CATCH OCC_CATCH_SIGNALS; -#else - CASCatch_TRY { #endif // in StdMeshers_NumberOfSegments.cc // const double PRECISION = 1e-7; // if(v < -7) v = -7.0; v = pow( 10.0, v ); -#ifdef NO_CAS_CATCH } catch(Standard_Failure) { -#else - } CASCatch_CATCH(Standard_Failure) { -#endif Handle(Standard_Failure) aFail = Standard_Failure::Caught(); v = 0.0; ok = false;