0030942: Draw Harness, ViewerTest - command vdefaults should abort script on unknown...
[occt.git] / tests / bugs / vis / bug22906
CommitLineData
3bea4c16 1
2puts "================"
3puts "OCC22906"
4puts "================"
5puts ""
6#######################################################################################
7# Gradient background is clipped by planes
8######################################################################################
9
10set BugNumber OCC22906
11set x1 73
12set y1 338
13
14set x2 144
15set y2 23
16
17set x3 377
18set y3 123
19
20set x4 87
21set y4 232
22
23vinit
293211ae 24vbackground -gradient RED BLUE1 -gradientMode DIAGONAL2
ccadc126 25set Color1 [vreadpixel ${x1} ${y1} rgb]
26set Color2 [vreadpixel ${x2} ${y2} rgb]
27set Color3 [vreadpixel ${x3} ${y3} rgb]
28set Color4 [vreadpixel ${x4} ${y4} rgb]
4269bd1b 29vclipplane create pln1
30vclipplane change pln1 equation 1 0 0 -0.1
31vclipplane set pln1 view Driver1/Viewer1/View1
3bea4c16 32box b 100 100 100
33vdisplay b
34vsetdispmode 1
ccadc126 35set ColorRes1 [vreadpixel ${x1} ${y1} rgb]
36set ColorRes2 [vreadpixel ${x2} ${y2} rgb]
37set ColorRes3 [vreadpixel ${x3} ${y3} rgb]
38set ColorRes4 [vreadpixel ${x4} ${y4} rgb]
3bea4c16 39
3bea4c16 40if { ${Color1} == ${ColorRes1} && ${Color2} == ${ColorRes2} && ${Color3} == ${ColorRes3} && ${Color4} == ${ColorRes4}} {
ccadc126 41 puts "OK ${BugNumber}"
3bea4c16 42} else {
ccadc126 43 puts "Faulty ${BugNumber}"
3bea4c16 44}
45
5747059b 46checkview -screenshot -3d -path ${imagedir}/${test_image}.png