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

0026379: Wrong result produced by the volume maker algorithm

1. class BOPAlgo_ShellSplitter
static method void RefineShell(TopoDS_Shell& theShell,
                               BOPCol_ListOfShape& aLShX)
Added protection from INTERNAL edges.

2. class BOPAlgo_MakerVolume
method void BOPAlgo_MakerVolume::MakeBox(BOPCol_MapOfShape& theBoxFaces)
Creation of the overlapping box of proper size.

Test-cases for issue #26379
This commit is contained in:
emv
2015-07-09 14:17:49 +03:00
committed by bugmaster
parent e93e42300a
commit 0f04f1e11d
6 changed files with 62 additions and 9 deletions

View File

@@ -244,7 +244,7 @@ void BOPAlgo_MakerVolume::MakeBox(BOPCol_MapOfShape& theBoxFaces)
//
Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax, anExt;
//
anExt = myBBox.SquareExtent() * 0.5;
anExt = sqrt(myBBox.SquareExtent()) * 0.5;
myBBox.Enlarge(anExt);
myBBox.Get(aXmin, aYmin, aZmin, aXmax, aYmax, aZmax);
//

View File

@@ -347,7 +347,6 @@ void BOPAlgo_ShellSplitter::SplitBlock(BOPTools_ConnexityBlock& aCB)
TopAbs_EDGE,
TopAbs_FACE,
aEFMap);
}
//
aItF.Initialize (myShapes);
@@ -501,7 +500,7 @@ void RefineShell(TopoDS_Shell& theShell,
TopAbs_EDGE,
TopAbs_FACE,
aMEF);
//
aNbMEF=aMEF.Extent();
for (i=1; i<=aNbMEF; ++i) {
const TopoDS_Shape& aE=aMEF.FindKey(i);
@@ -531,7 +530,7 @@ void RefineShell(TopoDS_Shell& theShell,
aLFP.Append(aF1);
//
// Trying to reach the branch point
for (;;) {
for (;;) {
aItLFP.Initialize(aLFP);
for (; aItLFP.More(); aItLFP.Next()) {
const TopoDS_Shape& aFP=aItLFP.Value();
@@ -543,6 +542,10 @@ void RefineShell(TopoDS_Shell& theShell,
continue;
}
//
if (aE.Orientation() == TopAbs_INTERNAL) {
continue;
}
//
if (BRep_Tool::Degenerated(aE)) {
continue;
}
@@ -578,7 +581,7 @@ void RefineShell(TopoDS_Shell& theShell,
aLFP.Append(aFP1);
}
aLFP1.Clear();
}// for (;;) {
}// for (;;) {
//
aNbMFB=aMFB.Extent();
if (aNbMFB) {
@@ -592,7 +595,7 @@ void RefineShell(TopoDS_Shell& theShell,
aLShX.Append(aShX);
}
}//for (; aIt.More(); aIt.Next()) {
}
}
//=======================================================================
//function : MakeShells
//purpose :