0023087: Upgrade of the OCCT test system
[occt.git] / tests / caf / driver / A6
1 #1 - create Box using short-cut
2 NewCommand D
3 AddDriver D Box;                        ## add box driver to driver table
4 set B1 [AddBox D 130 140 150];          ## add box 
5 ComputeFun D $B1:1;                     ## compute box1 function
6 GetShape D $B1:1:2 Box1;                ## check result
7 whatis Box1
8 # referes to result NS
9 GetReference D $B1;                     ## check is reference set 
10
11 #2 - create box using more flexible set of commands
12 NewCommand D
13 set B2 [AddObject D];                   ## add object
14 set F2 [AddFunction D $B2 Box];         ## add function
15 BoxDX D $B2 190;                        ## set argumets of this function
16 BoxDY D $B2 290
17 BoxDZ D $B2 390
18 InitLogBook D;                          ## initialize (clean) internal maps of labels
19 AddDriver D Box Attach Cyl      
20 ComputeFun D $F2;                       ## compute the function
21 GetShape D $F2:2 Box2;                  ## check result
22 whatis Box2
23 GetReference D $B2;                     ## referes to result NS
24
25 #3
26 NewCommand D
27 AddDriver D PTxyz PTALine PRLine
28 set FTr1 [PTranslateDXYZ D $B1 110 130 270]
29 ComputeFun D $FTr1;                     ## translation function recomputation
30 GetShape D $FTr1:2 Box1;                ## get modified result
31
32 #4 => fuse
33 AddDriver D Fuse
34 set FS [AddFuse D $B2 $B1]
35 ComputeFun D $FS
36 GetShape D $FS:2 Box2
37
38 #5 
39 NewCommand D
40 explode Box2 F
41 explode Box2_1 E
42 set Sel1 [AttachShape D Box2_1_1 ${B2} ${B2} 0]; ## set attachment
43 AddDriver D Attach Cyl
44 set Cyl [AddCyl D 30 315 ${Sel1}]
45 ComputeFun D $Cyl:1
46 GetShape D $Cyl:1:2 S
47
48 #6 => cut
49 NewCommand D
50 AddDriver D Cut
51 set CS [AddCut D $B2 $Cyl]
52 ComputeFun D $CS
53 GetShape D $CS:2 S
54
55 #7 => Fillet
56 NewCommand D
57 explode S F
58 explode S_3 E
59 set Sel2 [AttachShape D S_3_6 ${B2} ${B2} 0]; ## set attachment for using in Fillet
60 AddDriver D Fillet
61 set Fill [AddFillet D $B2 25 $Sel2 0]
62 ComputeFun D $Fill
63 GetShape D $Fill:2 S
64
65
66 #8 test selection
67 NewCommand D
68 set SL [TestSingleSelection D $B2 0]
69 set SL2 [TestMultipleSelection D $B2 0]
70
71 #9 modification
72 NewCommand D
73 BoxDX D $B2 210
74
75 #10 recomputation
76 NewCommand D
77 InitLogBook D;          ## to be initialized before any recomputation of impacted functions set (if attachments are presented)
78 ComputeFun D $F2;
79 ComputeFun D $B1:1
80 ComputeFun D $FTr1
81 ComputeFun D $FS        
82 ComputeFun D $Sel1:1
83 ComputeFun D $Cyl:1
84 ComputeFun D $CS
85 ComputeFun D $Sel2:1
86 ComputeFun D $Fill
87 GetShape D $Fill:2 S
88 don S
89
90 #recomputation of entities of the TestSelection commands
91 SolveFlatFrom D $SL
92 NewCommand D
93