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