4 # Testing attribute: TDataStd_Shape
6 # Testing command: SetShape
7 # Testing command: GetShape
12 # Add an attribute to a data framework
20 box aBox1 ${aSetX1} ${aSetY1} ${aSetZ1} ${aSetDX1} ${aSetDY1} ${aSetDZ1}
22 set aBoundingBox1 [bounding aBox1]
23 set X1_Box1 [lindex ${aBoundingBox1} 0]
24 set Y1_Box1 [lindex ${aBoundingBox1} 1]
25 set Z1_Box1 [lindex ${aBoundingBox1} 2]
26 set X2_Box1 [lindex ${aBoundingBox1} 3]
27 set Y2_Box1 [lindex ${aBoundingBox1} 4]
28 set Z2_Box1 [lindex ${aBoundingBox1} 5]
31 SetShape D ${aLabel} aBox1
33 # Close/Open the transaction
36 # Set a new value of the attribute
43 box aBox3 ${aSetX2} ${aSetY2} ${aSetZ2} ${aSetDX2} ${aSetDY2} ${aSetDZ2}
45 SetShape D ${aLabel} aBox3
47 # Close/Open the transaction
53 # Get a value of the attribute
54 GetShape D ${aLabel} aBox4
56 set aBoundingBox4 [bounding aBox4]
57 set X1_Box4 [lindex ${aBoundingBox4} 0]
58 set Y1_Box4 [lindex ${aBoundingBox4} 1]
59 set Z1_Box4 [lindex ${aBoundingBox4} 2]
60 set X2_Box4 [lindex ${aBoundingBox4} 3]
61 set Y2_Box4 [lindex ${aBoundingBox4} 4]
62 set Z2_Box4 [lindex ${aBoundingBox4} 5]
64 if { ${X1_Box1} != ${X1_Box4} ||
65 ${Y1_Box1} != ${Y1_Box4} ||
66 ${Z1_Box1} != ${Z1_Box4} ||
67 ${X2_Box1} != ${X2_Box4} ||
68 ${Y2_Box1} != ${Y2_Box4} ||
69 ${Z2_Box1} != ${Z2_Box4} } {
70 puts "X1_Box1=${X1_Box1} X1_Box4=${X1_Box4}"
71 puts "Y1_Box1=${Y1_Box1} Y1_Box4=${Y1_Box4}"
72 puts "Z1_Box1=${Z1_Box1} Z1_Box4=${Z1_Box4}"
73 puts "X2_Box1=${X2_Box1} X2_Box4=${X2_Box4}"
74 puts "Y2_Box1=${Y2_Box1} Y2_Box4=${Y2_Box4}"
75 puts "Z2_Box1=${Z2_Box1} Z2_Box4=${Z2_Box4}"
76 puts "Set a value of TDataStd_Shape attribute: Error"
79 puts "Set a value of TDataStd_Shape attribute: OK"