0031485: Data Exchange - Export STEP in nonmanifold mode looses all faces except one
[occt.git] / tests / bugs / step / bug30189_3
1 ########################################
2 # Wrong export to STEP of located root.
3 ########################################
4
5 pload OCAF
6
7 box b 1 1 1
8 copy b bb
9 copy b bbb
10 ttranslate b 2 0 0
11 ttranslate bb 0 2 0
12 ttranslate bbb 0 0 2
13 XNewDoc D
14 XAddShape D b
15 XAddShape D bb
16 XAddShape D bbb
17 SetName D 0:1:1:2 box
18 SetName D 0:1:1:1 ref1_box
19 SetName D 0:1:1:3 ref2_box
20 SetName D 0:1:1:4 ref3_box
21 WriteStep D $imagedir/${casename}.stp
22 ReadStep DD $imagedir/${casename}.stp
23
24 # Check structure
25 set top_level [XGetTopLevelShapes DD]
26 if {$top_level != "0:1:1:1 0:1:1:2 0:1:1:3 0:1:1:4 "} {
27   puts "Error: wrong structure of document."
28 }
29
30 # Check sharing
31 set nb [XGetUsers DD 0:1:1:2]
32 if {$nb != "3"} {
33   puts "Error: wrong structure of document."
34 }  
35
36 # Check names
37 set name [GetName DD 0:1:1:1]
38 if {$name != "ref1_box"} {
39   puts "Error: wrong name."
40 }
41 set name [GetName DD 0:1:1:2]
42 if {$name != "box"} {
43   puts "Error: wrong name."
44 }
45 set name [GetName DD 0:1:1:3]
46 if {$name != "ref2_box"} {
47   puts "Error: wrong name."
48 }
49 set name [GetName DD 0:1:1:4]
50 if {$name != "ref3_box"} {
51   puts "Error: wrong name."
52 }
53
54 Close D
55 Close DD
56 file delete $imagedir/${casename}.stp