1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0025263: Wrong result of cut operation.

Changes:
class BOPDS_DS
method:
void BOPDS_DS::InitPaveBlocks(const Standard_Integer theI)

The treatment of internal edges has been added.

Test case for issue CR25263
This commit is contained in:
pkv
2014-09-26 17:13:56 +04:00
committed by bugmaster
parent 92ae0f2fe3
commit 59427cbc91
2 changed files with 69 additions and 23 deletions

View File

@@ -813,8 +813,9 @@ BOPDS_ListOfPaveBlock& BOPDS_DS::ChangePaveBlocks
//=======================================================================
void BOPDS_DS::InitPaveBlocks(const Standard_Integer theI)
{
Standard_Integer nV = 0, iRef, aNbV, nVSD, i;
Standard_Integer nV=0, iRef, aNbV, nVSD;
Standard_Real aT;
TopAbs_Orientation aOrE;
TopoDS_Vertex aV;
BOPCol_ListIteratorOfListOfInteger aIt;
BOPDS_Pave aPave;
@@ -822,6 +823,7 @@ void BOPDS_DS::InitPaveBlocks(const Standard_Integer theI)
//
BOPDS_ShapeInfo& aSI=ChangeShapeInfo(theI);
const TopoDS_Edge& aE=*(TopoDS_Edge*)(&aSI.Shape());
aOrE=aE.Orientation();
//
const BOPCol_ListOfInteger& aLV=aSI.SubShapes();
aNbV=aLV.Extent();
@@ -832,8 +834,9 @@ void BOPDS_DS::InitPaveBlocks(const Standard_Integer theI)
aPB=new BOPDS_PaveBlock;
aPB->SetOriginalEdge(theI);
//
if (aOrE!=TopAbs_INTERNAL) {
aIt.Initialize(aLV);
for (i=0; aIt.More(); aIt.Next(), ++i) {
for (; aIt.More(); aIt.Next()) {
nV=aIt.Value();
//
const BOPDS_ShapeInfo& aSIV=ShapeInfo(nV);
@@ -860,6 +863,21 @@ void BOPDS_DS::InitPaveBlocks(const Standard_Integer theI)
aPave.SetParameter(aT);
aPB->AppendExtPave1(aPave);
}
}
//
else {
TopoDS_Iterator aItE;
//
aItE.Initialize(aE, Standard_False, Standard_True);
for (; aItE.More(); aItE.Next()) {
aV=*((TopoDS_Vertex*)&aItE.Value());
nV=Index(aV);
aT=BRep_Tool::Parameter(aV, aE);
aPave.SetIndex(nV);
aPave.SetParameter(aT);
aPB->AppendExtPave1(aPave);
}
}
//
iRef = myPaveBlocksPool.Append() - 1;
BOPDS_ListOfPaveBlock &aLPB=myPaveBlocksPool(iRef);

View File

@@ -0,0 +1,28 @@
puts "============"
puts "OCC25263"
puts "============"
puts ""
######################################################
# Wrong result of cut operation.
######################################################
restore [locate_data_file bug25263_Face_cylindrique.brep] b1
restore [locate_data_file bug25263_camembert.brep] b2
bop b1 b2
bopcut result
set square 3.76991
# Analysis of "nbshapes res"
set nb_v_good 3
set nb_e_good 4
set nb_w_good 1
set nb_f_good 1
set nb_sh_good 1
set nb_sol_good 0
set nb_compsol_good 0
set nb_compound_good 1
set nb_shape_good 11
set 2dviewer 1