0027958: Visualization, AIS_Trihedron - add shaded presentation option
[occt.git] / tests / bugs / vis / bug24762_coloredshape
1 puts "========"
2 puts "OCC24762 new interactive object AIS_ColoredShape with customized subshapes presentations"
3 puts "========"
4
5 # draw box in advance which should fit all our markers
6 box b  0 0 0 1 2 3
7 box bb 3 0 0 2 3 1
8
9 # prepare view
10 vinit View1
11 vclear
12 vglinfo
13 vsetdispmode 1
14 vaxo
15 vdisplay b bb
16 vfit
17
18 # customize box 1
19 explode b V
20 vaspects b -subshapes b_1      -setcolor GREEN
21 explode b E
22 vaspects b -subshapes b_6 b_12 -setcolor RED     -setwidth 6
23 explode b W
24 vaspects b -subshapes b_2      -setcolor HOTPINK -setwidth 4
25 explode b F
26 vaspects b -subshapes b_3      -setcolor GRAY
27
28 # customize box 2
29 explode bb F
30 vaspects bb -setcolor GREEN -subshapes bb_6 -setcolor RED
31 vsetdispmode bb 0
32
33 # take snapshot
34 vdump $imagedir/${casename}.png
35
36 # check colors on box 1
37 set aWireColor  [vreadpixel 54  150 rgb name]
38 set anEdgeColor [vreadpixel 100  90 rgb name]
39 set aFaceColor  [vreadpixel 30  200 rgb name]
40 if {"$aWireColor"  != "HOTPINK"} {
41   puts "Error: wrong Wire color"
42 }
43 if {"$anEdgeColor" != "RED"} {
44   puts "Error: wrong Edge color"
45 }
46 if {"$aFaceColor"  != "GRAY62"} {
47   puts "Error: wrong Face color"
48 }