0024255: Regressions in test cases on OCCT vc9 win64 Release
[occt.git] / tests / caf / driver / B7
1 #1 - create 4 Pnts
2 NewCommand D
3 AddDriver D PntXYZ PntRLT Line3D Attach;
4 set Pnt1 [AddPoint D 0 0 0];            ## add point1
5 ComputeFun D $Pnt1:1;                   ## compute function
6 GetShape D $Pnt1:1:2 P1;                ## check result
7 whatis P1
8 # referes to result NS
9 GetReference D $Pnt1;                   ## check is reference set 
10
11 set Pnt2 [AddPoint D 0 200 0];
12 ComputeFun D $Pnt2:1;
13 set Pnt3 [AddPoint D 200 200 0];
14 ComputeFun D $Pnt3:1;
15 set Pnt4 [AddPoint D 200 0 0];
16 ComputeFun D $Pnt4:1;
17 GetShape D $Pnt2:1:2 P2;
18 GetShape D $Pnt3:1:2 P3;
19 GetShape D $Pnt4:1:2 P4;
20
21 #2 create open Lin1
22 #NewCommand D
23 #set Lin1 [ AddLine3D D 0 $Pnt1 $Pnt2 $Pnt3 $Pnt4]
24 #ComputeFun D $Lin1:1;
25 #GetShape D $Lin1:1:2 L1;
26
27 #3 create closed Lin3
28 NewCommand D
29 set Lin2 [ AddLine3D D 1 $Pnt1 $Pnt2 $Pnt3 $Pnt4]
30 ComputeFun D $Lin2:1;
31 GetShape D $Lin2:1:2 L1;
32
33 #4 Prism  (after step #1)
34 NewCommand D
35 AddDriver D Prism Box PTxyz
36 set Prism [AddPrism D $Lin2 300 1]
37 ComputeFun D $Prism:1
38 GetShape D $Prism:1:2 Pr
39 GetReference D $Prism;                  ## check is reference set 
40
41 #5 Add Box
42 NewCommand D
43 set B1 [AddBox D 400 140 600];
44 ComputeFun D $B1:1;
45 GetShape D $B1:1:2 Box;
46
47 #6 Translate Box1
48 NewCommand D
49 set FTr1 [PTranslateDXYZ D $B1 -100 -20 -100]
50 ComputeFun D $FTr1
51 GetShape D $B1:2:2 Box
52
53 #7 add Common
54 NewCommand D
55 AddDriver D Comm Cut Fuse
56 set Com1 [AddCommon D $Prism $B1]
57 ComputeFun D $Com1
58 GetShape D $Com1:2 Pr
59
60 #8 Add Cylinder
61 NewCommand D
62 explode Pr E
63 AddDriver D Attach Cyl
64 set Sel1 [AttachShape D Pr_6 ${Prism} ${Prism} 0]; ## set attachment
65 set Cyl [AddCyl D 70 515 ${Sel1}]
66 ComputeFun D $Cyl:1
67 GetShape D $Cyl:1:2 CylS
68
69 #9 Translate Cylinder
70 NewCommand D
71 set FTr1 [PTranslateDXYZ D $Cyl -100 200 170]
72 ComputeFun D $FTr1
73 GetShape D $Cyl:2:2 CylS
74
75 #10 Cut 
76 NewCommand D
77 set Cut1 [AddCut D $Prism $Cyl]
78 ComputeFun D $Cut1
79 GetShape D $Cut1:2 Pr
80 don Pr
81
82 #11 test special cases of type migration
83 explode Pr E
84 erase Pr_1 Pr_2 Pr_3 Pr_4 Pr_5 Pr_6 Pr_7 Pr_8 Pr_9 Pr_10 Pr_11 Pr_12 Pr_13 Pr_14 Pr_15 Pr_16 Pr_17
85 display Pr_8 Pr_9
86 ## 8,9
87 NewCommand D
88 set Sel8 [AttachShape D Pr_8 ${Prism} ${Prism} 0]; ## should return Compound of two edges 
89 set Sel9 [AttachShape D Pr_9 ${Prism} ${Prism} 1]; ## should return Compound of two edges
90 set Sel11 [AttachShape D Pr_11 ${Prism} ${Prism} 1];
91 set Sel12 [AttachShape D Pr_11 ${Prism} ${Prism} 0];
92 #12 modify
93 PntOffset D $Pnt1  40 25 skip
94
95 #13 recompute
96 ComputeFun D $Pnt1:1
97 ComputeFun D $Lin2:1
98 ComputeFun D $Prism:1
99 ComputeFun D $Com1
100 ComputeFun D $Sel1:1                                    
101 ComputeFun D $Cyl:1
102 ComputeFun D $FTr1
103 ComputeFun D $Cut1
104 erase
105 GetShape D $Cut1:2 Pr
106
107 ComputeFun D $Sel8:1                                    
108 ComputeFun D $Sel9:1                                    
109 ComputeFun D $Sel11:1
110 ComputeFun D $Sel12:1
111 NewCommand D
112