1 # =================== OCAF ======================
4 # Testing purpose: Naming selection mechanism
6 # Test case: E6 (ShapeOrientation is not used)
9 # 3. Translate B1 along XYZ
11 # 5. Create cylinder Cyl
12 # 6. CS = Cut (B1, Cyl)
14 # 8. Make selections for all sub-shapes
16 # 10. Recompute modeling functions
17 # 11. Recompute selections
18 # ===============================================
25 NewDocument D MDTV-Standard
27 #1 - create Box using short-cut
29 AddDriver D Box; ## add box driver to driver table
30 set B1 [AddBox D 130 140 150]; ## add box
31 ComputeFun D $B1:1; ## compute box1 function
32 GetShape D $B1:1:2 Box1; ## check result
34 # referes to result NS
35 GetReference D $B1; ## check is reference set
37 #2 - create box using more flexible set of commands
39 set B2 [AddObject D]; ## add object
40 set F2 [AddFunction D $B2 Box]; ## add function
41 BoxDX D $B2 190; ## set argumets of this function
44 InitLogBook D; ## initialize (clean) internal maps of labels
45 AddDriver D Box Attach Cyl
46 ComputeFun D $F2; ## compute the function
47 GetShape D $F2:2 Box2; ## check result
49 GetReference D $B2; ## referes to result NS
53 AddDriver D PTxyz PTALine PRLine
54 set FTr1 [PTranslateDXYZ D $B1 110 130 270]
55 ComputeFun D $FTr1; ## translation function recomputation
56 GetShape D $FTr1:2 Box1; ## get modified result
60 set FS [AddFuse D $B2 $B1]
68 set Sel1 [AttachShape D Box2_1_1 ${B2} ${B2} 0]; ## set attachment
69 AddDriver D Attach Cyl
70 set Cyl [AddCyl D 30 315 ${Sel1}]
77 set CS [AddCut D $B2 $Cyl]
85 set Sel2 [AttachShape D S_3_6 ${B2} ${B2} 0]; ## set attachment for using in Fillet
87 set Fill [AddFillet D $B2 25 $Sel2 0]
94 set SL [TestSingleSelection D $B2 0]
95 set SL2 [TestMultipleSelection D $B2 0]
103 InitLogBook D; ## to be initialized before any recomputation of impacted functions set (if attachments are presented)
116 #11 recomputation of entities of the TestSelection commands