0031939: Coding - correction of spelling errors in comments [part 7]
[occt.git] / tests / caf / driver / B4
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 AddDriver D Box Attach PTxyz PTALine PRLine PMirr Sph Prism FulRevol SecRevol
6 #1 - create box using more flexible set of commands
7 NewCommand D
8 isos 12
9 set B2 [AddObject D];                   ## add object
10 set F2 [AddFunction D $B2 Box];         ## add function
11 BoxDX D $B2 190;                        ## set arguments of this function
12 BoxDY D $B2 290
13 BoxDZ D $B2 390
14 InitLogBook D;                          ## initialize (clean) internal maps of labels
15 ComputeFun D $F2;                       ## compute the function
16 GetShape D $F2:2 Box2;                  ## check result
17 fit
18 whatis Box2
19 GetReference D $B2;                     ## refers to result NS
20
21
22 #2 Prism 1
23 NewCommand D
24 explode Box2 F
25 set Bas1 [AttachShape D Box2_1 ${B2} ${B2} 0]
26 set Prism1 [AddPrism D $Bas1 300 0]
27 ComputeFun D $Prism1:1
28 GetShape D $Prism1:1:2 Pr1
29
30 PrismHeight D $Prism1 500
31 ComputeFun D $Prism1:1
32 GetShape D $Prism1:1:2 Pr1
33 fit
34
35
36 #3 Prism 2
37 NewCommand D
38 explode Pr1 F
39 set Bas2 [AttachShape D Pr1_1 ${Prism1} ${Prism1} 0]
40 set Prism2 [AddPrism D $Bas2 500 0]
41 ComputeFun D $Prism2:1
42 GetShape D $Prism2:1:2 Pr2
43
44 #4 => fuse
45 NewCommand D
46 AddDriver D Fuse
47 set FS1 [AddFuse D $Prism1 $Prism2]
48 ComputeFun D $FS1
49 GetShape D $FS1:2 Pr1
50
51
52
53 #5
54 NewCommand D 
55 set SL [TestSingleSelection D $Prism1 0]
56 set SL2 [TestMultipleSelection D $Prism1 0]
57 # both have failed units!!!
58
59 NewCommand D
60 BoxDZ D $B2 420
61
62 #6 order of recomputation
63 NewCommand D
64 InitLogBook D;          ## to be initialized before any recomputation of impacted functions set (if attachments are presented)
65 ComputeFun D $F2;       
66 ComputeFun D $Bas1:1
67 ComputeFun D $Prism1:1
68 ComputeFun D $Bas2:1
69 ComputeFun D $Prism2:1
70 ComputeFun D $FS1
71
72 SolveFlatFrom D $SL
73 NewCommand D