1 puts "================"
3 puts "================"
5 #######################################################################################
6 # Create Attribute Delta depending on actual change of the attribute
7 #######################################################################################
8 # Case 6 (TDataStd_Geometry)
9 #######################################################################################
11 # Create a new document and set UndoLimit
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 ############################################
35 # Set TDataStd_Geometry
37 SetGeometry D ${Label} "pnt" ${Box}
38 ############################################
40 SetReal D ${Label} ${Real1}
41 set list [DumpCommand D]
45 set list [DumpCommand D]
47 ############################################
48 # Set old value for TDataStd_Geometry
49 SetGeometry D ${Label} "pnt" ${Box}
50 ############################################
52 # Set new value for TDataStd_Real
53 SetReal D ${Label} ${Real2}
54 set list [DumpCommand D]
58 set list [DumpCommand D]
62 set ll [llength ${list}]
65 puts "good_length = ${good_length}"
67 if { ${ll} != ${good_length} } {
68 puts "OCC2932 Error (case 1)"
70 set name_attribute [lindex ${list} [expr ${good_length} - 1]]
71 puts "name_attribute = ${name_attribute}"
72 puts "modified_attribute = ${modified_attribute}"
73 if {[string compare ${name_attribute} ${modified_attribute}] == 0} {
76 puts "OCC2932 Error (case 2)"
82 set ll [llength ${list}]
85 puts "good_length = ${good_length}"
87 if { ${ll} != ${good_length} } {
88 puts "OCC2932 Error (case 1)"
90 set name_attribute1 [lindex ${list} [expr ${good_length} - 1]]
91 set name_attribute2 [lindex ${list} [expr ${good_length} - 4]]
92 set modified_attribute2 TNaming_NamedShape
93 puts "name_attribute1 = ${name_attribute1}"
94 puts "name_attribute2 = ${name_attribute2}"
95 puts "modified_attribute = ${modified_attribute}"
96 puts "modified_attribute2 = ${modified_attribute2}"
98 set Is_TDataStd_Real 0
99 set Is_TNaming_NamedShape 0
100 if {[string compare ${name_attribute1} ${modified_attribute}] == 0 ||
101 [string compare ${name_attribute2} ${modified_attribute}] == 0 } {
102 set Is_TDataStd_Real 1
104 if {[string compare ${name_attribute1} ${modified_attribute2}] == 0 ||
105 [string compare ${name_attribute2} ${modified_attribute2}] == 0 } {
106 set Is_TNaming_NamedShape 1
110 if { ${Is_TDataStd_Real} == 1 && ${Is_TNaming_NamedShape} == 1 } {
113 puts "OCC2932 Error (case 2)"