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:
@@ -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) {
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
//=================================================
|
||||
|
Reference in New Issue
Block a user