0023161: Select publicly accessible data files for OCCT tests
[occt.git] / tests / bugs / vis / CR23407_1
1 puts "============"
2 puts "CR23407"
3 puts "============"
4 puts ""
5 #######################################################################
6 # Draw face outlines for XDE objects
7 #######################################################################
8 pload QAcommands
9 pload XDEDRAW
10
11 set r_check 1
12 set g_check 0
13 set b_check 0
14 set x1 178
15 set y1 36
16 set x2 224
17 set y2 39
18 set x3 244
19 set y3 89
20
21 XNewDoc Doc1
22 ReadStep Doc1 [locate_data_file screw.step]
23 XShow Doc1 0:1:1:1
24 XShowFaceBoundary Doc1 0:1:1:1 1 255 0 0 10 1
25 vfit
26 vsetdispmode 1
27
28 set color1 [ QAGetPixelColor ${x1} ${y1} ]
29 regexp {RED +: +([-0-9.+eE]+)} $color1 full rd1
30 regexp {GREEN +: +([-0-9.+eE]+)} $color1 full gr1
31 regexp {BLUE +: +([-0-9.+eE]+)} $color1 full bl1
32 set status1 0
33 if { $rd1 != $r_check || $gr1 != $g_check || $bl1 != $b_check } {
34     set status1 1
35 }
36
37 set color2 [ QAGetPixelColor ${x2} ${y2} ]
38 regexp {RED +: +([-0-9.+eE]+)} $color2 full rd2
39 regexp {GREEN +: +([-0-9.+eE]+)} $color2 full gr2
40 regexp {BLUE +: +([-0-9.+eE]+)} $color2 full bl2
41 set status2 0
42 if { $rd2 != $r_check || $gr2 != $g_check || $bl2 != $b_check } {
43     set status2 1
44 }
45
46 set color3 [ QAGetPixelColor ${x3} ${y3} ]
47 regexp {RED +: +([-0-9.+eE]+)} $color3 full rd3
48 regexp {GREEN +: +([-0-9.+eE]+)} $color3 full gr3
49 regexp {BLUE +: +([-0-9.+eE]+)} $color3 full bl3
50 set status3 0
51 if { $rd3 != $r_check || $gr3 != $g_check || $bl3 != $b_check } {
52     set status3 1
53 }
54
55 if { $status1 != 0 && $status2 != 0 && $status3 != 0 } {
56     puts "Error : color are not equal"
57     puts "Error : Boundary of face is not changed"
58 }
59
60 set 3dviewer 2