From: jfa Date: Mon, 24 Jun 2013 11:47:08 +0000 (+0000) Subject: Mantis issue 0021934: Delete the internal faces of an object. Correction to avoid... X-Git-Tag: BR_hydro_v_0_3_1~171 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=182542382e76665caca9b221d5c8aaffef2f0fca;p=modules%2Fgeom.git Mantis issue 0021934: Delete the internal faces of an object. Correction to avoid errors on not suitable arguments. --- diff --git a/src/GEOMImpl/GEOMImpl_HealingDriver.cxx b/src/GEOMImpl/GEOMImpl_HealingDriver.cxx index 644b8a835..a7514b0dd 100644 --- a/src/GEOMImpl/GEOMImpl_HealingDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_HealingDriver.cxx @@ -458,18 +458,21 @@ Standard_Boolean GEOMImpl_HealingDriver::RemoveInternalFaces (const TopoDS_Shape aTool.SetShape(theOriginalShape); aTool.Perform(); - if (aTool.ErrorStatus() != 0) - StdFail_NotDone::Raise("GEOMAlgo_RemoverWebs failed!"); - - theOutShape = aTool.Result(); - - // as GEOMAlgo_RemoverWebs always produces compound, lets simplify it - // for the case, if it contains only one sub-shape - TopTools_ListOfShape listShapeRes; - GEOMUtils::AddSimpleShapes(theOutShape, listShapeRes); - if (listShapeRes.Extent() == 1) { - theOutShape = listShapeRes.First(); + if (aTool.ErrorStatus() == 0) { // OK + theOutShape = aTool.Result(); + + // as GEOMAlgo_RemoverWebs always produces compound, lets simplify it + // for the case, if it contains only one sub-shape + TopTools_ListOfShape listShapeRes; + GEOMUtils::AddSimpleShapes(theOutShape, listShapeRes); + if (listShapeRes.Extent() == 1) { + theOutShape = listShapeRes.First(); + } } + else if (aTool.ErrorStatus() == 11) // invalid argument (contains non-solids), do nothing + theOutShape = theOriginalShape; + else // error + StdFail_NotDone::Raise("GEOMAlgo_RemoverWebs failed!"); return Standard_True; }