1 # ============= OCAF ============================
4 # Testing purpose: Naming selection mechanism
6 # Test case: F2 (ShapeOrientation is not used)
8 # 1. Create Box $B1 (Box1)
9 # 2. Create sphere $Sph1
10 # 3. Create sphere $Sph2
11 # 4. Translate sphere $Sph2 along XYZ
12 # 5. Fuse spheres $FS1 = Fuse ($Sph1, $Sph2)
13 # 6. Make selection for all sub-shapes
15 # 8. Recompute modeling functions
16 # 9. Recompute selections
17 # ===============================================
23 NewDocument D MDTV-Standard
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
42 set Sph1 [AddSphere D $SPnt1 250]
44 GetShape D $Sph1:1:2 Sp1
48 set Sph2 [AddSphere D $SPnt1 30]
50 GetShape D $Sph2:1:2 Sp2
55 set FTr2 [PTranslateDXYZ D $Sph2 0 -253 0]
57 GetShape D $Sph2:2:2 Sp2
62 set FS1 [AddFuse D $Sph1 $Sph2]
68 set SL [TestSingleSelection D $Sph1 0]
69 ## Wires defined as UNION (seam edge of each sphere) fail ==> linked with degenerated edges problem
70 set SL2 [TestMultipleSelection D $Sph1 0]
78 InitLogBook D; ## to be initialized before any recomputation of impacted functions set (if attachments are presented)
90 #9 recomputation of entities of the TestSelection commands