mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0024597: Missing internal vertex in the result of General Fuse Operation
Changes: class BOPDS_DS - method: void BOPDS_DS::Init() - method: void BOPDS_DS::FaceInfoIn (const Standard_Integer theF, BOPDS_IndexedMapOfPaveBlock& theMPB, BOPCol_MapOfInteger& theMI) Add the information about internal vertices on faces to the Data Structure Test case for issue CR24597
This commit is contained in:
parent
a6b634c30a
commit
8849da168a
@ -322,6 +322,7 @@ void BOPDS_DS::Init()
|
||||
Standard_Integer n1, n2, n3;
|
||||
Standard_Real aTol;
|
||||
TopAbs_ShapeEnum aTS;
|
||||
TopoDS_Iterator aItS;
|
||||
BOPCol_ListIteratorOfListOfInteger aIt1, aIt2, aIt3;
|
||||
BOPCol_ListIteratorOfListOfShape aIt;
|
||||
BOPDS_IndexRange aR;
|
||||
@ -522,6 +523,16 @@ void BOPDS_DS::Init()
|
||||
}
|
||||
}//for (; aIt1.More(); aIt1.Next()) {
|
||||
//
|
||||
// pure internal vertices on the face
|
||||
aItS.Initialize(aS);
|
||||
for (; aItS.More(); aItS.Next()) {
|
||||
const TopoDS_Shape& aSx=aItS.Value();
|
||||
if (aSx.ShapeType()==TopAbs_VERTEX){
|
||||
nV=Index(aSx);
|
||||
aMI.Add(nV);
|
||||
}
|
||||
}
|
||||
//
|
||||
//
|
||||
// For a Face: change wires for BRep sub-shapes
|
||||
aLW.Clear();
|
||||
@ -1272,9 +1283,25 @@ void BOPDS_DS::FaceInfoIn(const Standard_Integer theF,
|
||||
BOPDS_IndexedMapOfPaveBlock& theMPB,
|
||||
BOPCol_MapOfInteger& theMI)
|
||||
{
|
||||
Standard_Integer i, aNbVF, aNbEF, nV, nE;
|
||||
Standard_Integer i, aNbVF, aNbEF, nV, nE, nVSD;
|
||||
TopoDS_Iterator aItS;
|
||||
BOPDS_ListIteratorOfListOfPaveBlock aItPB;
|
||||
//
|
||||
// 1. Pure internal vertices on the face
|
||||
const TopoDS_Shape& aF=Shape(theF);
|
||||
aItS.Initialize(aF);
|
||||
for (; aItS.More(); aItS.Next()) {
|
||||
const TopoDS_Shape& aSx=aItS.Value();
|
||||
if (aSx.ShapeType()==TopAbs_VERTEX){
|
||||
nV=Index(aSx);
|
||||
if (HasShapeSD(nV, nVSD)) {
|
||||
nV=nVSD;
|
||||
}
|
||||
theMI.Add(nV);
|
||||
}
|
||||
}
|
||||
//
|
||||
// 2. aVFs
|
||||
BOPDS_VectorOfInterfVF& aVFs=InterfVF();
|
||||
aNbVF=aVFs.Extent();
|
||||
for (i=0; i<aNbVF; ++i) {
|
||||
@ -1285,6 +1312,7 @@ void BOPDS_DS::FaceInfoIn(const Standard_Integer theF,
|
||||
}
|
||||
}
|
||||
//
|
||||
// 3. aEFs
|
||||
BOPDS_VectorOfInterfEF& aEFs=InterfEF();
|
||||
aNbEF=aEFs.Extent();
|
||||
for (i=0; i<aNbEF; ++i) {
|
||||
|
40
tests/bugs/modalg_5/bug24597
Normal file
40
tests/bugs/modalg_5/bug24597
Normal file
@ -0,0 +1,40 @@
|
||||
puts "========="
|
||||
puts "OCC24597"
|
||||
puts "========="
|
||||
puts ""
|
||||
###########################################################
|
||||
# Missing internal vertex in the result of General Fuse Operation
|
||||
###########################################################
|
||||
|
||||
cylinder c1 20
|
||||
trimv c1 c1 0 50
|
||||
mkface b1 c1
|
||||
vertex v1 0 20 25
|
||||
orientation v1 I
|
||||
add v1 b1
|
||||
box b2 -30 -30 5 60 60 40
|
||||
|
||||
# add the arguments
|
||||
bclearobjects
|
||||
bcleartools
|
||||
baddobjects b1 b2
|
||||
|
||||
# intersection step
|
||||
bfillds
|
||||
|
||||
# building step
|
||||
bbuild result
|
||||
|
||||
set square 33136.3
|
||||
|
||||
set nb_v_good 13
|
||||
set nb_e_good 19
|
||||
set nb_w_good 13
|
||||
set nb_f_good 11
|
||||
set nb_sh_good 2
|
||||
set nb_sol_good 2
|
||||
set nb_compsol_good 0
|
||||
set nb_compound_good 1
|
||||
set nb_shape_good 61
|
||||
|
||||
set 2dviewer 1
|
Loading…
x
Reference in New Issue
Block a user