From: eap Date: Mon, 9 Jun 2008 09:26:10 +0000 (+0000) Subject: [SALOME platform 0019864]: BLSurf meshing without hypothesis X-Git-Tag: V4_1_3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=358556161e5d21c404e8a138d3e57d00e7e849c4;p=plugins%2Fblsurfplugin.git [SALOME platform 0019864]: BLSurf meshing without hypothesis disable FE signals --- diff --git a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx index a35f3c4..eff6758 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx +++ b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx @@ -69,6 +69,10 @@ extern "C"{ #include #include +#ifndef WNT +#include +#endif + //============================================================================= /*! * @@ -343,20 +347,24 @@ bool BLSURFPlugin_BLSURF::Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape) cout << "Beginning of Surface Mesh generation" << endl; cout << endl; - status_t status = STATUS_ERROR; + // Issue 0019864. On DebianSarge, FE signals do not obey to OSD::SetSignal(false) +#ifndef WNT + feclearexcept( FE_ALL_EXCEPT ); + int oldFEFlags = fedisableexcept( FE_ALL_EXCEPT ); +#endif + + status_t status = STATUS_ERROR; try { OCC_CATCH_SIGNALS; + status = blsurf_compute_mesh(bls); + } catch ( std::exception& exc ) { -// if ( !_comment.empty() ) -// _comment += "\n"; _comment += exc.what(); } catch (Standard_Failure& ex) { -// if ( !_comment.empty() ) -// _comment += "\n"; _comment += ex.DynamicType()->Name(); if ( ex.GetMessageString() && strlen( ex.GetMessageString() )) { _comment += ": "; @@ -373,7 +381,6 @@ bool BLSURFPlugin_BLSURF::Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape) context_delete(ctx); return error(_comment); - //return false; } cout << endl; @@ -487,6 +494,13 @@ bool BLSURFPlugin_BLSURF::Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape) context_delete(ctx); + // Issue 0019864. On DebianSarge, FE signals do not obey to OSD::SetSignal(false) +#ifndef WNT + if ( oldFEFlags > 0 ) + feenableexcept( oldFEFlags ); + feclearexcept( FE_ALL_EXCEPT ); +#endif + return true; }