0023788: OCCT tests don't catch Naming failures
[occt.git] / tests / caf / named_shape / E4
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: E4 (ShapeOrientation is not used)
9# 1. Create box B2
10# 2. Create cylinder Cyl
11# 3. Translate Cyl along XYZ
12# 4. CS = Cut (B2, Cyl)
13# 5. Make selection for all sub-shapes
14# 6. Modify B2
15# 7. Recompute modeling functions
16# 8. Recompute selections
17# ===============================================
40093367 18#pload FULL
efd4b232 19
40093367 20erase
21Close D
24de79c3 22
40093367 23NewDocument D MDTV-Standard
efd4b232 24
40093367 25AddDriver D Box Cyl Sph Attach XAttach PTxyz PTALine PRLine PMirr Cut Fuse Prism FulRevol SecRevol Fillet
26
27#1 Create Box
28NewCommand D
29set B2 [AddObject D]; ## add object
30set F2 [AddFunction D $B2 Box]; ## add function
31BoxDX D $B2 190; ## set argumets of this function
32BoxDY D $B2 290
33BoxDZ D $B2 390
34InitLogBook D; ## initialize (clean) internal maps of labels
35ComputeFun D $F2; ## compute the function
36GetShape D $F2:2 Box2; ## check result
37whatis Box2
38GetReference D $B2
39
40#2 Create Cylinder
41NewCommand D
42explode Box2 F
43explode Box2_1 E
44set Sel1 [AttachShape D Box2_1_1 ${B2} ${B2} 1]; ## set attachment
45## AddDriver D Attach Cyl
46set Cyl [AddCyl D 70 515 ${Sel1}]
47ComputeFun D $Cyl:1
48GetShape D $Cyl:1:2 CylS
49
50#3 Translate Cylinder
51NewCommand D
52set FTr1 [PTranslateDXYZ D $Cyl 100 0 0]
53ComputeFun D $FTr1
54GetShape D $Cyl:2:2 CylS
55
56#4 Cut Box Cyl
57NewCommand D
58set CS [AddCut D $B2 $Cyl]
59ComputeFun D $CS
60erase
61GetShape D $CS:2 S
62don S
63NewCommand D
64
65#5 test Naming
66set SL [TestSingleSelection D $B2 0]
67set SL2 [TestMultipleSelection D $B2 0]
68
69#6 Modification
70NewCommand D
71BoxDX D $B2 250
72
73#7 recompute
74NewCommand D
75InitLogBook D
76ComputeFun D $F2
77ComputeFun D $Sel1:1
78ComputeFun D $Cyl:1
79ComputeFun D $FTr1
80ComputeFun D $CS
81erase
82GetShape D $CS:2 S
83don S
efd4b232 84
85#8 Recompute selections
40093367 86SolveFlatFrom D $SL
87NewCommand D
88