NPAL18078: dependance on CASCADE in Salome.

This commit is contained in:
jfa 2007-11-30 08:33:11 +00:00
parent fc387c8013
commit 666558e956
4 changed files with 11 additions and 86 deletions

View File

@ -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 <Standard_ErrorHandler.hxx>
#else
#include "CASCatch.hxx"
#endif
#include <sstream>
@ -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() );
}

View File

@ -39,8 +39,6 @@
#ifdef NO_CAS_CATCH
#include <Standard_ErrorHandler.hxx>
#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<math_Function*>( const_cast<FunctionExpr*> (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" );
}

View File

@ -49,8 +49,6 @@
#ifdef NO_CAS_CATCH
#include <Standard_ErrorHandler.hxx>
#else
#include "CASCatch.hxx"
#endif
using namespace std;
@ -233,18 +231,12 @@ void StdMeshers_NumberOfSegments::SetTableFunction(const vector<double>& 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;
}

View File

@ -31,8 +31,6 @@
#ifdef NO_CAS_CATCH
#include <Standard_ErrorHandler.hxx>
#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;