]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
IPAL21418 TUI command "MakePartition" creates a "Solid" without any exception even...
authordmv <dmv@opencascade.com>
Wed, 28 Oct 2009 14:50:19 +0000 (14:50 +0000)
committerdmv <dmv@opencascade.com>
Wed, 28 Oct 2009 14:50:19 +0000 (14:50 +0000)
src/GEOMImpl/GEOMImpl_PartitionDriver.cxx

index 40d68aa88ae85a41808f911b5798cf52135f5f39..7f54d9abfbd73f7e732096207bff7bd0367baae4 100644 (file)
@@ -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;