0030409: Data Exchange - exception during VRML file export
[occt.git] / tests / bugs / xde / bug29821
1 puts "=========="
2 puts "OCC29821"
3 puts "=========="
4 puts ""
5 #############################################
6 # Wrong processing of subshapes in ShapeTool
7 #############################################
8 pload ALL
9
10 # create test document
11 box b 1 1 1
12 box bb 2 0 0 1 1 1
13 compound b bb c
14 XNewDoc D
15 XAddShape D c 0
16 # 0:1:1:1
17 XAddShape D b
18 # 0:1:1:2
19 explode b f
20 # b_1 b_2 b_3 b_4 b_5 b_6
21 XAddSubShape D b_1 0:1:1:1
22 # 0:1:1:1:1
23 XAddSubShape D b_1 0:1:1:2
24 # 0:1:1:2:1
25
26 # FindSubShape check
27 set first_find1 [XFindSubShape D b_1 0:1:1:1]
28 if {$first_find1 != "0:1:1:1:1"} {
29   puts "Error: wrong subshape is found"
30 }
31 set first_find2 [XFindSubShape D b_1 0:1:1:2]
32 if {$first_find2 != "0:1:1:2:1"} {
33   puts "Error: wrong subshape is found"
34 }
35
36 # FindSubShape check#2
37 ForgetAll D 0:1:1:1:1
38 set second_find1 [XFindSubShape D b_1 0:1:1:1]
39 if {$second_find1 != ""} {
40   puts "Error: wrong subshape is found"
41 }
42 set second_find2 [XFindSubShape D b_1 0:1:1:2]
43 if {$second_find2 != "0:1:1:2:1"} {
44   puts "Error: wrong subshape is found"
45 }
46
47 Close D