5 ########################################################
6 # Shape orientation processing mechanis, redesign
7 ########################################################
9 ## test for keeping Orientation (cbf)
16 set B2 [AddObject D]; ## add object
17 set F2 [AddFunction D $B2 Box]; ## add function
18 BoxDX D $B2 190; ## set argumets of this function
21 InitLogBook D; ## initialize (clean) internal maps of labels
22 AddDriver D Box Attach
23 ComputeFun D $F2; ## compute the function
24 GetShape D $F2:2 Box2; ## check result
26 #2 - make selections keeping orientation
31 set Sel1 [AttachShape D Box2_1_1 ${B2} ${B2} 1]; ## set attachment
32 set Sel2 [AttachShape D Box2_3_4 ${B2} ${B2} 1]; ## set attachment
34 #3 - check orientation of the selected shapes
35 GetShape D 0:1:2:1:2 E1
37 ## to be: E1 is a shape EDGE FORWARD Modified Orientable
38 if { [regexp "FORWARD" $info1] != 1 } {
39 puts "Error: orientation of E1 is incorrect"
41 puts "OK: orientation of E1 is correct"
44 GetShape D 0:1:3:1:2 E2
46 ## to be: E2 is a shape EDGE REVERSED Modified Orientable
47 if { [regexp "REVERSED" $info2] != 1 } {
48 puts "Error: orientation of E2 is incorrect"
50 puts "OK: orientation of E2 is correct"
53 #4 - test persistence: check orientation after retrieving (to be the same as before)
54 file delete -force ${imagedir}/bug23766_ttt1.cbf
56 SaveAs D ${imagedir}/bug23766_ttt1.cbf
59 Open ${imagedir}/bug23766_ttt1.cbf D
60 GetShape D 0:1:2:1:2 E1
62 ## to be: E1 is a shape EDGE FORWARD Modified Orientable
63 if { [regexp "FORWARD" $info3] != 1 } {
64 puts "Error: orientation of E1 is incorrect"
66 puts "OK: orientation of E1 is correct"
69 GetShape D 0:1:3:1:2 E2
71 ## to be: E2 is a shape EDGE REVERSED Modified Orientable
72 if { [regexp "REVERSED" $info4] != 1 } {
73 puts "Error: orientation of E2 is incorrect"
75 puts "OK: orientation of E2 is correct"