0025265: Perspective projection - selecting front point of two
[occt.git] / tests / caf / presentation / B4
CommitLineData
40093367 1#INTERFACE CAF
2# Presentation attributes
3#
4# Testing attribute: TPrsStd_AISPresentation
5#
6# Testing command: AISColor
7# Note: Numerical control of setting color
8#
9
10puts "caf003-B4"
11
12# Set NamedShape attribute
13box aBox1 100 200 300
14set aLabel 0:2
15SetShape D ${aLabel} aBox1
16
17# Initialize 3D viewer
18AISInitViewer D
19
20# Add AISPresentation attribute with parameter NS
21AISSet D ${aLabel} NS
22
23# Display presentation of NamedShape in the viewer
24AISDisplay D ${aLabel}
25
26# Close/Open transaction
27NewCommand D
28
29# Set a color of the shape as NOC_GREEN
30set GreenColor 229
31AISColor D ${aLabel} ${GreenColor}
32
33# Close/Open transaction
34NewCommand D
35
36# Undo
37Undo D
38
39# Update the viewer
40AISRepaint D
41
42# Redo
43Redo D
44
45# Update the viewer
46AISRepaint D
47
48# Check the color
49#set aColor [lindex [AISColor D ${aLabel}] 0]
50set tmpLine [AISColor D ${aLabel}]
51set tmpLength [llength ${tmpLine}]
52set aColor [lindex ${tmpLine} [expr ${tmpLength} - 1]]
53
54
55puts "It is not necessary to have the photo for this case."
56
57if { ${aColor} != ${GreenColor} } {
58 puts "GreenColor=${GreenColor}"
59 puts "aColor=${aColor}"
60 puts "The box's color is not NOC_GREEN; AISColor command: Error"
61 return
62}
63puts "The box's color is NOC_GREEN; AISColor command: OK"