0028095: Draw Harness, ViewerTest - use RGBA format instead of BGRA within vreadpixel
[occt.git] / tests / caf / named_shape / E1
1 # ============= OCAF ============================
2 # Naming
3 #
4 # Testing purpose: Naming selection mechanism 
5 #
6 # Test case: E1 (ShapeOrientation is not used)
7 #
8 # 1. Create Box B2
9 # 2. Create Cylinder Cyl
10 # 3. Cut (B2, Cyl)
11 # 4. Make Fillet
12 # 5. Make selection for all sub-shapes
13 # 6. Modify B2
14 # 7. Recompute modeling functions
15 # 8. Recompute selections
16 # ===============================================
17
18 erase 
19 Close D 
20
21 NewDocument D BinOcaf
22 isos 12
23 #1 - create box using more flexible set of commands
24 NewCommand D
25 set B2 [AddObject D];                   ## add object
26 set F2 [AddFunction D $B2 Box];         ## add function
27 BoxDX D $B2 190;                        ## set argumets of this function
28 BoxDY D $B2 290
29 BoxDZ D $B2 390
30 InitLogBook D;                          ## initialize (clean) internal maps of labels
31 AddDriver D Box Attach Cyl      
32 ComputeFun D $F2;                       ## compute the function
33 GetShape D $F2:2 Box2;                  ## check result
34 whatis Box2
35 GetReference D $B2;                     ## referes to result NS
36
37 #2 
38 NewCommand D
39 explode Box2 F
40 explode Box2_1 E
41 set Sel1 [AttachShape D Box2_1_1 ${B2} ${B2} 1]; ## set attachment
42 AddDriver D Attach Cyl
43 set Cyl [AddCyl D 30 315 ${Sel1}]
44 ComputeFun D $Cyl:1
45
46 #3 => cut
47 NewCommand D
48 AddDriver D Cut
49 set CS [AddCut D $B2 $Cyl]
50 ComputeFun D $CS
51 GetShape D $CS:2 S
52
53 #4 => Fillet
54 NewCommand D
55 explode S F
56 explode S_1 E
57 set Sel2 [AttachShape D S_1_1 ${B2} ${B2} 1]; ## set attachment for using in Fillet
58 AddDriver D Fillet
59 set Fill [AddFillet D $B2 25 $Sel2 0]
60 ComputeFun D $Fill
61 GetShape D $Fill:2 S
62
63
64 #5 test selection
65 NewCommand D
66 set SL [TestSingleSelection D $B2 0]
67 set SL2 [TestMultipleSelection D $B2 0]
68
69 #6 modification
70 NewCommand D
71 BoxDX D $B2 290
72
73 #7 recomputation modeling functions
74 NewCommand D
75 InitLogBook D;          ## to be initialized before any recomputation of impacted functions set (if attachments are presented)
76 ComputeFun D $F2;       
77 ComputeFun D $Sel1:1
78 ComputeFun D $Cyl:1
79 ComputeFun D $CS
80 ComputeFun D $Sel2:1
81 ComputeFun D $Fill
82 GetShape D $Fill:2 S
83 don S
84
85 #8 Recompute selections
86 SolveFlatFrom D $SL
87 NewCommand D