0025783: Visualization - allow Z-layer to draw 2D objects and to make it alternative...
[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
ccadc126 32set color [vreadpixel ${x1} ${y1} rgb]
33set rd [lindex $color 0]
34set gr [lindex $color 1]
35set bl [lindex $color 2]
09951da2 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