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