From: dmv Date: Wed, 28 Oct 2009 14:50:19 +0000 (+0000) Subject: IPAL21418 TUI command "MakePartition" creates a "Solid" without any exception even... X-Git-Tag: RELIQUAT_5x_30102009~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d03bac55972fa8cc528d2b70f928bf953f765604;p=modules%2Fgeom.git IPAL21418 TUI command "MakePartition" creates a "Solid" without any exception even if the partition resul is empty. --- diff --git a/src/GEOMImpl/GEOMImpl_PartitionDriver.cxx b/src/GEOMImpl/GEOMImpl_PartitionDriver.cxx index 40d68aa88..7f54d9abf 100644 --- a/src/GEOMImpl/GEOMImpl_PartitionDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_PartitionDriver.cxx @@ -261,6 +261,15 @@ Standard_Integer GEOMImpl_PartitionDriver::Execute(TFunction_Logbook& log) const aShape = PS.Shape(); if (aShape.IsNull()) return 0; + //Alternative case to check not valid partition IPAL21418 + TopoDS_Iterator It (aShape, Standard_True, Standard_True); + int nbSubshapes=0; + for (; It.More(); It.Next()) + nbSubshapes++; + if (!nbSubshapes) + Standard_ConstructionError::Raise("Partition aborted : non valid shape result"); + //end of IPAL21418 + if (!BRepAlgo::IsValid(aShape)) { // 08.07.2008 added by skl during fixing bug 19761 from Mantis ShapeFix_ShapeTolerance aSFT;