From: jfa Date: Wed, 12 May 2010 11:32:41 +0000 (+0000) Subject: Mantis issue 0020859: Partition operation fails on first try. X-Git-Tag: V5_1_4rc2~10 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=92cc19641aacb4ff1cacf9b10ad859bfcc5824d7;p=modules%2Fgeom.git Mantis issue 0020859: Partition operation fails on first try. --- diff --git a/src/GEOMImpl/GEOMImpl_PartitionDriver.cxx b/src/GEOMImpl/GEOMImpl_PartitionDriver.cxx index e6ff34fea..0766ea2ef 100644 --- a/src/GEOMImpl/GEOMImpl_PartitionDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_PartitionDriver.cxx @@ -35,6 +35,7 @@ #include +#include #include #include @@ -141,6 +142,12 @@ Standard_Integer GEOMImpl_PartitionDriver::Execute(TFunction_Logbook& log) const Standard_NullObject::Raise("In Partition a shape is null"); } // + BRepBuilderAPI_Copy aCopyTool (aShape_i); + if (aCopyTool.IsDone()) + aShape_i = aCopyTool.Shape(); + else + Standard_NullObject::Raise("Bad shape detected"); + // TopTools_ListOfShape aSimpleShapes; PrepareShapes(aShape_i, aType, aSimpleShapes); TopTools_ListIteratorOfListOfShape aSimpleIter (aSimpleShapes); @@ -164,6 +171,12 @@ Standard_Integer GEOMImpl_PartitionDriver::Execute(TFunction_Logbook& log) const Standard_NullObject::Raise("In Partition a tool shape is null"); } // + BRepBuilderAPI_Copy aCopyTool (aShape_i); + if (aCopyTool.IsDone()) + aShape_i = aCopyTool.Shape(); + else + Standard_NullObject::Raise("Bad shape detected"); + // TopTools_ListOfShape aSimpleShapes; PrepareShapes(aShape_i, aType, aSimpleShapes); TopTools_ListIteratorOfListOfShape aSimpleIter (aSimpleShapes); @@ -183,6 +196,12 @@ Standard_Integer GEOMImpl_PartitionDriver::Execute(TFunction_Logbook& log) const Standard_NullObject::Raise("In Partition a Keep Inside shape is null"); } // + BRepBuilderAPI_Copy aCopyTool (aShape_i); + if (aCopyTool.IsDone()) + aShape_i = aCopyTool.Shape(); + else + Standard_NullObject::Raise("Bad shape detected"); + // TopTools_ListOfShape aSimpleShapes; PrepareShapes(aShape_i, aType, aSimpleShapes); TopTools_ListIteratorOfListOfShape aSimpleIter (aSimpleShapes); @@ -201,6 +220,12 @@ Standard_Integer GEOMImpl_PartitionDriver::Execute(TFunction_Logbook& log) const Standard_NullObject::Raise("In Partition a Remove Inside shape is null"); } // + BRepBuilderAPI_Copy aCopyTool (aShape_i); + if (aCopyTool.IsDone()) + aShape_i = aCopyTool.Shape(); + else + Standard_NullObject::Raise("Bad shape detected"); + // TopTools_ListOfShape aSimpleShapes; PrepareShapes(aShape_i, aType, aSimpleShapes); TopTools_ListIteratorOfListOfShape aSimpleIter (aSimpleShapes);