]> OCCT Git - occt-copy.git/commitdiff
0025735: Wrong solid is considered as valid by checkshape
authorpkv <pkv@opencascade.com>
Thu, 5 Feb 2015 09:49:05 +0000 (12:49 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 5 Feb 2015 09:50:14 +0000 (12:50 +0300)
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.

16 files changed:
src/BRepCheck/BRepCheck_Solid.cxx
tests/boolean/bcut_complex/O3
tests/boolean/bcut_complex/O4
tests/boolean/bcut_complex/O5
tests/boolean/bcut_complex/O6
tests/boolean/bfuse_complex/O5
tests/boolean/bfuse_complex/O6
tests/boolean/bopfuse_complex/H1
tests/boolean/boptuc_complex/D5
tests/bugs/modalg_2/bug497_3
tests/bugs/modalg_4/bug62
tests/bugs/modalg_4/bug697_2
tests/bugs/modalg_4/bug697_4
tests/bugs/modalg_4/bug697_7
tests/bugs/modalg_4/bug697_8
tests/bugs/modalg_5/bug25735 [new file with mode: 0644]

index 170f142b59f6b57ffe16476e3260975116e47195..d49be1bdec68c2d4cbd133719f5c71466223def8 100644 (file)
@@ -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;
index 3f27ed5148605fdf0c85f25081496320d1a8c377..137ee0a77155c904d5f738acf097dd5c57d1545d 100644 (file)
@@ -1,4 +1,5 @@
 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-t1.brep] tool1
index 5ffdb95703e8fbb6d61ee1714b92a0e73b1a9ff3..73249d1e494baf102ea2ef619a2064ac730c3df3 100644 (file)
@@ -1,4 +1,5 @@
 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-t2.brep] tool2
index b580eeb6f0d6f94017d173a115b35705a82786fc..582f6da0a2813bed74250ce68588b659bbc9cadd 100644 (file)
@@ -1,4 +1,5 @@
 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-t.brep] tool
index 32ab33c3f632af9e224457d2f43ceb9db4f18768..6d2f0af7bbe0aeaa8b31002443a1ff6d5365a61f 100644 (file)
@@ -1,4 +1,5 @@
 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-t.brep] tool
index 4a655379502a881c3b3452cd9137ecd2e0579e52..5d715b7a0fd1bf3622b562bc1d9dfc3650538742 100644 (file)
@@ -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-o2.brep] jante
 
index 84cb17076cef2f346b0b41468aa0d5bb0c751790..0797c5fcbea55b08d2db3a7523182d4920c61234 100644 (file)
@@ -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-n.brep] nervure
 
index 992835e17ce212a34f1543360f2b26cb3227b2f5..714b72c8a1ed6bcd5f3e7e0719eb23880885f599 100644 (file)
@@ -1,4 +1,5 @@
 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 b136] b
index d9ec8760f55acd3c5401465f49f9c1e2e582ebe0..eae899ce92c6d93f422a663167284ef9d649c5c5 100644 (file)
@@ -1,4 +1,5 @@
 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 b136] b
index 22cea61e68fd6d7ff9884cd81d2264e887a4a3b6..1c0df91ce8b95f18b086ad2213db332a1655cf7d 100755 (executable)
@@ -1,3 +1,5 @@
+puts "TODO OCC25735 ALL: Faulty shapes in variables faulty_1 to"
+
 puts "========="
 puts " OCC497 "
 puts "(case 3)"
index ccafb69df1bda2287b32ea6815ed989e738bb515..9dd59e6a0c03631f1cbed5d6d041787e6427f27d 100755 (executable)
@@ -1,4 +1,6 @@
 puts "TODO ?OCC12345 ALL: Error : The square of result shape is"
+puts "TODO OCC25735 ALL: Faulty shapes in variables faulty_1 to"
+
 puts "================"
 puts "OCC62"
 puts "BUC61001"
index 3c852d7e5fca444645477fc65d14c913172321f0..d706ae12ca0bfde43b07d024021f319f235c4161 100755 (executable)
@@ -1,4 +1,6 @@
 puts "TODO OCC12345 ALL: Error : The square of result shape is"
+puts "TODO OCC25735 ALL: Faulty shapes in variables faulty_1 to"
+
 puts "============"
 puts "OCC697"
 puts "============"
index ff640160a198c89a5eda8baeced145349c76148a..dc752baeab85f9d0f34911485166c6adc4c82c7c 100755 (executable)
@@ -1,4 +1,6 @@
 puts "TODO OCC12345 ALL: Error : The square of result shape is"
+puts "TODO OCC25735 ALL: Faulty shapes in variables faulty_1 to"
+
 puts "============"
 puts "OCC697"
 puts "============"
index ab6b25d67858bc7485ce9d9ad2974242f6f5089f..54a47084d4a35bae00f61bbbca20c9174e53df17 100755 (executable)
@@ -1,4 +1,6 @@
 puts "TODO OCC12345 ALL: Error : The square of result shape is"
+puts "TODO OCC25735 ALL: Faulty shapes in variables faulty_1 to"
+
 puts "============"
 puts "OCC697"
 puts "============"
index 5686cfef057fb1a371330ed87a44893bbad818e2..b832ac3899f776e8750a98e91596e952de5957de 100755 (executable)
@@ -1,4 +1,6 @@
 puts "TODO OCC12345 ALL: Error : The square of result shape is"
+puts "TODO OCC25735 ALL: Faulty shapes in variables faulty_1 to"
+
 puts "============"
 puts "OCC697"
 puts "============"
diff --git a/tests/bugs/modalg_5/bug25735 b/tests/bugs/modalg_5/bug25735
new file mode 100644 (file)
index 0000000..88e7b3b
--- /dev/null
@@ -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