3bea4c16 |
1 | puts "TODO OCC12345 ALL: Dump1 : Faulty" |
2 | puts "TODO OCC12345 ALL: Dump2 : Faulty" |
3 | puts "TODO OCC12345 ALL: Dump3 : Faulty" |
4 | puts "TODO OCC12345 ALL: Dump4 : Faulty" |
5 | puts "TODO OCC12345 ALL: Dump5 : Faulty" |
6 | puts "TODO OCC12345 ALL: Dump6 : Faulty" |
7 | puts "TODO OCC12345 ALL: Faulty OCC9746" |
8 | |
9 | puts "============" |
10 | puts "OCC9746" |
11 | puts "============" |
12 | puts "" |
13 | ####################################################################### |
14 | # Incorrect writing of integer array in BinMNaming_NamingDriver::Paste |
15 | ####################################################################### |
16 | |
17 | set BugNumber OCC9746 |
18 | |
19 | # Create a new document |
20 | NewDocument D BinOcaf |
21 | |
22 | box b 130 111 145 |
23 | ttranslate b 35 1 1 |
24 | pcylinder cyl 50 120 230 |
25 | ttranslate cyl 1 1 75 |
26 | |
27 | set aLab1 [ImportShape D 0:2 b Box1] |
28 | set aLab2 [ImportShape D 0:3 cyl Cylinder] |
29 | |
30 | GetShape D $aLab1 S |
31 | explode S F |
32 | set BoxNamLab [Label D 0:4] |
33 | SelectShape D $BoxNamLab:1 S_1 S |
34 | SelectShape D $BoxNamLab:2 S_2 S |
35 | SelectShape D $BoxNamLab:3 S_3 S |
36 | SelectShape D $BoxNamLab:4 S_4 S |
37 | SelectShape D $BoxNamLab:5 S_5 S |
38 | SelectShape D $BoxNamLab:6 S_6 S |
39 | |
40 | GetShape D $aLab2 C |
41 | explode C F |
42 | set CylNamLab [Label D 0:5] |
43 | SelectShape D $CylNamLab:1 C_1 C |
44 | SelectShape D $CylNamLab:2 C_2 C |
45 | |
46 | explode S E |
47 | SelectShape D $BoxNamLab:10 S_1 S |
48 | SelectShape D $BoxNamLab:11 S_3 S |
49 | |
50 | explode S V |
51 | SelectShape D $BoxNamLab:21 S_3 S |
52 | SelectShape D $BoxNamLab:22 S_5 S |
53 | |
54 | explode C V |
55 | SelectShape D $CylNamLab:10 C_1 C |
56 | SelectShape D $CylNamLab:11 C_2 C |
57 | SelectShape D $CylNamLab:12 C_3 C |
58 | |
59 | # Save the document |
60 | set aFile ${imagedir}/OCC9746-Z3.cbf |
61 | file delete ${aFile} |
62 | SaveAs D ${aFile} |
63 | if { ![file exists ${aFile}] } { |
64 | puts "There is not ${aFile} file; SaveAs command: Error" |
65 | puts "${BugNumber}: ERROR (case 1)" |
66 | } |
67 | catch {exec chmod 777 ${aFile}} |
68 | |
69 | Close D |
70 | |
71 | # Restore the document |
72 | catch {Open ${aFile} DDoc} |
73 | |
74 | # |
75 | set BoxNamLab [Label DDoc 0:4] |
76 | set CylNamLab [Label DDoc 0:5] |
77 | |
78 | # one Naming argument |
79 | Attachment DDoc $BoxNamLab:1 |
80 | Attachment DDoc $BoxNamLab:2 |
81 | Attachment DDoc $BoxNamLab:3 |
82 | Attachment DDoc $BoxNamLab:4 |
83 | Attachment DDoc $BoxNamLab:5 |
84 | Attachment DDoc $BoxNamLab:6 |
85 | |
86 | # two Naming arguments |
87 | Attachment DDoc $BoxNamLab:10 |
88 | Attachment DDoc $BoxNamLab:11 |
89 | GetShape DDoc $BoxNamLab:10 |
90 | GetShape DDoc $BoxNamLab:11 |
91 | |
92 | # three naming arguments |
93 | Attachment DDoc $BoxNamLab:21 |
94 | Attachment DDoc $BoxNamLab:22 |
95 | GetShape DDoc $BoxNamLab:21 |
96 | GetShape DDoc $BoxNamLab:22 |
97 | |
98 | # one naming argument |
99 | Attachment DDoc $CylNamLab:1 |
100 | Attachment DDoc $CylNamLab:2 |
101 | GetShape DDoc $CylNamLab:1 |
102 | GetShape DDoc $CylNamLab:2 |
103 | |
104 | # three naming arguments |
105 | Attachment DDoc $CylNamLab:10 |
106 | GetShape DDoc $CylNamLab:10 |
107 | set Dump1 [DumpSelection DDoc $CylNamLab:10] |
108 | set Dump2 [DumpSelection DDoc $CylNamLab:10:1] |
109 | |
110 | Attachment DDoc $CylNamLab:11 |
111 | GetShape DDoc $CylNamLab:11 |
112 | set Dump3 [DumpSelection DDoc $CylNamLab:11] |
113 | set Dump4 [DumpSelection DDoc $CylNamLab:10:1] |
114 | |
115 | Attachment DDoc $CylNamLab:12 |
116 | GetShape DDoc $CylNamLab:12 |
117 | set Dump5 [DumpSelection DDoc $CylNamLab:12] |
118 | set Dump6 [DumpSelection DDoc $CylNamLab:12:1] |
119 | |
120 | # |
121 | set Good_Dump1 "IDENTITY VERTEX 0:5:10:1 Stop 0:5:10:1\n" |
122 | set Good_Dump2 "INTERSECTION VERTEX 0:3:5 0:3:1 0:3:2 Stop 0:3:2\n" |
123 | set Good_Dump3 "IDENTITY VERTEX 0:5:11:1 Stop 0:5:11:1\n" |
124 | set Good_Dump4 "INTERSECTION VERTEX 0:3:5 0:3:1 0:3:2 Stop 0:3:2\n" |
125 | set Good_Dump5 "IDENTITY VERTEX 0:5:12:1 Stop 0:5:12:1\n" |
126 | set Good_Dump6 "INTERSECTION VERTEX 0:3:3 0:3:5 0:3:1 Stop 0:3:1\n" |
127 | # |
128 | |
129 | # Checking |
130 | set status 0 |
131 | puts "" |
132 | if { ${Dump1} != ${Good_Dump1} } { |
133 | set status 1 |
134 | puts "Dump1 : Faulty" |
135 | } else { |
136 | puts "Dump1 : OK" |
137 | } |
138 | if { ${Dump2} != ${Good_Dump2} } { |
139 | set status 1 |
140 | puts "Dump2 : Faulty" |
141 | } else { |
142 | puts "Dump2 : OK" |
143 | } |
144 | if { ${Dump3} != ${Good_Dump3} } { |
145 | set status 1 |
146 | puts "Dump3 : Faulty" |
147 | } else { |
148 | puts "Dump3 : OK" |
149 | } |
150 | if { ${Dump4} != ${Good_Dump4} } { |
151 | set status 1 |
152 | puts "Dump4 : Faulty" |
153 | } else { |
154 | puts "Dump4 : OK" |
155 | } |
156 | if { ${Dump5} != ${Good_Dump5} } { |
157 | set status 1 |
158 | puts "Dump5 : Faulty" |
159 | } else { |
160 | puts "Dump5 : OK" |
161 | } |
162 | if { ${Dump6} != ${Good_Dump6} } { |
163 | set status 1 |
164 | puts "Dump6 : Faulty" |
165 | } else { |
166 | puts "Dump6 : OK" |
167 | } |
168 | |
169 | # Resume |
170 | puts "" |
171 | if { ${status} != 0 } { |
172 | puts "Faulty ${BugNumber}" |
173 | } else { |
174 | puts "OK ${BugNumber}" |
175 | } |