0026342: No materials are read from STEP
[occt.git] / tests / bugs / caf / bug73_3
CommitLineData
a87752f3 1puts "==========="
2puts "OCC73"
3puts "BUC61050"
4puts "==========="
5
6pload QAcommands
7
e837410d 8NewDocument D BinOcaf
a87752f3 9UndoLimit D 10
10
11# Close/Open transaction
12NewCommand D
13
14# Set NamedShape attribute
15box aBox1 100 200 300
16set aLabel 0:2
17SetShape D ${aLabel} aBox1
18
19# Initialize 3D viewer
20AISInitViewer D
21
22# Add AISPresentation attribute with parameter NS
23AISSet D ${aLabel} NS
24
25# Display presentation of NamedShape in the viewer
26AISDisplay D ${aLabel}
27
28# Get a selection mode of the shape
29set SelectionMode0 [OCC73_SelectionMode D ${aLabel}]
30
31# Set a selection mode of the shape as 1
32set SelectionMode 1
33OCC73_SelectionMode D ${aLabel} ${SelectionMode}
34
35# Get a selection mode of the shape
36set SelectionMode1 [OCC73_SelectionMode D ${aLabel}]
37
38# Close/Open transaction
39NewCommand D
40
41# Forget the attribute
42ForgetAll D ${aLabel}
43NewCommand D
44
45# Undo-Redo-Undo
46Undo D
47Redo D
48Undo D
49
50# Get a selection mode of the shape
51set IsDone [catch {set SelectionMode2 [OCC73_SelectionMode D ${aLabel}]} aResult]
52
53if { ${IsDone} != 0 } {
54 puts "OCC73: Error"
55 puts ${aResult}
56} else {
57
58puts "SelectionMode0 = ${SelectionMode0}"
59puts "SelectionMode1 = ${SelectionMode1}"
60puts "SelectionMode = ${SelectionMode}"
61puts "SelectionMode2 = ${SelectionMode2}"
62
63if {${SelectionMode0} == ${SelectionMode1} || ${SelectionMode1} != ${SelectionMode} || ${SelectionMode1} != ${SelectionMode2}} then {
64 puts "OCC73: Error"
65} else {
66 puts "OCC73: OK"
67}
68
69}