0031939: Coding - correction of spelling errors in comments [part 7]
[occt.git] / tests / caf / named_shape / F4
CommitLineData
efd4b232 1# =================== OCAF ======================
2# Naming
3#
4# Testing purpose: Naming selection mechanism
5#
6# Test case: F4 (ShapeOrientation is not used)
7# 1. Create box $B2
8# 2. Create prism Pr1 ($Prism1)
9# 3. Create prism Pr2 ($Prism2)
10# 4. $FS1 = Fuse ($Prism1, $Prism2)
11# 5. Make selections for all sub-shapes
12# 6. Modify B2
13# 7. Recompute modeling functions
14# 8. Recompute selections
15# ===============================================
16
40093367 17erase
18Close D
24de79c3 19
e837410d 20NewDocument D BinOcaf
40093367 21
22#Drivers' nick-names:
23#Box|Sph|Cyl|Cut|Fuse|Prism|SecRevol|FulRevol|PTxyz|PTALine|PRLine|PMirr|Fillet|Attach|XAttach
24# order of functions recomputation should be defined out of the tool (by end user)
40093367 25AddDriver D Box Attach PTxyz PTALine PRLine PMirr Sph Prism FulRevol SecRevol
efd4b232 26
40093367 27#1 - create box using more flexible set of commands
28NewCommand D
29isos 12
30set B2 [AddObject D]; ## add object
31set F2 [AddFunction D $B2 Box]; ## add function
7b5e532f 32BoxDX D $B2 190; ## set arguments of this function
40093367 33BoxDY D $B2 290
34BoxDZ D $B2 390
35InitLogBook D; ## initialize (clean) internal maps of labels
36ComputeFun D $F2; ## compute the function
37GetShape D $F2:2 Box2; ## check result
38fit
39whatis Box2
7b5e532f 40GetReference D $B2; ## refers to result NS
40093367 41
42
43#2 Prism 1
44NewCommand D
45explode Box2 F
46set Bas1 [AttachShape D Box2_1 ${B2} ${B2} 0]
47set Prism1 [AddPrism D $Bas1 300 0]
48ComputeFun D $Prism1:1
49GetShape D $Prism1:1:2 Pr1
50
51PrismHeight D $Prism1 500
52ComputeFun D $Prism1:1
53GetShape D $Prism1:1:2 Pr1
54fit
55
56
57#3 Prism 2
58NewCommand D
59explode Pr1 F
60set Bas2 [AttachShape D Pr1_1 ${Prism1} ${Prism1} 0]
61set Prism2 [AddPrism D $Bas2 500 0]
62ComputeFun D $Prism2:1
63GetShape D $Prism2:1:2 Pr2
64
65#4 => fuse
66NewCommand D
67AddDriver D Fuse
68set FS1 [AddFuse D $Prism1 $Prism2]
69ComputeFun D $FS1
70GetShape D $FS1:2 Pr1
71
72
73
74#5
75NewCommand D
76set SL [TestSingleSelection D $Prism1 0]
77set SL2 [TestMultipleSelection D $Prism1 0]
78# both have failed units!!!
79
efd4b232 80#6
40093367 81NewCommand D
82BoxDZ D $B2 420
83
efd4b232 84#7 order of recomputation
40093367 85NewCommand D
86InitLogBook D; ## to be initialized before any recomputation of impacted functions set (if attachments are presented)
87ComputeFun D $F2;
88ComputeFun D $Bas1:1
89ComputeFun D $Prism1:1
90ComputeFun D $Bas2:1
91ComputeFun D $Prism2:1
92ComputeFun D $FS1
93
efd4b232 94
95#8
40093367 96SolveFlatFrom D $SL
97NewCommand D