1 # ============= OCAF ============================
4 # Testing purpose: Naming selection mechanism
6 # Test case: E9 (ShapeOrientation is not used)
9 # 2. Create 4 spheres ($Sph1 - $Sph4)
10 # 3. Rotate all spheres around line
11 # 4. Fuse all spheres with box B1
12 # 5. Make selection for all sub-shapes
14 # 7. Recompute modeling functions
15 # 8. Recompute selections
16 # ===============================================
25 #1 - create Box using short-cut
27 AddDriver D Box; ## add box driver to driver table
28 set B1 [AddBox D 130 140 150]; ## add box
29 ComputeFun D $B1:1; ## compute box1 function
30 GetShape D $B1:1:2 Box1; ## check result
32 # referes to result NS
33 GetReference D $B1; ## check is reference set
37 AddDriver D Cyl Sph Attach XAttach PTxyz PTALine PRLine PMirr Cut Fuse Prism FulRevol SecRevol Fillet
40 set SPnt1 [AttachShape D Box1_1 ${B1} ${B1} 0]; ## set attachment
41 set SPnt2 [AttachShape D Box1_2 ${B1} ${B1} 0]; ## set attachment
42 set SPnt3 [AttachShape D Box1_3 ${B1} ${B1} 0]; ## set attachment
43 set SPnt4 [AttachShape D Box1_4 ${B1} ${B1} 0]; ## set attachment
45 set Sph1 [AddSphere D $SPnt1 25]
47 GetShape D $Sph1:1:2 Sp1
49 set Sph2 [AddSphere D $SPnt2 25]
51 GetShape D $Sph2:1:2 Sp2
53 set Sph3 [AddSphere D $SPnt3 25]
55 GetShape D $Sph3:1:2 Sp3
57 set Sph4 [AddSphere D $SPnt4 25]
59 GetShape D $Sph4:1:2 Sp4
64 set Sel1 [AttachShape D Box1_1 ${B1} ${B1} 0];
65 set FR1 [PRotateRoundLine D $Sph1 $Sel1 120]
69 set Sel2 [AttachShape D Box1_1 ${B1} ${B1} 0];
70 set FR2 [PRotateRoundLine D $Sph2 $Sel2 120]
74 set Sel3 [AttachShape D Box1_3 ${B1} ${B1} 0];
75 set FR3 [PRotateRoundLine D $Sph3 $Sel3 120]
79 set Sel4 [AttachShape D Box1_3 ${B1} ${B1} 0];
80 set FR4 [PRotateRoundLine D $Sph4 $Sel4 120]
86 set FS1 [AddFuse D $B1 $Sph1]
88 GetShape D $FS1:2 Box1
90 set FS2 [AddFuse D $B1 $Sph2]
92 GetShape D $FS2:2 Box1
94 set FS3 [AddFuse D $B1 $Sph3]
96 GetShape D $FS3:2 Box1
98 set FS4 [AddFuse D $B1 $Sph4]
100 GetShape D $FS4:2 Box1
105 set SL [TestSingleSelection D $B1 0]
106 set SL2 [TestMultipleSelection D $B1 0]
115 InitLogBook D; ## to be initialized before any recomputation of impacted functions set (if attachments are presented)
117 ComputeFun D $SPnt1:1
118 ComputeFun D $SPnt2:1
119 ComputeFun D $SPnt3:1
120 ComputeFun D $SPnt4:1
138 GetShape D $FS4:2 Box1
141 #8 recomputation of entities of the TestSelection commands