+# =================== OCAF ======================
+# Naming
+#
+# Testing purpose: Naming selection mechanism
+#
+# Test case: F7 (test special cases of type migration)
+# 1. Create 4 points: $Pnt1 - $Pnt4
+# 2. Create closed line $Lin2
+# 3. Create prism Pr ($Prism)
+# 4. Addbox $B1
+# 5. Translate box $B1 along XYZ
+# 6. $Com1 = Common ($Prism, $B1)
+# 7. Add cylinder $Cyl
+# 8. Translate cylinder $Cyl along XYZ
+# 9. Cut $Cut1 = Cut ($Prism, $Cyl)
+# 10. Make 4 selections (Select edges 8,9, 11+, 11)
+# 11. Modify $Pnt1
+# 12. Recompute
+# ===============================================
+
#pload FULL
-#source dftree.tcl
-#source DDataStd_TreeBrowser.tcl
erase
Close D
unset D
NewDocument D MDTV-Standard
isos 12
+
#1 - create 4 Pnts
NewCommand D
AddDriver D PntXYZ PntRLT Line3D Attach;
GetShape D $Pnt3:1:2 P3;
GetShape D $Pnt4:1:2 P4;
-#2 create open Lin1
-#NewCommand D
-#set Lin1 [ AddLine3D D 0 $Pnt1 $Pnt2 $Pnt3 $Pnt4]
-#ComputeFun D $Lin1:1;
-#GetShape D $Lin1:1:2 L1;
-
-#3 create closed Lin3
+#2 create closed Lin2
NewCommand D
set Lin2 [ AddLine3D D 1 $Pnt1 $Pnt2 $Pnt3 $Pnt4]
ComputeFun D $Lin2:1;
GetShape D $Lin2:1:2 L1;
-#4 Prism (after step #1)
+#3 Prism
NewCommand D
AddDriver D Prism Box PTxyz
set Prism [AddPrism D $Lin2 300 0]
GetShape D $Prism:1:2 Pr
GetReference D $Prism; ## check is reference set
-#5 Add Box
+#4 Add Box
NewCommand D
set B1 [AddBox D 400 140 600];
ComputeFun D $B1:1;
GetShape D $B1:1:2 Box;
-#6 Translate Box1
+#5 Translate Box1
NewCommand D
set FTr1 [PTranslateDXYZ D $B1 -100 -20 -100]
ComputeFun D $FTr1
GetShape D $B1:2:2 Box
-#7 add Common
+#6 add Common
NewCommand D
AddDriver D Comm Cut Fuse
set Com1 [AddCommon D $Prism $B1]
ComputeFun D $Com1
GetShape D $Com1:2 Pr
-#8 Add Cylinder
+#7 Add Cylinder
NewCommand D
explode Pr E
AddDriver D Attach Cyl
ComputeFun D $Cyl:1
GetShape D $Cyl:1:2 CylS
-#9 Translate Cylinder
+#8 Translate Cylinder
NewCommand D
set FTr1 [PTranslateDXYZ D $Cyl -100 200 170]
ComputeFun D $FTr1
GetShape D $Cyl:2:2 CylS
-#10 Cut
+#9 Cut
NewCommand D
set Cut1 [AddCut D $Prism $Cyl]
ComputeFun D $Cut1
GetShape D $Cut1:2 Pr
don Pr
-#11 test special cases of type migration
+#10 Select edges 8,9, 11 (test special cases of type migration)
explode Pr E
erase Pr_1 Pr_2 Pr_3 Pr_4 Pr_5 Pr_6 Pr_7 Pr_8 Pr_9 Pr_10 Pr_11 Pr_12 Pr_13 Pr_14 Pr_15 Pr_16 Pr_17
display Pr_8 Pr_9
-## 8,9
+## ==> 8,9
NewCommand D
set Sel8 [AttachShape D Pr_8 ${Prism} ${Prism} 0]; ## should return Compound of two edges
set Sel9 [AttachShape D Pr_9 ${Prism} ${Prism} 1]; ## should return Compound of two edges
set Sel11 [AttachShape D Pr_11 ${Prism} ${Prism} 1];
set Sel12 [AttachShape D Pr_11 ${Prism} ${Prism} 0];
-#12 modify
+
+#11 modify
PntOffset D $Pnt1 40 25 skip
-#13 recompute
+#12 recompute
ComputeFun D $Pnt1:1
ComputeFun D $Lin2:1
ComputeFun D $Prism:1