2 #Box|Sph|Cyl|Cut|Fuse|Prism|Revol|PTxyz|PTALine|PRLine|PMirr|Fillet|Attach|XAttach
3 # order of functions recomputation should be defined out of the tool (by end user)
5 #Commands of transformation:
6 #PTranslateDXYZ Doc ShapeEntry dx dy dz
7 #PTranslateAlongLine Doc ShapeEntry Line off
8 #PRotateRoundLine Doc ShapeEntry Line Angle
9 #PMirror Doc ShapeEntry PlaneObj
11 ## Test of transformation functions
12 AddDriver D Box Attach PTxyz PTALine PRLine PMirr Sph
13 #1 - create box using more flexible set of commands
15 set B2 [AddObject D]; ## add object
16 set F2 [AddFunction D $B2 Box]; ## add function
17 BoxDX D $B2 190; ## set argumets of this function
20 InitLogBook D; ## initialize (clean) internal maps of labels
21 ComputeFun D $F2; ## compute the function
22 GetShape D $F2:2 Box2; ## check result
24 GetReference D $B2; ## referes to result NS
29 set FTr1 [PTranslateDXYZ D $B2 150 40 90]
30 ComputeFun D $FTr1; ## function recomputation
31 GetShape D $FTr1:2 Box2; ## get modified result
37 set Sel1 [AttachShape D Box2_1_1 ${B2} ${B2} 1]; ## set attachment
38 set FTr2 [PTranslateAlongLine D $B2 $Sel1 210]
40 GetShape D $FTr2:2 Box3
46 set Sel4 [AttachShape D Box3_1_3 ${B2} ${B2} 1];
47 set FR1 [PRotateRoundLine D $B2 $Sel4 120]
49 GetShape D $FR1:2 Box4
54 set Sel5 [AttachShape D Box4_3 ${B2} ${B2} 1];
55 set FM [PMirror D $B2 $Sel5]
63 set Sel6 [AttachShape D Box5_1_3 ${B2} ${B2} 1];
65 set Fill [AddFillet D $B2 25 $Sel6 0]
71 set SL [TestSingleSelection D $B2 1]
72 set SL2 [TestMultipleSelection D $B2 0]
78 #8 order of recomputation
80 InitLogBook D; ## to be initialized before any recomputation of impacted functions set (if attachments are presented)
91 GetShape D $Fill:2 SF-new