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 # ===============================================
24 #1 - create Box using short-cut
26 AddDriver D Box; ## add box driver to driver table
27 set B1 [AddBox D 130 140 150]; ## add box
28 ComputeFun D $B1:1; ## compute box1 function
29 GetShape D $B1:1:2 Box1; ## check result
32 GetReference D $B1; ## check is reference set
36 AddDriver D Cyl Sph Attach XAttach PTxyz PTALine PRLine PMirr Cut Fuse Prism FulRevol SecRevol Fillet
39 set SPnt1 [AttachShape D Box1_1 ${B1} ${B1} 0]; ## set attachment
40 set SPnt2 [AttachShape D Box1_2 ${B1} ${B1} 0]; ## set attachment
41 set SPnt3 [AttachShape D Box1_3 ${B1} ${B1} 0]; ## set attachment
42 set SPnt4 [AttachShape D Box1_4 ${B1} ${B1} 0]; ## set attachment
44 set Sph1 [AddSphere D $SPnt1 25]
46 GetShape D $Sph1:1:2 Sp1
48 set Sph2 [AddSphere D $SPnt2 25]
50 GetShape D $Sph2:1:2 Sp2
52 set Sph3 [AddSphere D $SPnt3 25]
54 GetShape D $Sph3:1:2 Sp3
56 set Sph4 [AddSphere D $SPnt4 25]
58 GetShape D $Sph4:1:2 Sp4
63 set Sel1 [AttachShape D Box1_1 ${B1} ${B1} 0];
64 set FR1 [PRotateRoundLine D $Sph1 $Sel1 120]
68 set Sel2 [AttachShape D Box1_1 ${B1} ${B1} 0];
69 set FR2 [PRotateRoundLine D $Sph2 $Sel2 120]
73 set Sel3 [AttachShape D Box1_3 ${B1} ${B1} 0];
74 set FR3 [PRotateRoundLine D $Sph3 $Sel3 120]
78 set Sel4 [AttachShape D Box1_3 ${B1} ${B1} 0];
79 set FR4 [PRotateRoundLine D $Sph4 $Sel4 120]
85 set FS1 [AddFuse D $B1 $Sph1]
87 GetShape D $FS1:2 Box1
89 set FS2 [AddFuse D $B1 $Sph2]
91 GetShape D $FS2:2 Box1
93 set FS3 [AddFuse D $B1 $Sph3]
95 GetShape D $FS3:2 Box1
97 set FS4 [AddFuse D $B1 $Sph4]
99 GetShape D $FS4:2 Box1
104 set SL [TestSingleSelection D $B1 0]
105 set SL2 [TestMultipleSelection D $B1 0]
114 InitLogBook D; ## to be initialized before any recomputation of impacted functions set (if attachments are presented)
116 ComputeFun D $SPnt1:1
117 ComputeFun D $SPnt2:1
118 ComputeFun D $SPnt3:1
119 ComputeFun D $SPnt4:1
137 GetShape D $FS4:2 Box1
140 #8 recomputation of entities of the TestSelection commands