0023788: OCCT tests don't catch Naming failures
[occt.git] / tests / caf / named_shape / E1
CommitLineData
3113d520 1puts "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 21erase
22Close D
24de79c3 23
40093367 24NewDocument D MDTV-Standard
25isos 12
26#1 - create box using more flexible set of commands
27NewCommand D
28set B2 [AddObject D]; ## add object
29set F2 [AddFunction D $B2 Box]; ## add function
30BoxDX D $B2 190; ## set argumets of this function
31BoxDY D $B2 290
32BoxDZ D $B2 390
33InitLogBook D; ## initialize (clean) internal maps of labels
34AddDriver D Box Attach Cyl
35ComputeFun D $F2; ## compute the function
36GetShape D $F2:2 Box2; ## check result
37whatis Box2
38GetReference D $B2; ## referes to result NS
39
40#2
41NewCommand D
42explode Box2 F
43explode Box2_1 E
44set Sel1 [AttachShape D Box2_1_1 ${B2} ${B2} 1]; ## set attachment
45AddDriver D Attach Cyl
46set Cyl [AddCyl D 30 315 ${Sel1}]
47ComputeFun D $Cyl:1
48
49#3 => cut
50NewCommand D
51AddDriver D Cut
52set CS [AddCut D $B2 $Cyl]
53ComputeFun D $CS
54GetShape D $CS:2 S
55
56#4 => Fillet
57NewCommand D
58explode S F
59explode S_1 E
60set Sel2 [AttachShape D S_1_1 ${B2} ${B2} 1]; ## set attachment for using in Fillet
61AddDriver D Fillet
62set Fill [AddFillet D $B2 25 $Sel2 0]
63ComputeFun D $Fill
64GetShape D $Fill:2 S
65
66
67#5 test selection
68NewCommand D
69set SL [TestSingleSelection D $B2 0]
70set SL2 [TestMultipleSelection D $B2 0]
71
72#6 modification
73NewCommand D
74BoxDX D $B2 290
75
efd4b232 76#7 recomputation modeling functions
40093367 77NewCommand D
78InitLogBook D; ## to be initialized before any recomputation of impacted functions set (if attachments are presented)
79ComputeFun D $F2;
80ComputeFun D $Sel1:1
81ComputeFun D $Cyl:1
82ComputeFun D $CS
83ComputeFun D $Sel2:1
84ComputeFun D $Fill
85GetShape D $Fill:2 S
86don S
87
efd4b232 88#8 Recompute selections
40093367 89SolveFlatFrom D $SL
90NewCommand D