40093367 |
1 | #INTERFACE CAF |
2 | # Presentation attributes |
3 | # |
4 | # Testing attribute: TPrsStd_AISPresentation |
5 | # |
6 | # Testing command: AISColor |
7 | # Note: Visual control of setting color |
8 | # |
9 | |
10 | puts "caf003-B3" |
11 | |
12 | # Set NamedShape attribute |
13 | box aBox1 100 200 300 |
14 | set aLabel 0:2 |
15 | SetShape D ${aLabel} aBox1 |
16 | |
17 | # Initialize 3D viewer |
18 | AISInitViewer D |
19 | |
20 | # Add AISPresentation attribute with parameter NS |
21 | AISSet D ${aLabel} NS |
22 | |
23 | # Display presentation of NamedShape in the viewer |
24 | AISDisplay D ${aLabel} |
25 | |
26 | # Close/Open transaction |
27 | NewCommand D |
28 | |
29 | # Set a color of the shape as NOC_GREEN |
30 | AISColor D ${aLabel} 229 |
31 | |
32 | # Close/Open transaction |
33 | NewCommand D |
34 | |
35 | # Undo |
36 | Undo D |
37 | |
38 | # Update the viewer |
39 | AISRepaint D |
40 | |
41 | # Redo |
42 | Redo D |
43 | |
44 | # Update the viewer |
45 | AISRepaint D |
46 | |
47 | puts "The box's color is NOC_GREEN" |