0025624: Visualization - selection is incorrect in perspective mode in a specific...
[occt.git] / tests / bugs / caf / bug2932_3
CommitLineData
61c421bf 1puts "================"
2puts "OCC2932"
3puts "================"
4puts ""
5#######################################################################################
6# Create Attribute Delta depending on actual change of the attribute
7#######################################################################################
8# Case 1 (TDataStd_Axis)
9#######################################################################################
10
11# Create a new document and set UndoLimit
12NewDocument D MDTV-Standard
13UndoLimit D 100
14
15# Create a label and set attributes
16NewCommand D
17set Label 0:2
18
19############################################
20set X 10
21set Y 20
22set Z 30
23set DX 100
24set DY 200
25set DZ 300
26line Line ${X} ${Y} ${Z} ${DX} ${DY} ${DZ}
27############################################
28
29set Real1 300.
30set Real2 400.
31set modified_attribute TDataStd_Real
32
33############################################
34# Set TDataStd_Axis
35SetAxis D ${Label} Line
36############################################
37
38SetReal D ${Label} ${Real1}
39set list [DumpCommand D]
40
41# Open a transaction
42NewCommand D
43set list [DumpCommand D]
44
45############################################
46# Set old value for TDataStd_Axis
47SetAxis D ${Label} Line
48############################################
49
50# Set new value for TDataStd_Real
51SetReal D ${Label} ${Real2}
52set list [DumpCommand D]
53
54# Open a transaction
55NewCommand D
56set list [DumpCommand D]
57
58# Checking
59set ll [llength ${list}]
60set good_length 17
61puts "length = ${ll}"
62puts "good_length = ${good_length}"
63
64if { ${ll} != ${good_length} } {
65 puts "OCC2932 Error (case 1)"
66} else {
67 set name_attribute [lindex ${list} [expr ${good_length} - 1]]
68 puts "name_attribute = ${name_attribute}"
69 puts "modified_attribute = ${modified_attribute}"
70 if {[string compare ${name_attribute} ${modified_attribute}] == 0} {
71 puts "OCC2932 OK"
72 } else {
73 puts "OCC2932 Error (case 2)"
74 }
75}