From 0691a5bb8f5334f5d6729432a614848f665c0351 Mon Sep 17 00:00:00 2001 From: mkv Date: Wed, 3 Apr 2013 17:12:53 +0400 Subject: [PATCH] 0023282: Wrong triangulation on cone Adding test cases for this fix --- tests/bugs/modalg_5/bug23282_1 | 47 ++++++++++++++++++++++++++++++++ tests/bugs/modalg_5/bug23282_2 | 50 ++++++++++++++++++++++++++++++++++ 2 files changed, 97 insertions(+) create mode 100755 tests/bugs/modalg_5/bug23282_1 create mode 100755 tests/bugs/modalg_5/bug23282_2 diff --git a/tests/bugs/modalg_5/bug23282_1 b/tests/bugs/modalg_5/bug23282_1 new file mode 100755 index 0000000000..58e24fa7a9 --- /dev/null +++ b/tests/bugs/modalg_5/bug23282_1 @@ -0,0 +1,47 @@ +puts "================" +puts "OCC23282" +puts "================" +puts "" +####################################################################################### +# Wrong triangulation on cone +###################################################################################### + +set BugNumber OCC23282 + +pcone result 10 0 10 90 + +checkshape result + +set square 289.612 + +set nb_v_good 4 +set nb_e_good 7 +set nb_w_good 4 +set nb_f_good 4 +set nb_sh_good 1 +set nb_sol_good 1 +set nb_compsol_good 0 +set nb_compound_good 0 +set nb_shape_good 21 + +vinit +vdisplay result +vsetdispmode 1 +vfit +vzfit + +# relative tolerance (%) +set rel_tol 1 +set area_eps 0 +# +puts "\nChecking triangulation area (triarea command)..." +set rel_err [expr abs([CheckTriArea result $area_eps])] +if { $rel_err > $rel_tol } { + puts "Error : area by triangles differs from the actual area by $rel_err %" +} else { + if { $rel_tol > 1 && $rel_tol < 100 } { + puts "Error: Improvement: The current area difference is $rel_err instead of $rel_tol" + } +} + +set only_screen 1 diff --git a/tests/bugs/modalg_5/bug23282_2 b/tests/bugs/modalg_5/bug23282_2 new file mode 100755 index 0000000000..b54a3c0c92 --- /dev/null +++ b/tests/bugs/modalg_5/bug23282_2 @@ -0,0 +1,50 @@ +puts "================" +puts "OCC23282" +puts "================" +puts "" +####################################################################################### +# Wrong triangulation on cone +###################################################################################### + +set BugNumber OCC23282 + +pcone result 10 0 20 90 +incmesh result 0.1 +triangles result +isos result 0 + +checkshape result + +set square 454.16 + +set nb_v_good 4 +set nb_e_good 7 +set nb_w_good 4 +set nb_f_good 4 +set nb_sh_good 1 +set nb_sol_good 1 +set nb_compsol_good 0 +set nb_compound_good 0 +set nb_shape_good 21 + +vinit +vdisplay result +vsetdispmode 1 +vfit +vzfit + +# relative tolerance (%) +set rel_tol 1 +set area_eps 0 +# +puts "\nChecking triangulation area (triarea command)..." +set rel_err [expr abs([CheckTriArea result $area_eps])] +if { $rel_err > $rel_tol } { + puts "Error : area by triangles differs from the actual area by $rel_err %" +} else { + if { $rel_tol > 1 && $rel_tol < 100 } { + puts "Error: Improvement: The current area difference is $rel_err instead of $rel_tol" + } +} + +set only_screen 1