mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0025735: Wrong solid is considered as valid by checkshape
Changes: class BRepCheck_Solid method: void BRepCheck_Solid::Minimum() has been changed. The treatment of shells with INTERNAL faces has been added. Added test case bugs/modalg_5/bug25735 Added TODOs in test cases according to issue 25735.
This commit is contained in:
@@ -197,7 +197,7 @@ void BRepCheck_Solid::Minimum()
|
||||
myMin = Standard_True;
|
||||
//
|
||||
Standard_Boolean bFound, bIsHole, bFlag;
|
||||
Standard_Integer i, j, aNbVTS, aNbVTS1;
|
||||
Standard_Integer i, j, aNbVTS, aNbVTS1, iCntSh, iCntShInt;
|
||||
TopoDS_Solid aZ;
|
||||
TopoDS_Iterator aIt, aItF;
|
||||
TopoDS_Builder aBB;
|
||||
@@ -228,6 +228,8 @@ void BRepCheck_Solid::Minimum()
|
||||
// 2.
|
||||
// - Too many growths,
|
||||
// - There is smt of the solid that is out of solid
|
||||
iCntSh=0;
|
||||
iCntShInt=0;
|
||||
aIt.Initialize(myShape);
|
||||
for (; aIt.More(); aIt.Next()) {
|
||||
const TopoDS_Shape& aSx=aIt.Value();
|
||||
@@ -254,9 +256,12 @@ void BRepCheck_Solid::Minimum()
|
||||
}
|
||||
}
|
||||
if (bFound) {
|
||||
++iCntShInt;
|
||||
continue;
|
||||
}
|
||||
//
|
||||
++iCntSh;
|
||||
//
|
||||
// Skip not closed shells
|
||||
if (!BRep_Tool::IsClosed(aSh)) {
|
||||
continue;
|
||||
@@ -271,6 +276,12 @@ void BRepCheck_Solid::Minimum()
|
||||
aVTS.Append(aTS);
|
||||
}//for (; aIt.More(); aIt.Next()) {
|
||||
//
|
||||
if (!iCntSh && iCntShInt) {
|
||||
// all shells in the solid are internal
|
||||
BRepCheck::Add(myMap(myShape),
|
||||
BRepCheck_BadOrientationOfSubshape);
|
||||
}
|
||||
//
|
||||
aNbVTS=aVTS.Size();
|
||||
if (aNbVTS<2) {
|
||||
return;
|
||||
|
Reference in New Issue
Block a user