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