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

0025937: Failed Cut Edge or Face by HalfSpace.

Addressing the causes of warnings.

Test cases for issue CR25937
This commit is contained in:
pkv
2015-04-30 13:49:25 +03:00
committed by bugmaster
parent 5e18f91719
commit f47b8d2b37
8 changed files with 218 additions and 9 deletions

View File

@@ -480,6 +480,17 @@ void BOPAlgo_BuilderFace::PerformAreas()
//
myAreas.Clear();
//
if (myLoops.IsEmpty()) {
if (myContext->IsInfiniteFace(myFace)) {
aBB.MakeFace(aFace, aS, aLoc, aTol);
if (BRep_Tool::NaturalRestriction(myFace)) {
aBB.NaturalRestriction(aFace, Standard_True);
}
myAreas.Append(aFace);
}
return;
}
//
// 1. Growthes and Holes -> aDMISB: [Index/ShapeBox2D]
aIt1.Initialize(myLoops);
for (k=0 ; aIt1.More(); aIt1.Next(), ++k) {

View File

@@ -463,7 +463,17 @@ void BOPAlgo_BuilderSolid::PerformLoops()
// 1. Shells Usual
aIt.Initialize (myShapes);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aF=aIt.Value();
const TopoDS_Face& aF=*((TopoDS_Face*)&aIt.Value());
if (myContext->IsInfiniteFace(aF)) {
TopoDS_Shell aSh;
BRep_Builder aBB;
//
aBB.MakeShell(aSh);
aBB.Add(aSh, aF);
myLoops.Append(aSh);
continue;
}
//
if (!myShapesToAvoid.Contains(aF)) {
aSSp.AddStartElement(aF);
}
@@ -511,9 +521,11 @@ void BOPAlgo_BuilderSolid::PerformLoops()
// c. add all edges that are not processed to myShapesToAvoid
aIt.Initialize (myShapes);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aF=aIt.Value();
if (!aMP.Contains(aF)) {
myShapesToAvoid.Add(aF);
const TopoDS_Face& aF=*((TopoDS_Face*)&aIt.Value());
if (!myContext->IsInfiniteFace(aF)) {
if (!aMP.Contains(aF)) {
myShapesToAvoid.Add(aF);
}
}
}
//=================================================