87dde286211fc3896043694f5255d55044a618de
[occt.git] / tests / caf / driver / B2
1 puts "TODO ?CR23788 ALL: Failed units"
2 #1 - create Box using short-cut
3 NewCommand D
4 AddDriver D Box;                        ## add box driver to driver table
5 set B1 [AddBox D 130 140 150];          ## add box 
6 ComputeFun D $B1:1;                     ## compute box1 function
7 GetShape D $B1:1:2 Box1;                ## check result
8 whatis Box1
9 # referes to result NS
10 GetReference D $B1;                     ## check is reference set 
11
12
13 #2 - create 8 spheres
14 AddDriver D Cyl Sph Attach XAttach PTxyz PTALine PRLine PMirr Cut Fuse Prism FulRevol SecRevol Fillet
15 NewCommand D
16 explode Box1 V
17 set SPnt1 [AttachShape D Box1_1 ${B1} ${B1} 0]; ## set attachment
18
19 set Sph1 [AddSphere D $SPnt1 250]
20 ComputeFun D $Sph1:1
21 GetShape D $Sph1:1:2 Sp1
22
23 #3
24 NewCommand D
25 set Sph2 [AddSphere D $SPnt1 30]
26 ComputeFun D $Sph2:1
27 GetShape D $Sph2:1:2 Sp2
28 erase Box1
29
30 #4
31 NewCommand D
32 set FTr2 [PTranslateDXYZ D $Sph2 0 -253 0]
33 ComputeFun D $FTr2
34 GetShape D $Sph2:2:2 Sp2
35
36
37 #5 Fuse spheres
38 NewCommand D
39 set FS1 [AddFuse D $Sph1 $Sph2]
40 ComputeFun D $FS1
41 GetShape D $FS1:2 Sp1
42
43 #6 test selection
44 NewCommand D
45 set SL [TestSingleSelection D $Sph1 0]
46 ## Wires defined as UNION  (seam edge of each sphere) fail ==> linked with degenerated edges problem
47 set SL2 [TestMultipleSelection D $Sph1 0]
48
49 #7 modification
50 NewCommand D
51 BoxDZ D $B1 270
52
53 #8 recomputation
54 NewCommand D
55 InitLogBook D;          ## to be initialized before any recomputation of impacted functions set (if attachments are presented)
56 ComputeFun D $B1:1
57 ComputeFun D $SPnt1:1
58 ComputeFun D $Sph1:1
59 ComputeFun D $Sph2:1
60
61 ComputeFun D $FTr2
62 ComputeFun D $FS1
63 erase
64 GetShape D $FS1:2 Sp1
65
66
67 #recomputation of entities of the TestSelection commands
68 SolveFlatFrom D $SL
69 NewCommand D
70