40093367 |
1 | #INTERFACE CAF |
2 | # Presentation attributes |
3 | # |
4 | # Testing attribute: TPrsStd_AISPresentation |
5 | # |
6 | # Testing command: AISDriver |
7 | # |
8 | |
9 | puts "caf003-L2" |
10 | |
11 | # Create a box |
12 | box aBox 100 200 300 |
13 | set aLabel 0:2 |
14 | SetShape D ${aLabel} aBox |
15 | |
16 | # Initialize 3D viewer |
17 | AISInitViewer D |
18 | |
19 | # Add AISPresentation attribute with parameter NS |
20 | set aDriverGUID1 [lindex [AISSet D ${aLabel} NS] 0] |
21 | |
22 | # Display presentation of NamedShape in the viewer |
23 | AISDisplay D ${aLabel} |
24 | |
25 | # Close/Open transaction |
26 | NewCommand D |
27 | |
28 | # Set driver GUID |
29 | set IsDone [catch {set aDriverGUID2 [lindex [AISDriver D ${aLabel} A] 0]} aResult] |
30 | if { ${IsDone} != 0 } { |
31 | puts "It is not necessary to have the photo for this case." |
32 | puts ${aResult} |
33 | puts "Set the driver GUID; AISDriver command: Error" |
34 | return |
35 | } |
36 | |
37 | # Close/Open transaction |
38 | NewCommand D |
39 | |
40 | # Undo |
41 | Undo D |
42 | |
43 | # Get driver GUID |
44 | set aDriverGUID3 [lindex [AISDriver D ${aLabel}] 0] |
45 | |
46 | puts "It is not necessary to have the photo for this case." |
47 | |
48 | if { ${aDriverGUID1} == ${aDriverGUID2} || |
49 | ${aDriverGUID1} != ${aDriverGUID3} } { |
50 | puts "aDriverGUID1=${aDriverGUID1} aDriverGUID2=${aDriverGUID2}" |
51 | puts "aDriverGUID1=${aDriverGUID1} aDriverGUID3=${aDriverGUID3}" |
52 | puts "Set the driver GUID; AISDriver command: Error" |
53 | return |
54 | } |
55 | puts "Set the driver GUID; AISDriver command: OK" |