0024097: BRepAlgoAPI_Section returns wrong result
authorabv <abv@opencascade.com>
Sat, 5 Sep 2015 13:09:48 +0000 (16:09 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 10 Sep 2015 11:58:06 +0000 (14:58 +0300)
Test case added: bugs modalg_6 bug24097

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

diff --git a/tests/bugs/modalg_6/bug24097 b/tests/bugs/modalg_6/bug24097
new file mode 100644 (file)
index 0000000..9c337a4
--- /dev/null
@@ -0,0 +1,33 @@
+puts "##################################################"
+puts "0024097: BRepAlgoAPI_Section returns wrong result"
+puts "##################################################"
+
+# load and check faces
+restore [locate_data_file bug24097_face1.brep] a
+tolerance a
+checkshape a
+
+restore [locate_data_file bug24097_face2.brep] b
+tolerance b
+checkshape b
+
+# build section
+bsection result a b
+
+# result should be single open edge with length 0.125
+checknbshapes result -vertex 2 -edge 1
+checkmaxtol result -ref 0.0001
+
+if { [regexp {Mass\s*:\s*([0-9.e+-]*)} [lprops result] dummy length] } {
+  checkreal "Length of the section" $length 0.125 0.0001 0.1
+} else {
+  puts "Error: cannot get length of result!"
+}
+
+# make snapshot
+vinit Driver1/Viewer1/View1
+vclear 
+eval vdisplay result [explode result v]
+vfit
+vdisplay a b
+vdump $imagedir/${test_image}.png