mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0025446: The method BRepAlgoAPI_BooleanOperation::IsDeleted() returns TRUE for the faces contained in the result of BOP
1. The method Standard_Boolean BOPAlgo_Builder::IsDeleted (const TopoDS_Shape& theS) has been modified to return TRUE only if the shape theS has been deleted. 2. Added new draw (QA) command OCC25446 to test this method.
This commit is contained in:
@@ -103,52 +103,41 @@ const TopTools_ListOfShape& BOPAlgo_Builder::Modified
|
||||
Standard_Boolean BOPAlgo_Builder::IsDeleted
|
||||
(const TopoDS_Shape& theS)
|
||||
{
|
||||
Standard_Boolean bRet, bHasImage, bContains;
|
||||
Standard_Boolean bRet;
|
||||
TopAbs_ShapeEnum aType;
|
||||
BOPCol_ListIteratorOfListOfShape aIt;
|
||||
//
|
||||
bRet=Standard_False;
|
||||
bRet = Standard_True;
|
||||
//
|
||||
if (theS.IsNull()) {
|
||||
return !bRet; //true
|
||||
return bRet;
|
||||
}
|
||||
//
|
||||
aType=theS.ShapeType();
|
||||
aType = theS.ShapeType();
|
||||
if (!(aType==TopAbs_EDGE || aType==TopAbs_FACE ||
|
||||
aType==TopAbs_VERTEX || aType==TopAbs_SOLID)) {
|
||||
return !bRet;
|
||||
return bRet;
|
||||
}
|
||||
//
|
||||
bHasImage=myImages.IsBound(theS);
|
||||
if (!bHasImage) {
|
||||
return !bRet; //true
|
||||
if (!myImages.IsBound(theS)) {
|
||||
bRet = !myMapShape.Contains(theS);
|
||||
return bRet;
|
||||
}
|
||||
//
|
||||
//PrepareHistory();
|
||||
//
|
||||
bContains=myMapShape.Contains(theS);
|
||||
if (bContains) {
|
||||
return bRet; //false
|
||||
}
|
||||
//
|
||||
const BOPCol_ListOfShape& aLSp=myImages.Find(theS);
|
||||
const BOPCol_ListOfShape& aLSp = myImages.Find(theS);
|
||||
aIt.Initialize(aLSp);
|
||||
for (; aIt.More(); aIt.Next()) {
|
||||
TopoDS_Shape aSp=aIt.Value();
|
||||
const TopoDS_Shape& aSp = aIt.Value();
|
||||
const TopoDS_Shape& aSpR = myShapesSD.IsBound(aSp) ?
|
||||
myShapesSD.Find(aSp) : aSp;
|
||||
//
|
||||
if (!myShapesSD.IsBound(aSp)) {
|
||||
if (myMapShape.Contains(aSp)) {
|
||||
return bRet; //false
|
||||
}
|
||||
}
|
||||
else {
|
||||
TopoDS_Shape aSpR=myShapesSD.Find(aSp);
|
||||
if (myMapShape.Contains(aSpR)) {
|
||||
return bRet; //false
|
||||
}
|
||||
if (myMapShape.Contains(aSpR)) {
|
||||
bRet = Standard_False;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return !bRet; // true
|
||||
//
|
||||
return bRet;
|
||||
}
|
||||
//=======================================================================
|
||||
//function : PrepareHistory
|
||||
|
Reference in New Issue
Block a user