0027958: Visualization, AIS_Trihedron - add shaded presentation option
[occt.git] / tests / bugs / vis / bug26401
CommitLineData
5a19c303 1puts "========"
2puts "OCC26401"
3puts "========"
4puts ""
5###########################################################################################
6# Visualization - small boxes in front of big one disappear in perspective view
7###########################################################################################
8
9# Boxes {1 x 1 x 1}
10box b0 0 0 0 1 1 1
11box b1 -1 0 0 1 1 1
12box b2 1 0 0 1 1 1
13box b3 0 1 0 1 1 1
14box b4 -1 1 0 1 1 1
15box b5 1 1 0 1 1 1
16
17vinit View1
18vclear
19vaxo
20vsetdispmode 1
21vcamera -persp
22vdisplay b0 b1 b2 b3 b4 b5
23vsetcolor b1 b2 GREEN
24vsetcolor b4 b5 RED
25vsetcolor b3 GRAY55
26vfit
27vautozfit
28vzrange
29vtrihedron t
30
31set color "[vreadpixel 230 230 rgb]"
32if { [lindex $color 0] == 0 &&
33 [lindex $color 1] == 0 &&
34 [lindex $color 2] == 0 } {
35 puts "Error : Boxes disappear."
36}
37
38vdump $imagedir/${casename}_1.png
39
40# Boxes {0.01 x 0.01 x 0.01}
41box b0 0.00 0.00 0.00 0.01 0.01 0.01
42box b1 -0.01 0.00 0.00 0.01 0.01 0.01
43box b2 0.01 0.00 0.00 0.01 0.01 0.01
44box b3 0.00 0.01 0.00 0.01 0.01 0.01
45box b4 -0.01 0.01 0.00 0.01 0.01 0.01
46box b5 0.01 0.01 0.00 0.01 0.01 0.01
47
48vinit View2
49vclear
50vaxo
51vsetdispmode 1
52vcamera -persp
53vdisplay b0 b1 b2 b3 b4 b5
54vsetcolor b1 b2 GREEN
55vsetcolor b4 b5 RED
56vsetcolor b3 GRAY55
57vfit
58vautozfit
59vzrange
60vtrihedron t
61
62set color "[vreadpixel 230 230 rgb]"
63if { [lindex $color 0] == 0 &&
64 [lindex $color 1] == 0 &&
65 [lindex $color 2] == 0 } {
66 puts "Error : Boxes disappear."
67}
68
69vdump $imagedir/${casename}_2.png