Adjusting testing cases for current state of OCCT
[occt.git] / tests / bugs / vis / bug194_2
1 puts "========"
2 puts "OCC194"
3 puts "(case 2)"
4 puts "========"
5 puts ""
6 ###############################################
7 ##puts "Creating of 2D Rectangular ROTATED Grid WITHOUT Lines"
8 ##puts "(visual checking for this case is desirable)"
9 ###############################################
10
11 v2dinit
12 v2dgrid Rect 500 500 200 200 45 Points
13 if { [array get env os_type] != "" } {
14     set os $env(os_type)
15 }
16 if { [string compare $os "windows"] == 0 } {
17     set x1 20
18     set y1 20
19     set rd_ch 100000
20     set gr_ch 100000
21     set bl_ch 100000
22 ##    set rd_ch 49411
23 ##    set gr_ch 49411
24 ##    set bl_ch 49411
25 } else {
26     set x1 20
27     set y1 21
28     set rd_ch 70196
29     set gr_ch 70196
30     set bl_ch 70196
31 }
32
33 set color [QAAISGetPixelColor2d ${x1} ${y1}]
34 regexp {RED +: +([-0-9.+eE]+)} $color full rd
35 regexp {GREEN +: +([-0-9.+eE]+)} $color full gr
36 regexp {BLUE +: +([-0-9.+eE]+)} $color full bl
37
38 set rd_int [expr int($rd * 1.e+05)]
39 set gr_int [expr int($gr * 1.e+05)]
40 set bl_int [expr int($bl * 1.e+05)]
41
42 if { ${rd_int} != ${rd_ch} || ${gr_int} != ${gr_ch} || ${bl_int} != ${bl_ch} } {
43     puts "Error : colors are not equal"
44     puts "Error : 2D Rectangular ROTATED Grid WITHOUT Lines was NOT CREATED properly"
45 }
46
47 set only_screen2d 1