From: eap Date: Tue, 14 Oct 2008 14:39:50 +0000 (+0000) Subject: PAL20497 4.x Computation of the mesh via attached script is failed. X-Git-Tag: RELIQUAT_4x_25102008 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3c52f8fa35aea8a7b253d1d53949fefdbc96d721;p=plugins%2Fnetgenplugin.git PAL20497 4.x Computation of the mesh via attached script is failed. protect from eexceptions in BRepMesh_IncrementalMesh --- diff --git a/src/NETGENPlugin/NETGENPlugin_Mesher.cxx b/src/NETGENPlugin/NETGENPlugin_Mesher.cxx index f9de58a..66a35a8 100644 --- a/src/NETGENPlugin/NETGENPlugin_Mesher.cxx +++ b/src/NETGENPlugin/NETGENPlugin_Mesher.cxx @@ -51,6 +51,7 @@ #include #include #include +#include // Netgen include files namespace nglib { @@ -198,7 +199,13 @@ void NETGENPlugin_Mesher::PrepareOCCgeometry(netgen::OCCGeometry& occgeo, list< SMESH_subMesh* > * meshedSM) { BRepTools::Clean (shape); - BRepMesh_IncrementalMesh::BRepMesh_IncrementalMesh (shape, 0.01, true); + try { +#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 + OCC_CATCH_SIGNALS; +#endif + BRepMesh_IncrementalMesh::BRepMesh_IncrementalMesh (shape, 0.01, true); + } catch (Standard_Failure) { + } Bnd_Box bb; BRepBndLib::Add (shape, bb); double x1,y1,z1,x2,y2,z2;