mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +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:
parent
4e0311752a
commit
34a0b4463a
@ -197,7 +197,7 @@ void BRepCheck_Solid::Minimum()
|
|||||||
myMin = Standard_True;
|
myMin = Standard_True;
|
||||||
//
|
//
|
||||||
Standard_Boolean bFound, bIsHole, bFlag;
|
Standard_Boolean bFound, bIsHole, bFlag;
|
||||||
Standard_Integer i, j, aNbVTS, aNbVTS1;
|
Standard_Integer i, j, aNbVTS, aNbVTS1, iCntSh, iCntShInt;
|
||||||
TopoDS_Solid aZ;
|
TopoDS_Solid aZ;
|
||||||
TopoDS_Iterator aIt, aItF;
|
TopoDS_Iterator aIt, aItF;
|
||||||
TopoDS_Builder aBB;
|
TopoDS_Builder aBB;
|
||||||
@ -228,6 +228,8 @@ void BRepCheck_Solid::Minimum()
|
|||||||
// 2.
|
// 2.
|
||||||
// - Too many growths,
|
// - Too many growths,
|
||||||
// - There is smt of the solid that is out of solid
|
// - There is smt of the solid that is out of solid
|
||||||
|
iCntSh=0;
|
||||||
|
iCntShInt=0;
|
||||||
aIt.Initialize(myShape);
|
aIt.Initialize(myShape);
|
||||||
for (; aIt.More(); aIt.Next()) {
|
for (; aIt.More(); aIt.Next()) {
|
||||||
const TopoDS_Shape& aSx=aIt.Value();
|
const TopoDS_Shape& aSx=aIt.Value();
|
||||||
@ -254,9 +256,12 @@ void BRepCheck_Solid::Minimum()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (bFound) {
|
if (bFound) {
|
||||||
|
++iCntShInt;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
|
++iCntSh;
|
||||||
|
//
|
||||||
// Skip not closed shells
|
// Skip not closed shells
|
||||||
if (!BRep_Tool::IsClosed(aSh)) {
|
if (!BRep_Tool::IsClosed(aSh)) {
|
||||||
continue;
|
continue;
|
||||||
@ -271,6 +276,12 @@ void BRepCheck_Solid::Minimum()
|
|||||||
aVTS.Append(aTS);
|
aVTS.Append(aTS);
|
||||||
}//for (; aIt.More(); aIt.Next()) {
|
}//for (; aIt.More(); aIt.Next()) {
|
||||||
//
|
//
|
||||||
|
if (!iCntSh && iCntShInt) {
|
||||||
|
// all shells in the solid are internal
|
||||||
|
BRepCheck::Add(myMap(myShape),
|
||||||
|
BRepCheck_BadOrientationOfSubshape);
|
||||||
|
}
|
||||||
|
//
|
||||||
aNbVTS=aVTS.Size();
|
aNbVTS=aVTS.Size();
|
||||||
if (aNbVTS<2) {
|
if (aNbVTS<2) {
|
||||||
return;
|
return;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
puts "TODO #22911 ALL: Error : The area of the resulting shape is"
|
puts "TODO #22911 ALL: Error : The area of the resulting shape is"
|
||||||
|
puts "TODO OCC25735 ALL: Faulty shapes in variables faulty_1 to"
|
||||||
|
|
||||||
restore [locate_data_file CTO908_topo101-o1.brep] obj1
|
restore [locate_data_file CTO908_topo101-o1.brep] obj1
|
||||||
restore [locate_data_file CTO908_topo101-t1.brep] tool1
|
restore [locate_data_file CTO908_topo101-t1.brep] tool1
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
puts "TODO #22911 ALL: Error : The area of the resulting shape is"
|
puts "TODO #22911 ALL: Error : The area of the resulting shape is"
|
||||||
|
puts "TODO OCC25735 ALL: Faulty shapes in variables faulty_1 to"
|
||||||
|
|
||||||
restore [locate_data_file CTO908_topo101-o2.brep] obj2
|
restore [locate_data_file CTO908_topo101-o2.brep] obj2
|
||||||
restore [locate_data_file CTO908_topo101-t2.brep] tool2
|
restore [locate_data_file CTO908_topo101-t2.brep] tool2
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
puts "TODO #22911 ALL: Error : The area of the resulting shape is"
|
puts "TODO #22911 ALL: Error : The area of the resulting shape is"
|
||||||
|
puts "TODO OCC25735 ALL: Faulty shapes in variables faulty_1 to"
|
||||||
|
|
||||||
restore [locate_data_file CTO908_topo102-o.brep] obj
|
restore [locate_data_file CTO908_topo102-o.brep] obj
|
||||||
restore [locate_data_file CTO908_topo102-t.brep] tool
|
restore [locate_data_file CTO908_topo102-t.brep] tool
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
puts "TODO #22911 ALL: Error : The area of the resulting shape is"
|
puts "TODO #22911 ALL: Error : The area of the resulting shape is"
|
||||||
|
puts "TODO OCC25735 ALL: Faulty shapes in variables faulty_1 to"
|
||||||
|
|
||||||
restore [locate_data_file CTO908_topo103-o.brep] obj
|
restore [locate_data_file CTO908_topo103-o.brep] obj
|
||||||
restore [locate_data_file CTO908_topo103-t.brep] tool
|
restore [locate_data_file CTO908_topo103-t.brep] tool
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
puts "TODO OCC25735 ALL: Faulty shapes in variables faulty_1 to"
|
||||||
|
|
||||||
restore [locate_data_file CTO908_topo104-o1.brep] wheel
|
restore [locate_data_file CTO908_topo104-o1.brep] wheel
|
||||||
restore [locate_data_file CTO908_topo104-o2.brep] jante
|
restore [locate_data_file CTO908_topo104-o2.brep] jante
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
puts "TODO OCC25735 ALL: Faulty shapes in variables faulty_1 to"
|
||||||
|
|
||||||
restore [locate_data_file CTO908_topo106-p.brep] poche
|
restore [locate_data_file CTO908_topo106-p.brep] poche
|
||||||
restore [locate_data_file CTO908_topo106-n.brep] nervure
|
restore [locate_data_file CTO908_topo106-n.brep] nervure
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
puts "TODO #22911 ALL: Error : The area of the resulting shape is"
|
puts "TODO #22911 ALL: Error : The area of the resulting shape is"
|
||||||
|
puts "TODO OCC25735 ALL: Faulty shapes in variables faulty_1 to"
|
||||||
|
|
||||||
restore [locate_data_file a102] a
|
restore [locate_data_file a102] a
|
||||||
restore [locate_data_file b136] b
|
restore [locate_data_file b136] b
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
puts "TODO ?OCC24925 ALL: Error : The area of the resulting shape is"
|
puts "TODO ?OCC24925 ALL: Error : The area of the resulting shape is"
|
||||||
|
puts "TODO OCC25735 ALL: Faulty shapes in variables faulty_1 to"
|
||||||
|
|
||||||
restore [locate_data_file a102] a
|
restore [locate_data_file a102] a
|
||||||
restore [locate_data_file b136] b
|
restore [locate_data_file b136] b
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
puts "TODO OCC25735 ALL: Faulty shapes in variables faulty_1 to"
|
||||||
|
|
||||||
puts "========="
|
puts "========="
|
||||||
puts " OCC497 "
|
puts " OCC497 "
|
||||||
puts "(case 3)"
|
puts "(case 3)"
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
puts "TODO ?OCC12345 ALL: Error : The square of result shape is"
|
puts "TODO ?OCC12345 ALL: Error : The square of result shape is"
|
||||||
|
puts "TODO OCC25735 ALL: Faulty shapes in variables faulty_1 to"
|
||||||
|
|
||||||
puts "================"
|
puts "================"
|
||||||
puts "OCC62"
|
puts "OCC62"
|
||||||
puts "BUC61001"
|
puts "BUC61001"
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
puts "TODO OCC12345 ALL: Error : The square of result shape is"
|
puts "TODO OCC12345 ALL: Error : The square of result shape is"
|
||||||
|
puts "TODO OCC25735 ALL: Faulty shapes in variables faulty_1 to"
|
||||||
|
|
||||||
puts "============"
|
puts "============"
|
||||||
puts "OCC697"
|
puts "OCC697"
|
||||||
puts "============"
|
puts "============"
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
puts "TODO OCC12345 ALL: Error : The square of result shape is"
|
puts "TODO OCC12345 ALL: Error : The square of result shape is"
|
||||||
|
puts "TODO OCC25735 ALL: Faulty shapes in variables faulty_1 to"
|
||||||
|
|
||||||
puts "============"
|
puts "============"
|
||||||
puts "OCC697"
|
puts "OCC697"
|
||||||
puts "============"
|
puts "============"
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
puts "TODO OCC12345 ALL: Error : The square of result shape is"
|
puts "TODO OCC12345 ALL: Error : The square of result shape is"
|
||||||
|
puts "TODO OCC25735 ALL: Faulty shapes in variables faulty_1 to"
|
||||||
|
|
||||||
puts "============"
|
puts "============"
|
||||||
puts "OCC697"
|
puts "OCC697"
|
||||||
puts "============"
|
puts "============"
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
puts "TODO OCC12345 ALL: Error : The square of result shape is"
|
puts "TODO OCC12345 ALL: Error : The square of result shape is"
|
||||||
|
puts "TODO OCC25735 ALL: Faulty shapes in variables faulty_1 to"
|
||||||
|
|
||||||
puts "============"
|
puts "============"
|
||||||
puts "OCC697"
|
puts "OCC697"
|
||||||
puts "============"
|
puts "============"
|
||||||
|
21
tests/bugs/modalg_5/bug25735
Normal file
21
tests/bugs/modalg_5/bug25735
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
puts "=========="
|
||||||
|
puts "OCC25735"
|
||||||
|
puts "=========="
|
||||||
|
puts ""
|
||||||
|
######################################################
|
||||||
|
# Wrong solid is considered as valid by checkshape
|
||||||
|
######################################################
|
||||||
|
|
||||||
|
restore [locate_data_file bug25735_r5] result
|
||||||
|
|
||||||
|
decho off
|
||||||
|
set info [checkshape result]
|
||||||
|
decho on
|
||||||
|
|
||||||
|
if { [regexp "Faulty shapes in variables faulty_1" ${info}] != 1 } {
|
||||||
|
puts "Error : There are no mistakes by checkshape-command"
|
||||||
|
} else {
|
||||||
|
puts "OK : There are mistakes by checkshape-command"
|
||||||
|
}
|
||||||
|
|
||||||
|
set 2dviewer 1
|
Loading…
x
Reference in New Issue
Block a user