]> OCCT Git - occt-copy.git/commitdiff
0026745: Boolean Cut produces invalid result
authornbv <nbv@opencascade.com>
Wed, 25 Jan 2017 08:14:41 +0000 (11:14 +0300)
committerapn <apn@opencascade.com>
Thu, 26 Jan 2017 10:42:19 +0000 (13:42 +0300)
Creation of test cases for issues #26745 and #26748

tests/bugs/modalg_6/bug26745 [new file with mode: 0644]
tests/bugs/modalg_6/bug26748 [new file with mode: 0644]

diff --git a/tests/bugs/modalg_6/bug26745 b/tests/bugs/modalg_6/bug26745
new file mode 100644 (file)
index 0000000..e1ce5e9
--- /dev/null
@@ -0,0 +1,25 @@
+puts "========"
+puts "OCC26745"
+puts "========"
+puts ""
+#################################################
+# Boolean Cut produces invalid result
+#################################################
+
+restore [locate_data_file bug26745_BodyA.brep] a
+restore [locate_data_file bug26745_BodyB.brep] b
+
+bclearobjects
+bcleartools
+baddobjects a
+baddtools b
+bfillds
+
+# CUT
+bbop result 2
+
+checkshape result
+checknbshapes result -solid 1 -shell 1
+checkprops result -v 20808.1 -s 28247.4
+
+checkview -display result -2d -path ${imagedir}/${test_image}.png
\ No newline at end of file
diff --git a/tests/bugs/modalg_6/bug26748 b/tests/bugs/modalg_6/bug26748
new file mode 100644 (file)
index 0000000..0d7a342
--- /dev/null
@@ -0,0 +1,33 @@
+puts "========"
+puts "OCC26748"
+puts "========"
+puts ""
+#################################################
+# Section between cylindrical and planar faces is not found
+#################################################
+
+set ExpTol 5.0e-8
+set GoodNbCurv 1
+
+restore [locate_data_file bug26745_BodyA.brep] a
+restore [locate_data_file bug26745_BodyB.brep] b
+
+explode a f
+explode b f
+
+set log [bopcurves a_9 b_1 -2d]
+
+regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} ${log} full Toler NbCurv
+
+if {${NbCurv} != ${GoodNbCurv}} {
+  puts "Error: Number of curves is bad!"
+}
+
+checkreal TolReached $Toler $ExpTol 5.0e-8 0.0
+
+smallview
+don c_*
+fit
+disp a_9 b_1
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
\ No newline at end of file