From f2cc47113fe25215768a8edccbdc08f0e71d6e51 Mon Sep 17 00:00:00 2001 From: ika Date: Mon, 1 Apr 2013 13:31:10 +0400 Subject: [PATCH] Adjusting testing cases for current state of OCCT --- tests/bugs/end | 12 +++++++++-- tests/bugs/modalg_2/bug22770_12 | 8 ++++---- tests/bugs/modalg_2/bug22770_13 | 10 ++++------ tests/bugs/modalg_2/bug22770_15 | 10 ++++------ tests/bugs/modalg_5/bug23375 | 23 ---------------------- tests/bugs/modalg_5/bug23375_1 | 35 +++++++++++++++++---------------- 6 files changed, 40 insertions(+), 58 deletions(-) delete mode 100755 tests/bugs/modalg_5/bug23375 diff --git a/tests/bugs/end b/tests/bugs/end index 859cb0086e..4d2f5ddafd 100755 --- a/tests/bugs/end +++ b/tests/bugs/end @@ -53,9 +53,9 @@ if { [regexp "nb_.*_good" $glob_inf] == 1 } { if { [info exists nb_v_good] } { regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full nb_v if { ${nb_v} != ${nb_v_good} } { - puts "Error : Result shape is WRONG because it must contains ${nb_v_good} vertexes instead of ${nb_v}" + puts "Error : Result shape is WRONG because it must contains ${nb_v_good} vertices instead of ${nb_v}" } else { - puts "Result shape contains ${nb_v} vertexes" + puts "Result shape contains ${nb_v} vertices" } } @@ -131,6 +131,14 @@ if { [info exists nb_shape_good] } { } } +if { [info exists nb_fe_good] && [info exists nb_fe] } { + if { ${nb_fe} != ${nb_fe_good} } { + puts "Error : Result shape is WRONG because it must contains ${nb_shape_good} shapes instead of ${nb_shape}" + } else { + puts "Result shape contains ${nb_fe} free edges" + } +} + if { [isdraw result] } { if { [info exists 2dviewer] } { clear diff --git a/tests/bugs/modalg_2/bug22770_12 b/tests/bugs/modalg_2/bug22770_12 index f7469d60e6..1175d274f4 100755 --- a/tests/bugs/modalg_2/bug22770_12 +++ b/tests/bugs/modalg_2/bug22770_12 @@ -14,14 +14,14 @@ sewing result a b -c set square 1.8847e+07 -set nb_v_good 930 -set nb_e_good 1164 +set nb_v_good 779 +set nb_e_good 1038 set nb_w_good 273 set nb_f_good 259 -set nb_sh_good 11 +set nb_sh_good 3 set nb_sol_good 0 set nb_compsol_good 0 set nb_compound_good 1 -set nb_shape_good 2638 +set nb_shape_good 2353 set 3dviewer 0 diff --git a/tests/bugs/modalg_2/bug22770_13 b/tests/bugs/modalg_2/bug22770_13 index 23e9f35119..a8a71313f9 100755 --- a/tests/bugs/modalg_2/bug22770_13 +++ b/tests/bugs/modalg_2/bug22770_13 @@ -1,5 +1,3 @@ -puts "TODO OCC11111 ALL: Faulty shapes in variables faulty_1 to faulty_" - puts "================" puts "OCC22770" puts "================" @@ -26,14 +24,14 @@ sewing result a b +c set square 1.8847e+07 -set nb_v_good 796 -set nb_e_good 1103 +set nb_v_good 642 +set nb_e_good 955 set nb_w_good 273 set nb_f_good 259 -set nb_sh_good 5 +set nb_sh_good 3 set nb_sol_good 0 set nb_compsol_good 0 set nb_compound_good 1 -set nb_shape_good 2437 +set nb_shape_good 2133 set 3dviewer 0 diff --git a/tests/bugs/modalg_2/bug22770_15 b/tests/bugs/modalg_2/bug22770_15 index 8f631d0de5..6e18d39952 100755 --- a/tests/bugs/modalg_2/bug22770_15 +++ b/tests/bugs/modalg_2/bug22770_15 @@ -1,5 +1,3 @@ -puts "TODO OCC11111 ALL: Faulty shapes in variables faulty_1 to faulty_" - puts "================" puts "OCC22770" puts "================" @@ -26,14 +24,14 @@ sewing result a b -p set square 1.8847e+07 -set nb_v_good 796 -set nb_e_good 1103 +set nb_v_good 642 +set nb_e_good 955 set nb_w_good 273 set nb_f_good 259 -set nb_sh_good 5 +set nb_sh_good 3 set nb_sol_good 0 set nb_compsol_good 0 set nb_compound_good 1 -set nb_shape_good 2437 +set nb_shape_good 2133 set 3dviewer 0 diff --git a/tests/bugs/modalg_5/bug23375 b/tests/bugs/modalg_5/bug23375 deleted file mode 100755 index f8c99d50fb..0000000000 --- a/tests/bugs/modalg_5/bug23375 +++ /dev/null @@ -1,23 +0,0 @@ -puts "========================" -puts "OCC23375" -puts "========================" -puts "" -####################################################################### -# (OCC 6.5.3 regression) BRepBuilderAPI_Sewing returns wrong result -####################################################################### - -restore [locate_data_file bug23375_Volute1.brep] v - -explode v -sewing result 0.01 v_1 v_2 - -checkshape result - -set tolmaxres [tolmax result] -regexp {max tol = ([-0-9.+eE]+)} $tolmaxres full MaxTolerance -set CMP_TOL 1.e-4 -if { ${MaxTolerance} > ${CMP_TOL} } { - puts "Error: invalid tolerance" -} - -set 2dviewer 1 diff --git a/tests/bugs/modalg_5/bug23375_1 b/tests/bugs/modalg_5/bug23375_1 index 654e1d49af..cade59a081 100755 --- a/tests/bugs/modalg_5/bug23375_1 +++ b/tests/bugs/modalg_5/bug23375_1 @@ -6,28 +6,29 @@ puts "" # (OCC 6.5.3 regression) BRepBuilderAPI_Sewing returns wrong result ####################################################################### -restore [locate_data_file bug23375_Pump1.brep] p +restore [locate_data_file bug23375_Volute1.brep] v -sewing result 0.1 p +explode v +sewing result 0.01 v_1 v_2 +# 1 checkshape result -set whatis_result [whatis result] +# 2 +set tolmaxres [tolmax result] +regexp {max tol = ([-0-9.+eE]+)} $tolmaxres full MaxTolerance +set CMP_TOL 1.e-4 +if { ${MaxTolerance} > ${CMP_TOL} } { + puts "Error: invalid tolerance" +} -if { [regexp {SHELL} ${whatis_result}] != 1 } { - puts "Error: invalid result shape; SHELL" -} -if { [regexp {FORWARD} ${whatis_result}] != 1 } { - puts "Error: invalid result shape; FORWARD" -} -if { [regexp {Modified} ${whatis_result}] != 1 } { - puts "Error: invalid result shape; Modified" -} -if { [regexp {Orientable} ${whatis_result}] != 1 } { - puts "Error: invalid result shape; Orientable" -} -if { [regexp {Closed} ${whatis_result}] != 1 } { - puts "Error: invalid result shape; Closed" +# 3 +catch {freebounds $result -0.01} +set s [explode result_c e] +puts $s +set index [ llength $s ] +if { $index != 0 } { + puts "Error : Number of free edges is $index" } set 2dviewer 1