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