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 | |
11 | puts "caf003-B2" |
12 | |
13 | # Set NamedShape attribute |
14 | box aBox1 100 200 300 |
15 | set aLabel 0:2 |
16 | SetShape D ${aLabel} aBox1 |
17 | |
18 | # Initialize 3D viewer |
19 | AISInitViewer D |
20 | |
21 | # Add AISPresentation attribute with parameter NS |
22 | AISSet D ${aLabel} NS |
23 | |
24 | # Display presentation of NamedShape in the viewer |
25 | AISDisplay D ${aLabel} |
26 | |
27 | # Close/Open transaction |
28 | NewCommand D |
29 | |
30 | # Set a color of the shape as NOC_GREEN |
31 | set GreenColor 229 |
32 | AISColor D ${aLabel} ${GreenColor} |
33 | |
34 | # Close/Open transaction |
35 | NewCommand D |
36 | |
37 | # Undo |
38 | Undo D |
39 | |
40 | # Update the viewer |
41 | AISRepaint D |
42 | |
43 | # Redo |
44 | Redo D |
45 | |
46 | # Update the viewer |
47 | AISRepaint D |
48 | |
49 | # Check own color |
50 | set HasOwnColor [AISHasOwnColor D ${aLabel}] |
51 | |
52 | puts "It is not necessary to have the photo for this case." |
53 | |
54 | if { ${HasOwnColor} == 0 } { |
55 | puts "HasOwnColor=${HasOwnColor}" |
56 | puts "There is not own color; AISHasOwnColor command: Error" |
57 | return |
58 | } |
59 | puts "There is own color; AISHasOwnColor command: OK" |