3 AddDriver D PntXYZ PntRLT Line3D Attach;
4 set Pnt1 [AddPoint D 0 0 0]; ## add point1
5 ComputeFun D $Pnt1:1; ## compute function
6 GetShape D $Pnt1:1:2 P1; ## check result
9 GetReference D $Pnt1; ## check is reference set
11 set Pnt2 [AddPoint D 0 200 0];
13 set Pnt3 [AddPoint D 200 200 0];
15 set Pnt4 [AddPoint D 200 0 0];
17 GetShape D $Pnt2:1:2 P2;
18 GetShape D $Pnt3:1:2 P3;
19 GetShape D $Pnt4:1:2 P4;
23 #set Lin1 [ AddLine3D D 0 $Pnt1 $Pnt2 $Pnt3 $Pnt4]
24 #ComputeFun D $Lin1:1;
25 #GetShape D $Lin1:1:2 L1;
29 set Lin2 [ AddLine3D D 1 $Pnt1 $Pnt2 $Pnt3 $Pnt4]
31 GetShape D $Lin2:1:2 L1;
33 #4 Prism (after step #1)
35 AddDriver D Prism Box PTxyz
36 set Prism [AddPrism D $Lin2 300 1]
38 GetShape D $Prism:1:2 Pr
39 GetReference D $Prism; ## check is reference set
43 set B1 [AddBox D 400 140 600];
45 GetShape D $B1:1:2 Box;
49 set FTr1 [PTranslateDXYZ D $B1 -100 -20 -100]
51 GetShape D $B1:2:2 Box
55 AddDriver D Comm Cut Fuse
56 set Com1 [AddCommon D $Prism $B1]
63 AddDriver D Attach Cyl
64 set Sel1 [AttachShape D Pr_6 ${Prism} ${Prism} 0]; ## set attachment
65 set Cyl [AddCyl D 70 515 ${Sel1}]
67 GetShape D $Cyl:1:2 CylS
71 set FTr1 [PTranslateDXYZ D $Cyl -100 200 170]
73 GetShape D $Cyl:2:2 CylS
77 set Cut1 [AddCut D $Prism $Cyl]
82 #11 test special cases of type migration
84 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
88 set Sel8 [AttachShape D Pr_8 ${Prism} ${Prism} 0]; ## should return Compound of two edges
89 set Sel9 [AttachShape D Pr_9 ${Prism} ${Prism} 1]; ## should return Compound of two edges
90 set Sel11 [AttachShape D Pr_11 ${Prism} ${Prism} 1];
91 set Sel12 [AttachShape D Pr_11 ${Prism} ${Prism} 0];
93 PntOffset D $Pnt1 40 25 skip
105 GetShape D $Cut1:2 Pr
109 ComputeFun D $Sel11:1
110 ComputeFun D $Sel12:1