From a3476a9fe26140e80cc8d9d02fa0a64b90454838 Mon Sep 17 00:00:00 2001 From: pkv Date: Thu, 26 Feb 2015 13:39:13 +0300 Subject: [PATCH] 0025847: Wrong result obtained by General Fuse operator. I. New features: No new features. II. Changes: II.1. class BOPAlgo_PaveFiller - method: void BOPAlgo_PaveFiller::PerformEE() has been changed. Intended set of VE interferences has been refined to avoid unwanted overlaps of pave blocks - method: void BOPAlgo_PaveFiller::ForceInterfVE(const Standard_Integer nV, Handle(BOPDS_PaveBlock)& aPB, BOPDS_MapOfPaveBlock& aMPBToUpdate) The initialization of increment of VE interferences has been added. - method: Standard_Boolean BOPAlgo_PaveFiller::ForceInterfVF (const Standard_Integer nV, const Standard_Integer nF) The initialization of increment of VF interferences has been added. III. Modified entities: packages: BOPAlgo Test case for issue CR25847 --- src/BOPAlgo/BOPAlgo_PaveFiller_3.cxx | 15 +++++++++++ src/BOPAlgo/BOPAlgo_PaveFiller_5.cxx | 1 + tests/bugs/modalg_5/bug25847 | 37 ++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+) create mode 100755 tests/bugs/modalg_5/bug25847 diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller_3.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller_3.cxx index bbafce4fbd..dffce44d40 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller_3.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller_3.cxx @@ -534,6 +534,20 @@ void BOPAlgo_PaveFiller::PerformEE() //========================================= // post treatment //========================================= + { + Standard_Integer aNbV; + Handle(BOPDS_PaveBlock) aPB1, aPB2; + // + aNbV=aMVCPB.Extent(); + for (i=1; i<=aNbV; ++i) { + const BOPDS_CoupleOfPaveBlocks& aCPB=aMVCPB.FindFromIndex(i); + aCPB.PaveBlocks(aPB1, aPB2); + // + aMPBToUpdate.Remove(aPB1); + aMPBToUpdate.Remove(aPB2); + } + } + // aItPB.Initialize(aMPBToUpdate); for (; aItPB.More(); aItPB.Next()) { Handle(BOPDS_PaveBlock) aPB=aItPB.Value(); @@ -917,6 +931,7 @@ void BOPAlgo_PaveFiller::ForceInterfVE(const Standard_Integer nV, aT=aProjector.LowerDistanceParameter(); // BOPDS_VectorOfInterfVE& aVEs=myDS->InterfVE(); + aVEs.SetIncrement(10); BOPDS_InterfVE& aVE=aVEs.Append1(); aVE.SetIndices(nV, nE); aVE.SetParameter(aT); diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller_5.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller_5.cxx index 785b53d5c7..9a1f5b66fe 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller_5.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller_5.cxx @@ -640,6 +640,7 @@ Standard_Boolean BOPAlgo_PaveFiller::ForceInterfVF BRep_Builder aBB; // BOPDS_VectorOfInterfVF& aVFs=myDS->InterfVF(); + aVFs.SetIncrement(10); BOPDS_InterfVF& aVF=aVFs.Append1(); aVF.SetIndices(nV, nF); aVF.SetUV(U, V); diff --git a/tests/bugs/modalg_5/bug25847 b/tests/bugs/modalg_5/bug25847 new file mode 100755 index 0000000000..5f704ac9c5 --- /dev/null +++ b/tests/bugs/modalg_5/bug25847 @@ -0,0 +1,37 @@ +puts "============" +puts "OCC25847" +puts "============" +puts "" +############################### +## Wrong result obtained by General Fuse operator. +############################### + +restore [locate_data_file bug25847_face_96.brep ] b1 +restore [locate_data_file bug25847_face_294.brep] b2 +restore [locate_data_file bug25847_face_533.brep] b3 +restore [locate_data_file bug25847_face_535.brep] b4 + +bclearobjects +bcleartools +baddobjects b1 b2 b3 b4 + +bfillds +bbuild result + +set square 3912.59 + +set nbshapes_expected " +Number of shapes in shape + VERTEX : 100 + EDGE : 108 + WIRE : 10 + FACE : 9 + SHELL : 0 + SOLID : 0 + COMPSOLID : 0 + COMPOUND : 1 + SHAPE : 228 +" +checknbshapes result ${nbshapes_expected} 1 "Result obtained by General Fuse operator" + +set 3dviewer 1