Adjusting testing cases for current state of OCCT
[occt.git] / tests / caf / presentation / B2
CommitLineData
40093367 1#INTERFACE CAF
2# Presentation attributes
3#
4# Testing attribute: TPrsStd_AISPresentation
5#
6# Testing command: AISColor
7# Testing command: AISHasOwnColor
8# Note: AISColor-command: set AISColor and set AISHasOwnColor = true ( int 1 )
9#
10
11puts "caf003-B2"
12
13# Set NamedShape attribute
14box aBox1 100 200 300
15set aLabel 0:2
16SetShape D ${aLabel} aBox1
17
18# Initialize 3D viewer
19AISInitViewer D
20
21# Add AISPresentation attribute with parameter NS
22AISSet D ${aLabel} NS
23
24# Display presentation of NamedShape in the viewer
25AISDisplay D ${aLabel}
26
27# Close/Open transaction
28NewCommand D
29
30# Set a color of the shape as NOC_GREEN
31set GreenColor 229
32AISColor D ${aLabel} ${GreenColor}
33
34# Close/Open transaction
35NewCommand D
36
37# Undo
38Undo D
39
40# Update the viewer
41AISRepaint D
42
43# Redo
44Redo D
45
46# Update the viewer
47AISRepaint D
48
49# Check own color
50set HasOwnColor [AISHasOwnColor D ${aLabel}]
51
52puts "It is not necessary to have the photo for this case."
53
54if { ${HasOwnColor} == 0 } {
55 puts "HasOwnColor=${HasOwnColor}"
56 puts "There is not own color; AISHasOwnColor command: Error"
57 return
58}
59puts "There is own color; AISHasOwnColor command: OK"