1 puts "================"
3 puts "================"
5 #######################################################################################
6 # Create Attribute Delta depending on actual change of the attribute
7 #######################################################################################
8 # Case 3 (TDataStd_Constraint)
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}
29 # Set a shape to the label
31 SetShape D ${BoxLabel} Box
33 # Set integer attribute
36 SetInteger D ${IntegerLabel} ${Integer}
38 ############################################
42 set modified_attribute TDataStd_Real
44 ############################################
45 # Set TDataStd_Constraint
47 SetConstraint D ${Label} "tan" ${BoxLabel}
48 SetConstraint D ${Label} "plane" ${BoxLabel}
49 SetConstraint D ${Label} "value" ${IntegerLabel}
50 ############################################
52 SetReal D ${Label} ${Real1}
53 set list [DumpCommand D]
57 set list [DumpCommand D]
59 ############################################
60 # Set old value for TDataStd_Constraint
61 SetConstraint D ${Label} "tan" ${BoxLabel}
62 SetConstraint D ${Label} "plane" ${BoxLabel}
63 SetConstraint D ${Label} "value" ${IntegerLabel}
64 ############################################
66 # Set new value for TDataStd_Real
67 SetReal D ${Label} ${Real2}
68 set list [DumpCommand D]
72 set list [DumpCommand D]
75 set ll [llength ${list}]
78 puts "good_length = ${good_length}"
80 if { ${ll} != ${good_length} } {
81 puts "OCC2932 Error (case 1)"
83 set name_attribute [lindex ${list} [expr ${good_length} - 1]]
84 puts "name_attribute = ${name_attribute}"
85 puts "modified_attribute = ${modified_attribute}"
86 if {[string compare ${name_attribute} ${modified_attribute}] == 0} {
89 puts "OCC2932 Error (case 2)"