40093367 |
1 | #pload FULL |
2 | #source dftree.tcl |
3 | #source DDataStd_TreeBrowser.tcl |
4 | erase |
5 | Close D |
6 | unset D |
7 | NewDocument D MDTV-Standard |
8 | isos 12 |
9 | #1 - create 4 Pnts |
10 | NewCommand D |
11 | AddDriver D PntXYZ PntRLT Line3D Attach; |
12 | set Pnt1 [AddPoint D 0 0 0]; ## add point1 |
13 | ComputeFun D $Pnt1:1; ## compute function |
14 | GetShape D $Pnt1:1:2 P1; ## check result |
15 | whatis P1 |
16 | # referes to result NS |
17 | GetReference D $Pnt1; ## check is reference set |
18 | |
19 | set Pnt2 [AddPoint D 0 200 0]; |
20 | ComputeFun D $Pnt2:1; |
21 | set Pnt3 [AddPoint D 200 200 0]; |
22 | ComputeFun D $Pnt3:1; |
23 | set Pnt4 [AddPoint D 200 0 0]; |
24 | ComputeFun D $Pnt4:1; |
25 | GetShape D $Pnt2:1:2 P2; |
26 | GetShape D $Pnt3:1:2 P3; |
27 | GetShape D $Pnt4:1:2 P4; |
28 | |
29 | #2 create open Lin1 |
30 | #NewCommand D |
31 | #set Lin1 [ AddLine3D D 0 $Pnt1 $Pnt2 $Pnt3 $Pnt4] |
32 | #ComputeFun D $Lin1:1; |
33 | #GetShape D $Lin1:1:2 L1; |
34 | |
35 | #3 create closed Lin3 |
36 | NewCommand D |
37 | set Lin2 [ AddLine3D D 1 $Pnt1 $Pnt2 $Pnt3 $Pnt4] |
38 | ComputeFun D $Lin2:1; |
39 | GetShape D $Lin2:1:2 L1; |
40 | |
41 | #4 Prism (after step #1) |
42 | NewCommand D |
43 | AddDriver D Prism Box PTxyz |
44 | set Prism [AddPrism D $Lin2 300 0] |
45 | ComputeFun D $Prism:1 |
46 | GetShape D $Prism:1:2 Pr |
47 | GetReference D $Prism; ## check is reference set |
48 | |
49 | #5 Add Box |
50 | NewCommand D |
51 | set B1 [AddBox D 400 140 600]; |
52 | ComputeFun D $B1:1; |
53 | GetShape D $B1:1:2 Box; |
54 | |
55 | #6 Translate Box1 |
56 | NewCommand D |
57 | set FTr1 [PTranslateDXYZ D $B1 -100 -20 -100] |
58 | ComputeFun D $FTr1 |
59 | GetShape D $B1:2:2 Box |
60 | |
61 | #7 add Common |
62 | NewCommand D |
63 | AddDriver D Comm Cut Fuse |
64 | set Com1 [AddCommon D $Prism $B1] |
65 | ComputeFun D $Com1 |
66 | GetShape D $Com1:2 Pr |
67 | |
68 | #8 add Cylinder |
69 | NewCommand D |
70 | explode Pr E |
71 | AddDriver D Attach Cyl |
72 | set Sel1 [AttachShape D Pr_5 ${Prism} ${Prism} 0]; ## set attachment |
73 | set Cyl [AddCyl D 70 515 ${Sel1}] |
74 | ComputeFun D $Cyl:1 |
75 | GetShape D $Cyl:1:2 CylS |
76 | |
77 | #9 Translate Cylinder |
78 | NewCommand D |
79 | set FTr1 [PTranslateDXYZ D $Cyl -100 200 170] |
80 | ComputeFun D $FTr1 |
81 | GetShape D $Cyl:2:2 CylS |
82 | |
83 | #10 Cut Prism by Cylinder |
84 | set Cut1 [AddCut D $Prism $Cyl] |
85 | ComputeFun D $Cut1 |
86 | GetShape D $Cut1:2 Pr |
87 | don Pr |
88 | |
89 | #11 test selection |
90 | NewCommand D |
91 | set SL [TestSingleSelection D $Prism 0] |
92 | set SL2 [TestMultipleSelection D $Prism 0] |
93 | |
94 | |
95 | |
96 | #12 modify |
97 | NewCommand D |
1ec8a59e |
98 | PntOffset D $Pnt1 20 25 skip |
40093367 |
99 | |
100 | #13 recompute |
101 | NewCommand D |
102 | ComputeFun D $Pnt1:1 |
103 | ComputeFun D $Lin2:1 |
104 | ComputeFun D $Prism:1 |
105 | ComputeFun D $Com1 |
106 | ComputeFun D $Sel1:1 |
107 | ComputeFun D $Cyl:1 |
108 | ComputeFun D $FTr1 |
109 | ComputeFun D $Cut1 |
110 | erase |
111 | GetShape D $Cut1:2 Pr |
112 | |
113 | |
114 | #recomputation of entities of the TestSelection commands |
115 | SolveFlatFrom D $SL |
116 | NewCommand D |
117 | |