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