1 # =================== OCAF ======================
4 # Testing purpose: Naming selection mechanism
6 # Test case: E8 (ShapeOrientation is not used)
8 # 2. Create sectioned revolution R1 ($SRev1)
9 # 3. Create sectioned revolution R2 ($SRev2)
10 # 4. Create sectioned revolution R3 ($SRev3)
11 # 5. ($FS1)R1 = Fuse (R1, R2)
12 # 6. ($FS2)R1 = Fuse (R1, R3)
13 # 7. Make selections for all sub-shapes
15 # 9. Recompute modeling functions
16 # 10. Recompute selections
17 # ===============================================
23 NewDocument D MDTV-Standard
26 #Box|Sph|Cyl|Cut|Fuse|Prism|SecRevol|FulRevol|PTxyz|PTALine|PRLine|PMirr|Fillet|Attach|XAttach
27 # order of functions recomputation should be defined out of the tool (by end user)
29 ## Test of transformation functions
30 AddDriver D Box Attach PTxyz PTALine PRLine PMirr Sph Prism FulRevol SecRevol
32 #1 - create box using more flexible set of commands
35 set B2 [AddObject D]; ## add object
36 set F2 [AddFunction D $B2 Box]; ## add function
37 BoxDX D $B2 190; ## set argumets of this function
40 InitLogBook D; ## initialize (clean) internal maps of labels
41 ComputeFun D $F2; ## compute the function
42 GetShape D $F2:2 Box2; ## check result
45 GetReference D $B2; ## referes to result NS
50 set SBas1 [AttachShape D Box2_3 ${B2} ${B2} 0]
51 set SAx1 [AttachShape D Box2_3_2 ${B2} ${B2} 0]
52 set SRev1 [AddRevol D $SBas1 $SAx1 120 0]
54 GetShape D $SRev1:1:2 R1
61 set SBas2 [AttachShape D R1_5 ${SRev1} ${SRev1} 0]
62 set SAx2 [AttachShape D R1_5_2 ${SRev1} ${SRev1} 0]
63 set SRev2 [AddRevol D $SBas2 $SAx2 120 0]
65 GetShape D $SRev2:1:2 R2
70 set SBas3 [AttachShape D R2_5 ${SRev2} ${SRev2} 0]
71 set SAx3 [AttachShape D R2_5_2 ${SRev2} ${SRev2} 0]
72 set SRev3 [AddRevol D $SBas3 $SAx3 120 0]
74 GetShape D $SRev3:1:2 R2
78 set FS1 [AddFuse D $SRev1 $SRev2]
83 set FS2 [AddFuse D $SRev1 $SRev3]
89 set SL [TestSingleSelection D $B2 0]
90 set SL2 [TestMultipleSelection D $B2 0]
96 #9 order of recomputation
98 InitLogBook D; ## to be initialized before any recomputation of impacted functions set (if attachments are presented)
100 ComputeFun D $SBas1:1
102 ComputeFun D $SRev1:1
103 ComputeFun D $SBas2:1
105 ComputeFun D $SRev2:1
106 ComputeFun D $SBas3:1
108 ComputeFun D $SRev3:1