1 # =================== OCAF ======================
4 # Testing purpose: Naming selection mechanism
6 # Test case: F4 (ShapeOrientation is not used)
8 # 2. Create prism Pr1 ($Prism1)
9 # 3. Create prism Pr2 ($Prism2)
10 # 4. $FS1 = Fuse ($Prism1, $Prism2)
11 # 5. Make selections for all sub-shapes
13 # 7. Recompute modeling functions
14 # 8. Recompute selections
15 # ===============================================
21 NewDocument D MDTV-Standard
24 #Box|Sph|Cyl|Cut|Fuse|Prism|SecRevol|FulRevol|PTxyz|PTALine|PRLine|PMirr|Fillet|Attach|XAttach
25 # order of functions recomputation should be defined out of the tool (by end user)
26 AddDriver D Box Attach PTxyz PTALine PRLine PMirr Sph Prism FulRevol SecRevol
28 #1 - create box using more flexible set of commands
31 set B2 [AddObject D]; ## add object
32 set F2 [AddFunction D $B2 Box]; ## add function
33 BoxDX D $B2 190; ## set argumets of this function
36 InitLogBook D; ## initialize (clean) internal maps of labels
37 ComputeFun D $F2; ## compute the function
38 GetShape D $F2:2 Box2; ## check result
41 GetReference D $B2; ## referes to result NS
47 set Bas1 [AttachShape D Box2_1 ${B2} ${B2} 0]
48 set Prism1 [AddPrism D $Bas1 300 0]
49 ComputeFun D $Prism1:1
50 GetShape D $Prism1:1:2 Pr1
52 PrismHeight D $Prism1 500
53 ComputeFun D $Prism1:1
54 GetShape D $Prism1:1:2 Pr1
61 set Bas2 [AttachShape D Pr1_1 ${Prism1} ${Prism1} 0]
62 set Prism2 [AddPrism D $Bas2 500 0]
63 ComputeFun D $Prism2:1
64 GetShape D $Prism2:1:2 Pr2
69 set FS1 [AddFuse D $Prism1 $Prism2]
77 set SL [TestSingleSelection D $Prism1 0]
78 set SL2 [TestMultipleSelection D $Prism1 0]
79 # both have failed units!!!
85 #7 order of recomputation
87 InitLogBook D; ## to be initialized before any recomputation of impacted functions set (if attachments are presented)
90 ComputeFun D $Prism1:1
92 ComputeFun D $Prism2:1