From c45fefa76e2aeb0c88907a67bbbdad4cb8df5c28 Mon Sep 17 00:00:00 2001 From: emv Date: Tue, 30 Aug 2016 08:36:48 +0300 Subject: [PATCH] 0027222: Empty result of making volume operation 1. BOPAlgo_MakerVolume - Taking into account the possibility of Same Domain faces while collecting the faces for building the solids; 2. BOPDS_DS - Making the check on coincidence of edges consistent with the intersection algorithm which also adds the Precision::Confusion() to the intersection tolerance; 3. Test case for the issue. 4. Adjusting test cases (improvements) to their new behavior. --- src/BOPAlgo/BOPAlgo_MakerVolume.cxx | 5 ++++- src/BOPDS/BOPDS_DS.cxx | 2 +- tests/boolean/volumemaker/A3 | 6 +----- tests/boolean/volumemaker/A7 | 3 --- tests/boolean/volumemaker/B6 | 3 --- tests/boolean/volumemaker/C2 | 3 --- tests/bugs/modalg_6/bug27222 | 13 +++++++++++++ 7 files changed, 19 insertions(+), 16 deletions(-) create mode 100644 tests/bugs/modalg_6/bug27222 diff --git a/src/BOPAlgo/BOPAlgo_MakerVolume.cxx b/src/BOPAlgo/BOPAlgo_MakerVolume.cxx index b596db0154..69808488c8 100644 --- a/src/BOPAlgo/BOPAlgo_MakerVolume.cxx +++ b/src/BOPAlgo/BOPAlgo_MakerVolume.cxx @@ -200,6 +200,7 @@ void BOPAlgo_MakerVolume::CollectFaces() // Standard_Integer i, aNbShapes; BOPCol_ListIteratorOfListOfShape aIt; + BOPCol_MapOfShape aMFence; // aNbShapes = myDS->NbSourceShapes(); for (i = 0; i < aNbShapes; ++i) { @@ -217,7 +218,9 @@ void BOPAlgo_MakerVolume::CollectFaces() aIt.Initialize(aLFIm); for (; aIt.More(); aIt.Next()) { const TopoDS_Shape& aFIm = aIt.Value(); - AddFace(aFIm, myFaces); + if (aMFence.Add(aFIm)) { + AddFace(aFIm, myFaces); + } } } else { diff --git a/src/BOPDS/BOPDS_DS.cxx b/src/BOPDS/BOPDS_DS.cxx index a89cad8dc1..199487f70f 100644 --- a/src/BOPDS/BOPDS_DS.cxx +++ b/src/BOPDS/BOPDS_DS.cxx @@ -1734,7 +1734,7 @@ Standard_Boolean BOPDS_DS::CheckCoincidence aD=aPPC.LowerDistance(); // aTol=BRep_Tool::Tolerance(aE1); - aTol=aTol+BRep_Tool::Tolerance(aE2); + aTol=aTol+BRep_Tool::Tolerance(aE2) + Precision::Confusion(); if (aDaT21 && aT2x