From 17dc647e53edf5b35ad287ef397a5dbe7d7e937f Mon Sep 17 00:00:00 2001 From: dmv Date: Wed, 28 Oct 2009 14:51:18 +0000 Subject: [PATCH] IPAL21418 TUI command "MakePartition" creates a "Solid" without any exception even if the partition resul is empty. --- src/GEOMImpl/GEOMImpl_PartitionDriver.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) 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; -- 2.39.2