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