From: jfa Date: Thu, 17 Dec 2009 09:43:45 +0000 (+0000) Subject: Mantis issue 0020589: EDF 1171 GEOM : Check compound of blocks: crash. X-Git-Tag: V6_0_0~8 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=638b55926742a893d25e28e63aea21d6ab50c79d;p=modules%2Fgeom.git Mantis issue 0020589: EDF 1171 GEOM : Check compound of blocks: crash. --- diff --git a/src/GEOMAlgo/BlockFix_UnionFaces.cxx b/src/GEOMAlgo/BlockFix_UnionFaces.cxx index 8149a7819..0de284a03 100644 --- a/src/GEOMAlgo/BlockFix_UnionFaces.cxx +++ b/src/GEOMAlgo/BlockFix_UnionFaces.cxx @@ -90,6 +90,9 @@ #include #include +#include +#include // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC + //======================================================================= //function : BlockFix_UnionFaces //purpose : @@ -609,11 +612,19 @@ Standard_Boolean BlockFix_UnionFaces::IsSameDomain(const TopoDS_Face& aFace, Handle(BRepTopAdaptor_TopolTool) aTT1 = new BRepTopAdaptor_TopolTool(); Handle(BRepTopAdaptor_TopolTool) aTT2 = new BRepTopAdaptor_TopolTool(); - IntPatch_TheIIIntOfIntersection anIIInt (aGA1, aTT1, aGA2, aTT2, aPrec, aPrec); - if (!anIIInt.IsDone() || anIIInt.IsEmpty()) - return false; + try { +#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 + OCC_CATCH_SIGNALS; +#endif + IntPatch_TheIIIntOfIntersection anIIInt (aGA1, aTT1, aGA2, aTT2, aPrec, aPrec); + if (!anIIInt.IsDone() || anIIInt.IsEmpty()) + return false; - return anIIInt.TangentFaces(); + return anIIInt.TangentFaces(); + } + catch (Standard_Failure) { + return false; + } } // case of two planar surfaces: