From 3ebcadd35c77d2c0db680b446e9720a256593677 Mon Sep 17 00:00:00 2001 From: dmv Date: Tue, 1 Dec 2009 08:35:20 +0000 Subject: [PATCH] 0020604: EDF 1172 GEOM : Result of boolean operations, a null compound is not a correct result --- src/GEOMImpl/GEOMImpl_BooleanDriver.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/GEOMImpl/GEOMImpl_BooleanDriver.cxx b/src/GEOMImpl/GEOMImpl_BooleanDriver.cxx index 4cf212312..ae4fa899c 100644 --- a/src/GEOMImpl/GEOMImpl_BooleanDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_BooleanDriver.cxx @@ -436,6 +436,15 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute(TFunction_Logbook& log) const // Standard_ConstructionError::Raise("Boolean operation aborted : non valid shape result"); //} + //Alternative case to check shape result Mantis 0020604: EDF 1172 + TopoDS_Iterator It (aShape, Standard_True, Standard_True); + int nbSubshapes=0; + for (; It.More(); It.Next()) + nbSubshapes++; + if (!nbSubshapes) + Standard_ConstructionError::Raise("Boolean operation aborted : result object is empty compound"); + //end of 0020604: EDF 1172 + aFunction->SetValue(aShape); log.SetTouched(Label()); -- 2.39.2