0025132: Visualization - treat any TopoDS_Solid as closed volume
[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
24vsetgradientbg 255 0 0 0 0 255 4
25set Color1 [QAGetPixelColor ${x1} ${y1}]
26set Color2 [QAGetPixelColor ${x2} ${y2}]
27set Color3 [QAGetPixelColor ${x3} ${y3}]
28set Color4 [QAGetPixelColor ${x4} ${y4}]
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
35set ColorRes1 [QAGetPixelColor ${x1} ${y1}]
36set ColorRes2 [QAGetPixelColor ${x2} ${y2}]
37set ColorRes3 [QAGetPixelColor ${x3} ${y3}]
38set ColorRes4 [QAGetPixelColor ${x4} ${y4}]
39
40set status 0
41if { ${Color1} == ${ColorRes1} && ${Color2} == ${ColorRes2} && ${Color3} == ${ColorRes3} && ${Color4} == ${ColorRes4}} {
42 set status 0
43} else {
44 set status 1
45}
46
47# Resume
48puts ""
49if { ${status} != 0} {
50 puts "Faulty ${BugNumber}"
51} else {
52 puts "OK ${BugNumber}"
53}
54set only_screen 1