a87752f3 |
1 | puts "===========" |
2 | puts "OCC73" |
3 | puts "BUC61050" |
4 | puts "===========" |
5 | |
6 | pload QAcommands |
7 | |
8 | NewDocument D MDTV-Standard |
9 | UndoLimit D 10 |
10 | |
11 | # Close/Open transaction |
12 | NewCommand D |
13 | |
14 | # Set NamedShape attribute |
15 | box aBox1 100 200 300 |
16 | set aLabel 0:2 |
17 | SetShape D ${aLabel} aBox1 |
18 | |
19 | # Initialize 3D viewer |
20 | AISInitViewer D |
21 | |
22 | # Add AISPresentation attribute with parameter NS |
23 | AISSet D ${aLabel} NS |
24 | |
25 | # Display presentation of NamedShape in the viewer |
26 | AISDisplay D ${aLabel} |
27 | |
28 | # Get a selection mode of the shape |
29 | set SelectionMode0 [OCC73_SelectionMode D ${aLabel}] |
30 | |
31 | # Set a selection mode of the shape as 1 |
32 | set SelectionMode 1 |
33 | OCC73_SelectionMode D ${aLabel} ${SelectionMode} |
34 | |
35 | # Get a selection mode of the shape |
36 | set SelectionMode1 [OCC73_SelectionMode D ${aLabel}] |
37 | |
38 | puts "SelectionMode0 = ${SelectionMode0}" |
39 | puts "SelectionMode1 = ${SelectionMode1}" |
40 | puts "SelectionMode = ${SelectionMode}" |
41 | |
42 | if {${SelectionMode0} == ${SelectionMode1} || ${SelectionMode1} != ${SelectionMode}} then { |
43 | puts "OCC73: Error" |
44 | } else { |
45 | puts "OCC73: OK" |
46 | } |