5 ########################################################
6 # Shape orientation processing mechanis, redesign
7 ########################################################
9 ## test for keeping Orientation (std)
12 NewDocument D MDTV-Standard
15 set B2 [AddObject D]; ## add object
16 set F2 [AddFunction D $B2 Box]; ## add function
17 BoxDX D $B2 190; ## set argumets of this function
20 InitLogBook D; ## initialize (clean) internal maps of labels
21 AddDriver D Box Attach
22 ComputeFun D $F2; ## compute the function
23 GetShape D $F2:2 Box2; ## check result
25 #2 - make selections keeping orientation
30 set Sel1 [AttachShape D Box2_1_1 ${B2} ${B2} 1]; ## set attachment keeping orientation of the edge
31 set Sel2 [AttachShape D Box2_3_4 ${B2} ${B2} 1]; ## set attachment keeping orientation of the edge
33 #3 - check orientation of the selected shapes
34 GetShape D 0:1:2:1:2 E1
36 ## to be: E1 is a shape EDGE FORWARD Modified Orientable
37 if { [regexp "FORWARD" $info1] != 1 } {
38 puts "Error: orientation of E1 is incorrect"
40 puts "OK: orientation of E1 is correct"
43 GetShape D 0:1:3:1:2 E2
45 ## to be: E2 is a shape EDGE REVERSED Modified Orientable
46 if { [regexp "REVERSED" $info2] != 1 } {
47 puts "Error: orientation of E2 is incorrect"
49 puts "OK: orientation of E2 is correct"
52 #4 - test persistence: check orientation after retrieving (to be the same as before)
53 file delete -force ${imagedir}/bug23766_ttt1.std
55 SaveAs D ${imagedir}/bug23766_ttt1.std
58 Open ${imagedir}/bug23766_ttt1.std D
59 GetShape D 0:1:2:1:2 E1
61 ## to be: E1 is a shape EDGE FORWARD Modified Orientable
62 if { [regexp "FORWARD" $info3] != 1 } {
63 puts "Error: orientation of E1 is incorrect"
65 puts "OK: orientation of E1 is correct"
68 GetShape D 0:1:3:1:2 E2
70 ## to be: E2 is a shape EDGE REVERSED Modified Orientable
71 if { [regexp "REVERSED" $info4] != 1 } {
72 puts "Error: orientation of E2 is incorrect"
74 puts "OK: orientation of E2 is correct"