From 646529083a38150a6c87dba0022f625bf2601e44 Mon Sep 17 00:00:00 2001 From: abv Date: Sat, 5 Sep 2015 16:09:48 +0300 Subject: [PATCH] 0024097: BRepAlgoAPI_Section returns wrong result Test case added: bugs modalg_6 bug24097 --- tests/bugs/modalg_6/bug24097 | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 tests/bugs/modalg_6/bug24097 diff --git a/tests/bugs/modalg_6/bug24097 b/tests/bugs/modalg_6/bug24097 new file mode 100644 index 0000000000..9c337a4818 --- /dev/null +++ b/tests/bugs/modalg_6/bug24097 @@ -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 -- 2.20.1