1 puts "================"
3 puts "================"
5 #######################################################################################
6 # Create Attribute Delta depending on actual change of the attribute
7 #######################################################################################
8 # Case 16 (TDataStd_Shape)
9 #######################################################################################
11 # Create a new document and set UndoLimit
12 NewDocument D MDTV-Standard
15 # Create a label and set attributes
19 ############################################
27 box Box ${X} ${Y} ${Z} ${DX} ${DY} ${DZ}
28 ############################################
32 set modified_attribute TDataStd_Real
34 ############################################
36 SetShape D ${Label} Box
37 ############################################
39 SetReal D ${Label} ${Real1}
40 set list [DumpCommand D]
44 set list [DumpCommand D]
46 ############################################
47 # Set old value for TDataStd_Shape
48 SetShape D ${Label} Box
49 ############################################
51 # Set new value for TDataStd_Real
52 SetReal D ${Label} ${Real2}
53 set list [DumpCommand D]
57 set list [DumpCommand D]
61 set ll [llength ${list}]
64 puts "good_length = ${good_length}"
66 if { ${ll} != ${good_length} } {
67 puts "OCC2932 Error (case 1)"
69 set name_attribute [lindex ${list} [expr ${good_length} - 1]]
70 puts "name_attribute = ${name_attribute}"
71 puts "modified_attribute = ${modified_attribute}"
72 if {[string compare ${name_attribute} ${modified_attribute}] == 0} {
75 puts "OCC2932 Error (case 2)"
81 set ll [llength ${list}]
84 puts "good_length = ${good_length}"
86 if { ${ll} != ${good_length} } {
87 puts "OCC2932 Error (case 1)"
89 set name_attribute1 [lindex ${list} [expr ${good_length} - 1]]
90 set name_attribute2 [lindex ${list} [expr ${good_length} - 4]]
91 set modified_attribute2 TNaming_NamedShape
92 puts "name_attribute1 = ${name_attribute1}"
93 puts "name_attribute2 = ${name_attribute2}"
94 puts "modified_attribute = ${modified_attribute}"
95 puts "modified_attribute2 = ${modified_attribute2}"
97 set Is_TDataStd_Real 0
98 set Is_TNaming_NamedShape 0
99 if {[string compare ${name_attribute1} ${modified_attribute}] == 0 ||
100 [string compare ${name_attribute2} ${modified_attribute}] == 0 } {
101 set Is_TDataStd_Real 1
103 if {[string compare ${name_attribute1} ${modified_attribute2}] == 0 ||
104 [string compare ${name_attribute2} ${modified_attribute2}] == 0 } {
105 set Is_TNaming_NamedShape 1
109 if { ${Is_TDataStd_Real} == 1 && ${Is_TNaming_NamedShape} == 1 } {
112 puts "OCC2932 Error (case 2)"