0032208: Tests - refactor visualization tests to cover several graphic drivers
[occt.git] / tests / bugs / vis / bug31412
1 puts "============="
2 puts "0031412: Visualization - entity behind is returned as topmost at the edges"
3 puts "============="
4
5 pload VISUALIZATION
6 box b1 250 250 900 1000 1000 200
7 box b2 1000 1000 1000
8 vdisplay -dispMode 1 b1 b2
9 vaspects b1 -setWidth 3 -setColor ORANGE
10 vaspects b2 -setWidth 3 -setColor MATRABLUE
11 vrenderparams -shadingModel UNLIT
12
13 vviewparams -proj 0 0 1
14 vfit
15 vmoveto 325 100
16 if { [vreadpixel 325 400 rgb name] == "CYAN" } { puts "ERROR: back box is misdetected" }
17 vpoint p1 -2d -nosel 325 100
18 vdump $imagedir/${casename}_proj_Z.png
19 vremove p1
20
21 vviewparams -proj 0 1 0
22 vfit
23 vmoveto 200 58
24 if { [vreadpixel 400 58 rgb name] == "CYAN" } { puts "ERROR: back box is misdetected" }
25 vpoint p2 -2d -nosel 200 58
26 vdump $imagedir/${casename}_proj_Y.png
27 vremove p2
28
29 vviewparams -proj 1 0 0
30 vfit
31 vmoveto 200 58
32 if { [vreadpixel 50 58 rgb name] == "CYAN" } { puts "ERROR: back box is misdetected" }
33 vpoint p3 -2d -nosel 200 58
34 vdump $imagedir/${casename}_proj_X.png
35 vremove p3