0031939: Coding - correction of spelling errors in comments [part 7]
[occt.git] / tests / caf / driver / A2
CommitLineData
40093367 1#Drivers' nick-names:
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)
4
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
10
11## Test of transformation functions
12AddDriver D Box Attach PTxyz PTALine PRLine PMirr Sph
13#1 - create box using more flexible set of commands
14NewCommand D
15set B2 [AddObject D]; ## add object
16set F2 [AddFunction D $B2 Box]; ## add function
7b5e532f 17BoxDX D $B2 190; ## set arguments of this function
40093367 18BoxDY D $B2 290
19BoxDZ D $B2 390
20InitLogBook D; ## initialize (clean) internal maps of labels
21ComputeFun D $F2; ## compute the function
22GetShape D $F2:2 Box2; ## check result
23whatis Box2
7b5e532f 24GetReference D $B2; ## refers to result NS
40093367 25
26
27#2
28NewCommand D
29set FTr1 [PTranslateDXYZ D $B2 150 40 90]
30ComputeFun D $FTr1; ## function recomputation
31GetShape D $FTr1:2 Box2; ## get modified result
32
33#3
34NewCommand D
35explode Box2 F
36explode Box2_1 E
37set Sel1 [AttachShape D Box2_1_1 ${B2} ${B2} 1]; ## set attachment
38set FTr2 [PTranslateAlongLine D $B2 $Sel1 210]
39ComputeFun D $FTr2
40GetShape D $FTr2:2 Box3
41
42#4
43NewCommand D
44explode Box3 F
45explode Box3_1 E
46set Sel4 [AttachShape D Box3_1_3 ${B2} ${B2} 1];
47set FR1 [PRotateRoundLine D $B2 $Sel4 120]
48ComputeFun D $FR1
49GetShape D $FR1:2 Box4
50
51#5
52NewCommand D
53explode Box4 F
54set Sel5 [AttachShape D Box4_3 ${B2} ${B2} 1];
55set FM [PMirror D $B2 $Sel5]
56ComputeFun D $FM
57GetShape D $FM:2 Box5
58
59#6
60NewCommand D
61explode Box5 F
62explode Box5_1 E
63set Sel6 [AttachShape D Box5_1_3 ${B2} ${B2} 1];
64AddDriver D Fillet
65set Fill [AddFillet D $B2 25 $Sel6 0]
66ComputeFun D $Fill
67GetShape D $Fill:2 SF
68
69#7
70NewCommand D
71set SL [TestSingleSelection D $B2 1]
72set SL2 [TestMultipleSelection D $B2 0]
73
74#7 modification
75NewCommand D
76BoxDX D $B2 290
77
78#8 order of recomputation
79NewCommand D
80InitLogBook D; ## to be initialized before any recomputation of impacted functions set (if attachments are presented)
81ComputeFun D $F2;
82ComputeFun D $FTr1;
83ComputeFun D $Sel1:1
84ComputeFun D $FTr2
85ComputeFun D $Sel4:1
86ComputeFun D $FR1
87ComputeFun D $Sel5:1
88ComputeFun D $FM
89ComputeFun D $Sel6:1
90ComputeFun D $Fill
91GetShape D $Fill:2 SF-new
92
93SolveFlatFrom D $SL
94
95NewCommand D