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