0031485: Data Exchange - Export STEP in nonmanifold mode looses all faces except one
[occt.git] / tests / bugs / step / bug30189_2
1 ########################################
2 # Wrong export to STEP of located root.
3 ########################################
4
5 pload OCAF
6
7 XNewDoc D
8 box b 1 1 1
9 box bb 2 0 0 1 1 1
10 box bbb 4 0 0 1 1 1
11 compound b bb c
12 copy c cc
13 ttranslate cc 0 2 0
14 compound bbb c s
15 XAddShape D s
16 XAddShape D cc
17 WriteStep D $imagedir/${casename}.stp
18 ReadStep DD $imagedir/${casename}.stp
19
20 # Check structure
21 set top_level [XGetTopLevelShapes DD]
22 if {$top_level != "0:1:1:1 0:1:1:2 0:1:1:3 0:1:1:4 0:1:1:5 0:1:1:6 "} {
23   puts "Error: wrong structure of document."
24 }
25
26 # Check sharing
27 set nb [XNbComponents DD 0:1:1:6]
28 if {$nb != "1"} {
29   puts "Error: wrong structure of document."
30 }
31 set nb [XGetUsers DD 0:1:1:3]
32 if {$nb != "2"} {
33   puts "Error: wrong structure of document."
34 }  
35
36 Close D
37 Close DD
38 file delete $imagedir/${casename}.stp