From: skv Date: Thu, 23 Apr 2015 08:36:19 +0000 (+0300) Subject: fix for test cases bugs_13/N8 and imps_04/E5 X-Git-Tag: V7_6_0rc1~29 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=bcf1da3d8281c41e52351cd3ee492f476b6f8c67;p=modules%2Fgeom.git fix for test cases bugs_13/N8 and imps_04/E5 --- diff --git a/src/GEOMImpl/GEOMImpl_BooleanDriver.cxx b/src/GEOMImpl/GEOMImpl_BooleanDriver.cxx index 5c0812760..4d6a72f2a 100644 --- a/src/GEOMImpl/GEOMImpl_BooleanDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_BooleanDriver.cxx @@ -548,71 +548,6 @@ TopoDS_Shape GEOMImpl_BooleanDriver::performOperation if ( !GEOMUtils::CheckShape(aShape, true) && !GEOMUtils::FixShapeTolerance(aShape) ) Standard_ConstructionError::Raise("Boolean operation aborted : non valid shape result"); - // BEGIN: Mantis issue 0021060: always limit tolerance of BOP result - // 1. Get shape parameters for comparison - int nbTypes [TopAbs_SHAPE]; - { - for (int iType = 0; iType < TopAbs_SHAPE; ++iType) - nbTypes[iType] = 0; - nbTypes[aShape.ShapeType()]++; - - TopTools_MapOfShape aMapOfShape; - aMapOfShape.Add(aShape); - TopTools_ListOfShape aListOfShape; - aListOfShape.Append(aShape); - - TopTools_ListIteratorOfListOfShape itL (aListOfShape); - for (; itL.More(); itL.Next()) { - TopoDS_Iterator it (itL.Value()); - for (; it.More(); it.Next()) { - TopoDS_Shape s = it.Value(); - if (aMapOfShape.Add(s)) { - aListOfShape.Append(s); - nbTypes[s.ShapeType()]++; - } - } - } - } - - // 2. Limit tolerance - TopoDS_Shape aShapeCopy; - TColStd_IndexedDataMapOfTransientTransient aMapTShapes; - TNaming_CopyShape::CopyTool(aShape, aMapTShapes, aShapeCopy); - - if ( GEOMUtils::FixShapeTolerance(aShapeCopy, true) ) { - int iType, nbTypesCopy [TopAbs_SHAPE]; - - for (iType = 0; iType < TopAbs_SHAPE; ++iType) - nbTypesCopy[iType] = 0; - nbTypesCopy[aShapeCopy.ShapeType()]++; - - TopTools_MapOfShape aMapOfShape; - aMapOfShape.Add(aShapeCopy); - TopTools_ListOfShape aListOfShape; - aListOfShape.Append(aShapeCopy); - - TopTools_ListIteratorOfListOfShape itL (aListOfShape); - for (; itL.More(); itL.Next()) { - TopoDS_Iterator it (itL.Value()); - for (; it.More(); it.Next()) { - TopoDS_Shape s = it.Value(); - if (aMapOfShape.Add(s)) { - aListOfShape.Append(s); - nbTypesCopy[s.ShapeType()]++; - } - } - } - - bool isEqual = true; - for (iType = 0; iType < TopAbs_SHAPE && isEqual; ++iType) { - if (nbTypes[iType] != nbTypesCopy[iType]) - isEqual = false; - } - if (isEqual) - aShape = aShapeCopy; - } - // END: Mantis issue 0021060 - return aShape; }