0027124: Invalid curve on surface in the result of General Fuse operation
authornbv <nbv@opencascade.com>
Tue, 12 Apr 2016 13:45:37 +0000 (16:45 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 14 Apr 2016 09:32:40 +0000 (12:32 +0300)
Creation of test cases for issues #27124 and #27129.

tests/bugs/modalg_6/bug27124 [new file with mode: 0644]
tests/bugs/modalg_6/bug27129 [new file with mode: 0644]

diff --git a/tests/bugs/modalg_6/bug27124 b/tests/bugs/modalg_6/bug27124
new file mode 100644 (file)
index 0000000..dd1ac1a
--- /dev/null
@@ -0,0 +1,61 @@
+puts "============"
+puts "OCC27124"
+puts "============"
+puts ""
+###############################
+## Invalid curve on surface in the result of General Fuse operation
+###############################
+
+restore [locate_data_file bug27129_e.brep] e
+restore [locate_data_file bug27129_p.brep] p
+restore [locate_data_file bug27129_q.brep] q
+
+bclearobjects
+bcleartools
+baddobjects e
+baddtools p q
+bfillds
+bbuild result
+set log [bopargcheck result #f]
+
+set MessageList {
+"Faulties for FIRST  shape found : 1"
+"Shapes are not suppotrted by BOP: NO"
+"Self-Intersections              : NO"
+"Check for SI has been aborted   : NO"
+"Too small edges                 : NO"
+"Bad faces                       : NO"
+"Too close vertices              : DISABLED"
+"Too close edges                 : DISABLED"
+"Shapes with Continuity C0       : NO"
+"Invalid Curve on Surface        : YES  Cases\\(1\\)  Total shapes\\(2\\)"
+"Faulties for SECOND  shape found : 0"
+}
+
+for {set i 1} {$i <= 11} {incr i} {
+   set str [ lindex ${MessageList} [expr $i - 1] ]
+   if { [regexp ${str} ${log}] == 1  } {
+      puts "OK : There is #$i message"
+   } else {
+      puts "Error : There is not #$i message"
+      puts $str
+   }
+}
+
+checkprops result -s 81576.6
+
+set nbshapes_expected "
+Number of shapes in shape
+ VERTEX    : 18
+ EDGE      : 31
+ WIRE      : 16
+ FACE      : 16
+ SHELL     : 4
+ SOLID     : 4
+ COMPSOLID : 0
+ COMPOUND  : 1
+ SHAPE     : 90
+"
+checknbshapes result -ref ${nbshapes_expected} -t -m "solid construction"
+
+checkview -display result -2d -path ${imagedir}/${test_image}.png
\ No newline at end of file
diff --git a/tests/bugs/modalg_6/bug27129 b/tests/bugs/modalg_6/bug27129
new file mode 100644 (file)
index 0000000..d571fcf
--- /dev/null
@@ -0,0 +1,35 @@
+puts "============"
+puts "OCC27129"
+puts "============"
+puts ""
+###############################
+## BRepLib_CheckCurveOnSurface does not find the maximal distance
+###############################
+
+restore [locate_data_file bug27129_e.brep] e
+
+set log1 [checkcurveonsurf e]
+
+vertex v1 33.1645637744 33.5513655177474 0
+vertex v2 43.1644823619474 23.5514469302 0
+bclearobjects
+bcleartools
+baddobjects e
+baddtools v1 v2
+bfillds
+
+bbuild result
+
+set log2 [checkcurveonsurf result]
+
+if { [regexp {Invalid curves on surface:\n} ${log1} full ]} {
+  puts "OK. Source shape has invalid curve on surface"
+} else {
+  puts "Error. checkcurveonsurf command works wrong with source shape"
+}
+
+if { [regexp {Invalid curves on surface:\n} ${log1} full ]} {
+  puts "OK. Result has invalid curve on surface"
+} else {
+  puts "Error. checkcurveonsurf command works wrong with result"
+}