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