0031939: Coding - correction of spelling errors in comments [part 7]
[occt.git] / tests / caf / driver / A8
CommitLineData
40093367 1#Drivers' nick-names:
2#Box|Sph|Cyl|Cut|Fuse|Prism|SecRevol|FulRevol|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 Prism FulRevol SecRevol
13#1 - create box using more flexible set of commands
14NewCommand D
15isos 12
16set B2 [AddObject D]; ## add object
17set F2 [AddFunction D $B2 Box]; ## add function
7b5e532f 18BoxDX D $B2 190; ## set arguments of this function
40093367 19BoxDY D $B2 290
20BoxDZ D $B2 390
21InitLogBook D; ## initialize (clean) internal maps of labels
22ComputeFun D $F2; ## compute the function
23GetShape D $F2:2 Box2; ## check result
24fit
25whatis Box2
7b5e532f 26GetReference D $B2; ## refers to result NS
40093367 27
28#2 Revol Sectioned
29explode Box2 F
30explode Box2_3 E
31set SBas1 [AttachShape D Box2_3 ${B2} ${B2} 0]
32set SAx1 [AttachShape D Box2_3_2 ${B2} ${B2} 0]
33set SRev1 [AddRevol D $SBas1 $SAx1 120 0]
34ComputeFun D $SRev1:1
35GetShape D $SRev1:1:2 R1
36don R1
37
38
39#3
40explode R1 F
41explode R1_5 E
42set SBas2 [AttachShape D R1_5 ${SRev1} ${SRev1} 0]
43set SAx2 [AttachShape D R1_5_2 ${SRev1} ${SRev1} 0]
44set SRev2 [AddRevol D $SBas2 $SAx2 120 0]
45ComputeFun D $SRev2:1
46GetShape D $SRev2:1:2 R2
47
48#4
49explode R2 F
50explode R2_5 E
51set SBas3 [AttachShape D R2_5 ${SRev2} ${SRev2} 0]
52set SAx3 [AttachShape D R2_5_2 ${SRev2} ${SRev2} 0]
53set SRev3 [AddRevol D $SBas3 $SAx3 120 0]
54ComputeFun D $SRev3:1
55GetShape D $SRev3:1:2 R2
56
57#8
58AddDriver D Fuse
59set FS1 [AddFuse D $SRev1 $SRev2]
60ComputeFun D $FS1
61GetShape D $FS1:2 R1
62
63#9
64set FS2 [AddFuse D $SRev1 $SRev3]
65ComputeFun D $FS2
66GetShape D $FS2:2 R1
67
68#10
69NewCommand D
70set SL [TestSingleSelection D $B2 0]
71set SL2 [TestMultipleSelection D $B2 0]
72
73
74NewCommand D
75BoxDZ D $B2 420
76
77#8 order of recomputation
78NewCommand D
79InitLogBook D; ## to be initialized before any recomputation of impacted functions set (if attachments are presented)
80ComputeFun D $F2;
81ComputeFun D $SBas1:1
82ComputeFun D $SAx1:1
83ComputeFun D $SRev1:1
84ComputeFun D $SBas2:1
85ComputeFun D $SAx2:1
86ComputeFun D $SRev2:1
87ComputeFun D $SBas3:1
88ComputeFun D $SAx3:1
89ComputeFun D $SRev3:1
90ComputeFun D $FS1
91ComputeFun D $FS2
92GetShape D $FS2:2 R1
93
94SolveFlatFrom D $SL
95NewCommand D
96