From: eap Date: Fri, 20 Jul 2007 11:15:07 +0000 (+0000) Subject: PAL15881 New NETGEN capability: is it possible to do only a 2D mesh ? X-Git-Tag: T15881~9 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=763f147f509a230bc314263f9758084958c8dc51;p=modules%2Fsmesh.git PAL15881 New NETGEN capability: is it possible to do only a 2D mesh ? catch exceptions in myPattern.Apply( aMesh, fset, theNodeIndexOnKeyPoint1, theReverse ); --- diff --git a/src/SMESH_I/SMESH_Pattern_i.cxx b/src/SMESH_I/SMESH_Pattern_i.cxx index 13ed3ac89..4f730b387 100644 --- a/src/SMESH_I/SMESH_Pattern_i.cxx +++ b/src/SMESH_I/SMESH_Pattern_i.cxx @@ -40,6 +40,9 @@ #include #include +#include +#include + #include #include @@ -286,8 +289,24 @@ SMESH::point_array* if ( elem && elem->GetType() == SMDSAbs_Face ) fset.insert( static_cast( elem )); } - if (myPattern.Apply( fset, theNodeIndexOnKeyPoint1, theReverse ) && - myPattern.GetMappedPoints( xyzList )) + bool ok = false; + try { +#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 + OCC_CATCH_SIGNALS; +#endif + ok = myPattern.Apply( aMesh, fset, theNodeIndexOnKeyPoint1, theReverse ); + } + catch (Standard_Failure& exc) { + MESSAGE("OCCT Exception in SMESH_Pattern: " << exc.GetMessageString()); + } + catch ( std::exception& exc ) { + MESSAGE("STD Exception in SMESH_Pattern: << exc.what()"); + } + catch ( ... ) { + MESSAGE("Unknown Exception in SMESH_Pattern"); + } + + if ( ok && myPattern.GetMappedPoints( xyzList )) { points->length( xyzList.size() ); list::iterator xyzIt = xyzList.begin();