0029807: [Regression to 7.0.0] Impossible to cut cone from prism
[occt.git] / tests / bugs / caf / bug28425
CommitLineData
8ce97bc9 1puts "==========="
2puts "OCC28425"
3puts "==========="
4puts ""
5############################################################
6# Open/save NamedShape changes order of shapes
7############################################################
8
9pload QAcommands
10
11vertex v 1 2 3
12box b 10 20 30
13
14# Test bin document
15NewDocument D1 BinOcaf
16BuildNamedShape D1 0:1 PRIMITIVE v b
17GetNewShapes D1 0:1 s
18set info [whatis s_1]
19if { [regexp "SOLID" $info] != 1 } {
20 puts "Error: first shape should be solid"
21} else {
22 puts "OK: order of shapes is correct"
23}
24SaveAs D1 test.cbf
25Close D1
26Open test.cbf D2
27GetNewShapes D2 0:1 s
28set info [whatis s_1]
29if { [regexp "SOLID" $info] != 1 } {
30 puts "Error: first shape should be solid"
31} else {
32 puts "OK: order of shapes is correct"
33}
34Close D2
35
36# Test xml document
37NewDocument D1 XmlOcaf
38BuildNamedShape D1 0:1 PRIMITIVE v b
39GetNewShapes D1 0:1 s
40set info [whatis s_1]
41if { [regexp "SOLID" $info] != 1 } {
42 puts "Error: first shape should be solid"
43} else {
44 puts "OK: order of shapes is correct"
45}
46SaveAs D1 test.xml
47Close D1
48Open test.xml D2
49GetNewShapes D2 0:1 s
50set info [whatis s_1]
51if { [regexp "SOLID" $info] != 1 } {
52 puts "Error: first shape should be solid"
53} else {
54 puts "OK: order of shapes is correct"
55}
56Close D2