From 09951da2d77b68b16a6a7fb90880265aa00bc39c Mon Sep 17 00:00:00 2001 From: apn Date: Fri, 14 Sep 2012 17:38:41 +0400 Subject: [PATCH] 0022888: Wrong shape result imported from IGES file. Adding test case bugs/iges/CR22888 Modified test case bugs/iges/CR22888 --- tests/bugs/iges/CR22888 | 57 +++++++++++++++++++++++++++++++++++++++++ tests/bugs/iges/end | 9 +++++++ 2 files changed, 66 insertions(+) create mode 100755 tests/bugs/iges/CR22888 create mode 100755 tests/bugs/iges/end diff --git a/tests/bugs/iges/CR22888 b/tests/bugs/iges/CR22888 new file mode 100755 index 0000000000..d1af309483 --- /dev/null +++ b/tests/bugs/iges/CR22888 @@ -0,0 +1,57 @@ +puts "============" +puts "CR22888" +puts "============" +puts "" +####################################################################### +# Wrong shape result imported from IGES file +####################################################################### +pload QAcommands + +set x1 166 +set y1 225 + +igesread [locate_data_file CR22888-data.igs] a * +if { [regexp "This shape seems to be valid" [checkshape a]] != 1 } { + puts "Error : checkshape is faulty" +} + +explode a f +vinit +vsetdispmode 0 +vdisplay a_1 +vfit +vzfit +tclean a_1 +set inf_before [trinfo a_1] + +vsetdispmode a_1 1 +set inf_after [trinfo a_1] +regexp { +([-0-9.+eE]+) +triangles} $inf_after full tri_after +regexp { +([-0-9.+eE]+) +nodes} $inf_after full nod_after + +set color [QAGetPixelColor ${x1} ${y1}] +regexp {RED +: +([-0-9.+eE]+)} $color full rd +regexp {GREEN +: +([-0-9.+eE]+)} $color full gr +regexp {BLUE +: +([-0-9.+eE]+)} $color full bl + +if { $rd == 0 || $gr == 0 || $bl == 0 } { + puts "Error : Face is not shaded (colors are not equal)" +} + +if { $tri_after <= 0 || $nod_after <= 0 } { + puts "Error : Face is not shaded (number of nodes or triangles is wrong)" +} + +set CR22888_draw 1 + + + + + + + + + + + + diff --git a/tests/bugs/iges/end b/tests/bugs/iges/end new file mode 100755 index 0000000000..08b2023b0b --- /dev/null +++ b/tests/bugs/iges/end @@ -0,0 +1,9 @@ +if { [info exists CR22888_draw] } { +#vinit +#vclear +#vdisplay result +#vsetdispmode 1 +#vfit + vdump $imagedir/${test_image}.gif +} + -- 2.20.1