Consider OCCT version

This commit is contained in:
jfa 2006-08-28 15:03:11 +00:00
parent 057dae0b9e
commit 12cf1a48c8
6 changed files with 26 additions and 0 deletions

View File

@ -1265,7 +1265,9 @@ bool SMESH_subMesh::ComputeStateEngine(int event)
RemoveSubMeshElementsAndNodes();
{
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!algo->NeedDescretBoundary() && !algo->OnlyUnaryInput())
ret = ApplyToCollection( algo, GetCollection( gen, algo ) );
else

View File

@ -1055,7 +1055,9 @@ void SMESH_MeshEditor_i::ExtrusionSweep(const SMESH::long_array & theIDsOfElemen
myLastCreatedNodes = new SMESH::long_array();
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
SMESHDS_Mesh* aMesh = GetMeshDS();
map<int,const SMDS_MeshElement*> elements;

View File

@ -49,7 +49,9 @@ bool Function::value( const double, double& f ) const
if( myConv==0 )
{
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
f = pow( 10, f );
}
catch(Standard_Failure)
@ -173,7 +175,9 @@ FunctionExpr::FunctionExpr( const char* str, const int conv )
{
bool ok = true;
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
myExpr = ExprIntrp_GenExp::Create();
myExpr->Process( ( Standard_CString )str );
}
@ -209,7 +213,9 @@ bool FunctionExpr::value( const double t, double& f ) const
( ( TColStd_Array1OfReal& )myValues ).ChangeValue( 1 ) = t;
bool ok = true;
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
f = myExpr->Expression()->Evaluate( myVars, myValues );
}
catch(Standard_Failure) {
@ -226,7 +232,9 @@ double FunctionExpr::integral( const double a, const double b ) const
{
double res = 0.0;
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
math_GaussSingleIntegration _int( ( math_Function& )*this, a, b, 20 );
if( _int.IsDone() )
res = _int.Value();

View File

@ -220,7 +220,9 @@ void StdMeshers_NumberOfSegments::SetTableFunction(const std::vector<double>& ta
if( _convMode==0 )
{
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
val = pow( 10.0, val );
}
catch(Standard_Failure)
@ -314,7 +316,9 @@ bool process( const TCollection_AsciiString& str, int convMode,
bool parsed_ok = true;
Handle( ExprIntrp_GenExp ) myExpr;
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
myExpr = ExprIntrp_GenExp::Create();
myExpr->Process( str.ToCString() );
}

View File

@ -575,7 +575,9 @@ bool StdMeshers_Regular_1D::Compute(SMESH_Mesh & aMesh, const TopoDS_Shape & aSh
if ( !_mainEdge.IsNull() )
reversed = aMesh.IsReversedInChain( EE, _mainEdge );
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if ( ! computeInternalParameters( E, params, reversed )) {
//cout << "computeInternalParameters() failed" <<endl;
return false;

View File

@ -243,7 +243,9 @@ void StdMeshersGUI_DistrPreview::update()
x = y = 0;
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
replot();
}
catch(Standard_Failure)
@ -288,7 +290,9 @@ bool StdMeshersGUI_DistrPreview::init( const QString& str )
{
bool parsed_ok = true;
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
myExpr = ExprIntrp_GenExp::Create();
myExpr->Process( ( Standard_CString ) str.latin1() );
}
@ -330,7 +334,9 @@ double StdMeshersGUI_DistrPreview::calc( bool& ok )
ok = true;
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
res = myExpr->Expression()->Evaluate( myVars, myValues );
}
catch(Standard_Failure) {
@ -355,7 +361,9 @@ bool StdMeshersGUI_DistrPreview::convert( double& v ) const
case EXPONENT:
{
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
// in StdMeshers_NumberOfSegments.cc
// const double PRECISION = 1e-7;
//