0023205: Patch for Naming improvement
[occt.git] / tests / caf / named_shape / F6
CommitLineData
40093367 1#pload FULL
2#source dftree.tcl
3#source DDataStd_TreeBrowser.tcl
4erase
5Close D
6unset D
7NewDocument D MDTV-Standard
8isos 12
9#1 - create 4 Pnts
10NewCommand D
11AddDriver D PntXYZ PntRLT Line3D Attach;
12set Pnt1 [AddPoint D 0 0 0]; ## add point1
13ComputeFun D $Pnt1:1; ## compute function
14GetShape D $Pnt1:1:2 P1; ## check result
15whatis P1
16# referes to result NS
17GetReference D $Pnt1; ## check is reference set
18
19set Pnt2 [AddPoint D 0 200 0];
20ComputeFun D $Pnt2:1;
21set Pnt3 [AddPoint D 200 200 0];
22ComputeFun D $Pnt3:1;
23set Pnt4 [AddPoint D 200 0 0];
24ComputeFun D $Pnt4:1;
25GetShape D $Pnt2:1:2 P2;
26GetShape D $Pnt3:1:2 P3;
27GetShape D $Pnt4:1:2 P4;
28
29#2 create open Lin1
30#NewCommand D
31#set Lin1 [ AddLine3D D 0 $Pnt1 $Pnt2 $Pnt3 $Pnt4]
32#ComputeFun D $Lin1:1;
33#GetShape D $Lin1:1:2 L1;
34
35#3 create closed Lin3
36NewCommand D
37set Lin2 [ AddLine3D D 1 $Pnt1 $Pnt2 $Pnt3 $Pnt4]
38ComputeFun D $Lin2:1;
39GetShape D $Lin2:1:2 L1;
40
41#4 Prism (after step #1)
42NewCommand D
43AddDriver D Prism Box PTxyz
44set Prism [AddPrism D $Lin2 300 0]
45ComputeFun D $Prism:1
46GetShape D $Prism:1:2 Pr
47GetReference D $Prism; ## check is reference set
48
49#5 Add Box
50NewCommand D
51set B1 [AddBox D 400 140 600];
52ComputeFun D $B1:1;
53GetShape D $B1:1:2 Box;
54
55#6 Translate Box1
56NewCommand D
57set FTr1 [PTranslateDXYZ D $B1 -100 -20 -100]
58ComputeFun D $FTr1
59GetShape D $B1:2:2 Box
60
61#7 add Common
62NewCommand D
63AddDriver D Comm Cut Fuse
64set Com1 [AddCommon D $Prism $B1]
65ComputeFun D $Com1
66GetShape D $Com1:2 Pr
67
68#8 add Cylinder
69NewCommand D
70explode Pr E
71AddDriver D Attach Cyl
72set Sel1 [AttachShape D Pr_5 ${Prism} ${Prism} 0]; ## set attachment
73set Cyl [AddCyl D 70 515 ${Sel1}]
74ComputeFun D $Cyl:1
75GetShape D $Cyl:1:2 CylS
76
77#9 Translate Cylinder
78NewCommand D
79set FTr1 [PTranslateDXYZ D $Cyl -100 200 170]
80ComputeFun D $FTr1
81GetShape D $Cyl:2:2 CylS
82
83#10 Cut Prism by Cylinder
84set Cut1 [AddCut D $Prism $Cyl]
85ComputeFun D $Cut1
86GetShape D $Cut1:2 Pr
87don Pr
88
89#11 test selection
90NewCommand D
91set SL [TestSingleSelection D $Prism 0]
92set SL2 [TestMultipleSelection D $Prism 0]
93
94
95
96#12 modify
97NewCommand D
1ec8a59e 98PntOffset D $Pnt1 20 25 skip
40093367 99
100#13 recompute
101NewCommand D
102ComputeFun D $Pnt1:1
103ComputeFun D $Lin2:1
104ComputeFun D $Prism:1
105ComputeFun D $Com1
106ComputeFun D $Sel1:1
107ComputeFun D $Cyl:1
108ComputeFun D $FTr1
109ComputeFun D $Cut1
110erase
111GetShape D $Cut1:2 Pr
112
113
114#recomputation of entities of the TestSelection commands
115SolveFlatFrom D $SL
116NewCommand D
117