1 # =================== OCAF ======================
4 # Testing purpose: Naming selection mechanism
6 # Test case: F6 (ShapeOrientation is not used)
7 # 1. Create 4 points: $Pnt1 - $Pnt4
8 # 2. Create closed line $Lin2
9 # 3. Create prism Pr ($Prism)
11 # 5. Translate box $B1 along XYZ
12 # 6. $Com1 = Common ($Prism, $B1)
13 # 7. Add cylinder $Cyl
14 # 8. Translate cylinder $Cyl along XYZ
15 # 9. Cut $Cut1 = Cut ($Prism, $Cyl)
16 # 10. Make selections for all sub-shapes
18 # 12. Recompute modeling functions
19 # 13. Recompute selections
20 # ===============================================
26 NewDocument D MDTV-Standard
31 AddDriver D PntXYZ PntRLT Line3D Attach;
32 set Pnt1 [AddPoint D 0 0 0]; ## add point1
33 ComputeFun D $Pnt1:1; ## compute function
34 GetShape D $Pnt1:1:2 P1; ## check result
36 # referes to result NS
37 GetReference D $Pnt1; ## check is reference set
39 set Pnt2 [AddPoint D 0 200 0];
41 set Pnt3 [AddPoint D 200 200 0];
43 set Pnt4 [AddPoint D 200 0 0];
45 GetShape D $Pnt2:1:2 P2;
46 GetShape D $Pnt3:1:2 P3;
47 GetShape D $Pnt4:1:2 P4;
52 set Lin2 [ AddLine3D D 1 $Pnt1 $Pnt2 $Pnt3 $Pnt4]
54 GetShape D $Lin2:1:2 L1;
58 AddDriver D Prism Box PTxyz
59 set Prism [AddPrism D $Lin2 300 0]
61 GetShape D $Prism:1:2 Pr
62 GetReference D $Prism; ## check is reference set
66 set B1 [AddBox D 400 140 600];
68 GetShape D $B1:1:2 Box;
72 set FTr1 [PTranslateDXYZ D $B1 -100 -20 -100]
74 GetShape D $B1:2:2 Box
78 AddDriver D Comm Cut Fuse
79 set Com1 [AddCommon D $Prism $B1]
86 AddDriver D Attach Cyl
87 set Sel1 [AttachShape D Pr_5 ${Prism} ${Prism} 0]; ## set attachment
88 set Cyl [AddCyl D 70 515 ${Sel1}]
90 GetShape D $Cyl:1:2 CylS
94 set FTr1 [PTranslateDXYZ D $Cyl -100 200 170]
96 GetShape D $Cyl:2:2 CylS
98 #9 Cut Prism by Cylinder
99 set Cut1 [AddCut D $Prism $Cyl]
101 GetShape D $Cut1:2 Pr
106 set SL [TestSingleSelection D $Prism 0]
107 set SL2 [TestMultipleSelection D $Prism 0]
113 PntOffset D $Pnt1 20 25 skip
119 ComputeFun D $Prism:1
126 GetShape D $Cut1:2 Pr
129 #13 recomputation of entities of the TestSelection commands