diff --git a/src/BOPDS/BOPDS_DS.cxx b/src/BOPDS/BOPDS_DS.cxx index 095e4236fa..cc6f879281 100644 --- a/src/BOPDS/BOPDS_DS.cxx +++ b/src/BOPDS/BOPDS_DS.cxx @@ -1315,7 +1315,6 @@ void BOPDS_DS::AloneVertices(const Standard_Integer theI, } } } - //======================================================================= //function : VerticesOnIn //purpose : @@ -1325,79 +1324,44 @@ void BOPDS_DS::VerticesOnIn(const Standard_Integer nF1, BOPCol_MapOfInteger& aMI, BOPDS_MapOfPaveBlock& aMPB)const { - Standard_Integer nV, nV1, nV2; + Standard_Integer i, nV, nV1, nV2; BOPCol_MapIteratorOfMapOfInteger aIt; + BOPDS_IndexedMapOfPaveBlock* pMPB[4]; BOPDS_MapIteratorOfMapOfPaveBlock aItMPB; // const BOPDS_FaceInfo& aFI1=FaceInfo(nF1); const BOPDS_FaceInfo& aFI2=FaceInfo(nF2); // - const BOPDS_IndexedMapOfPaveBlock& aMPBOn1=aFI1.PaveBlocksOn(); - aItMPB.Initialize(aMPBOn1); - for (; aItMPB.More(); aItMPB.Next()) { - const Handle(BOPDS_PaveBlock)& aPB=aItMPB.Value(); - aMPB.Add(aPB); - aPB->Indices(nV1, nV2); - aMI.Add(nV1); - aMI.Add(nV2); - } + pMPB[0]=(BOPDS_IndexedMapOfPaveBlock*)&aFI1.PaveBlocksOn(); + pMPB[1]=(BOPDS_IndexedMapOfPaveBlock*)&aFI1.PaveBlocksIn(); + pMPB[2]=(BOPDS_IndexedMapOfPaveBlock*)&aFI2.PaveBlocksOn(); + pMPB[3]=(BOPDS_IndexedMapOfPaveBlock*)&aFI2.PaveBlocksIn(); // - const BOPDS_IndexedMapOfPaveBlock& aMPBIn1=aFI1.PaveBlocksIn(); - aItMPB.Initialize(aMPBIn1); - for (; aItMPB.More(); aItMPB.Next()) { - const Handle(BOPDS_PaveBlock)& aPB=aItMPB.Value(); - aMPB.Add(aPB); - aPB->Indices(nV1, nV2); - aMI.Add(nV1); - aMI.Add(nV2); - } - // - const BOPDS_IndexedMapOfPaveBlock& aMPBOn2=aFI2.PaveBlocksOn(); - aItMPB.Initialize(aMPBOn2); - for (; aItMPB.More(); aItMPB.Next()) { - const Handle(BOPDS_PaveBlock)& aPB=aItMPB.Value(); - aMPB.Add(aPB); - aPB->Indices(nV1, nV2); - aMI.Add(nV1); - aMI.Add(nV2); - } - // - const BOPDS_IndexedMapOfPaveBlock& aMPBIn2=aFI2.PaveBlocksIn(); - aItMPB.Initialize(aMPBIn2); - for (; aItMPB.More(); aItMPB.Next()) { - const Handle(BOPDS_PaveBlock)& aPB=aItMPB.Value(); - aMPB.Add(aPB); - aPB->Indices(nV1, nV2); - aMI.Add(nV1); - aMI.Add(nV2); + for (i=0; i<4; ++i) { + aItMPB.Initialize(*pMPB[i]); + for (; aItMPB.More(); aItMPB.Next()) { + const Handle(BOPDS_PaveBlock)& aPB=aItMPB.Value(); + aMPB.Add(aPB); + aPB->Indices(nV1, nV2); + aMI.Add(nV1); + aMI.Add(nV2); + } } // const BOPCol_MapOfInteger& aMVOn1=aFI1.VerticesOn(); - aIt.Initialize(aMVOn1); - for (; aIt.More(); aIt.Next()) { - nV=aIt.Value(); - aMI.Add(nV); - } - // const BOPCol_MapOfInteger& aMVIn1=aFI1.VerticesIn(); - aIt.Initialize(aMVIn1); - for (; aIt.More(); aIt.Next()) { - nV=aIt.Value(); - aMI.Add(nV); - } - // const BOPCol_MapOfInteger& aMVOn2=aFI2.VerticesOn(); - aIt.Initialize(aMVOn2); - for (; aIt.More(); aIt.Next()) { - nV=aIt.Value(); - aMI.Add(nV); - } - // const BOPCol_MapOfInteger& aMVIn2=aFI2.VerticesIn(); - aIt.Initialize(aMVIn2); - for (; aIt.More(); aIt.Next()) { - nV=aIt.Value(); - aMI.Add(nV); + // + for (i=0; i<2; ++i) { + const BOPCol_MapOfInteger& aMV1=(!i) ? aMVOn1 : aMVIn1; + aIt.Initialize(aMV1); + for (; aIt.More(); aIt.Next()) { + nV=aIt.Value(); + if (aMVOn2.Contains(nV) || aMVIn2.Contains(nV)) { + aMI.Add(nV); + } + } } } //======================================================================= diff --git a/tests/bugs/modalg_1/buc60462_2 b/tests/bugs/modalg_1/buc60462_2 index 0795dac246..0396531d2b 100755 --- a/tests/bugs/modalg_1/buc60462_2 +++ b/tests/bugs/modalg_1/buc60462_2 @@ -1,4 +1,4 @@ -puts "TODO OCC12345 windows: Faulty shapes in variables faulty_1 to faulty_" +puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_" puts "==========" puts "BUC60462" diff --git a/tests/bugs/modalg_5/bug24089 b/tests/bugs/modalg_5/bug24089 new file mode 100644 index 0000000000..111761f289 --- /dev/null +++ b/tests/bugs/modalg_5/bug24089 @@ -0,0 +1,21 @@ +puts "============" +puts "OCC24089" +puts "============" +puts "" +#################################################### +# Missing section edge +#################################################### + +restore [locate_data_file bug24089_fz2] b1 +restore [locate_data_file bug24089_qf1] b2 + +bop b1 b2 +bopsection result + +set nb_v_good 5 +set nb_e_good 4 +set nb_shape_good 10 + +set 2dviewer 0 + +