Adding test cases from chl grid
[occt.git] / tests / bugs / iges / bug22888
CommitLineData
09951da2 1puts "============"
2puts "CR22888"
3puts "============"
4puts ""
5#######################################################################
6# Wrong shape result imported from IGES file
7#######################################################################
8pload QAcommands
9
10set x1 166
11set y1 225
12
13igesread [locate_data_file CR22888-data.igs] a *
14if { [regexp "This shape seems to be valid" [checkshape a]] != 1 } {
15 puts "Error : checkshape is faulty"
16}
17
18explode a f
19vinit
20vsetdispmode 0
21vdisplay a_1
22vfit
23vzfit
24tclean a_1
25set inf_before [trinfo a_1]
26
27vsetdispmode a_1 1
28set inf_after [trinfo a_1]
29regexp { +([-0-9.+eE]+) +triangles} $inf_after full tri_after
30regexp { +([-0-9.+eE]+) +nodes} $inf_after full nod_after
31
32set color [QAGetPixelColor ${x1} ${y1}]
33regexp {RED +: +([-0-9.+eE]+)} $color full rd
34regexp {GREEN +: +([-0-9.+eE]+)} $color full gr
35regexp {BLUE +: +([-0-9.+eE]+)} $color full bl
36
37if { $rd == 0 || $gr == 0 || $bl == 0 } {
38 puts "Error : Face is not shaded (colors are not equal)"
39}
40
41if { $tri_after <= 0 || $nod_after <= 0 } {
42 puts "Error : Face is not shaded (number of nodes or triangles is wrong)"
43}
44
e54706ed 45set only_screen 1
46
09951da2 47
48
49
50
51
52
53
54
55
56
57
58