40093367 |
1 | #INTERFACE CAF |
2 | # Presentation attributes |
3 | # |
4 | # Testing attribute: TPrsStd_AISPresentation |
5 | # |
6 | # Testing command: AISMaterial |
7 | # Note: Visual control of setting material |
8 | # |
9 | |
10 | puts "caf003-D3" |
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 | # Set shading mode |
24 | vsetdispmode 1 |
25 | |
26 | # Display presentation of NamedShape in the viewer |
27 | AISDisplay D ${aLabel} |
28 | |
29 | # Close/Open transaction |
30 | NewCommand D |
31 | |
32 | # Set a material of the shape as NOM_JADE |
33 | AISMaterial D ${aLabel} 18 |
34 | |
35 | # Close/Open transaction |
36 | NewCommand D |
37 | |
38 | # Undo |
39 | Undo D |
40 | |
41 | # Update the viewer |
42 | AISRepaint D |
43 | |
44 | # Redo |
45 | Redo D |
46 | |
47 | # Update the viewer |
48 | AISRepaint D |
49 | |
50 | puts "The box's material is NOM_JADE" |