87efa821 |
1 | ######################################## |
2 | # Wrong export to STEP of located root. |
3 | ######################################## |
4 | |
5 | pload OCAF |
6 | |
7 | XOpen [locate_data_file bug30189.xbf] D |
8 | WriteStep D $imagedir/${casename}.stp |
9 | ReadStep DD $imagedir/${casename}.stp |
10 | |
11 | # Check location |
12 | XGetOneShape res DD |
13 | set props [lprops res] |
14 | |
15 | if {[lindex $props 9] != "90"} { |
16 | puts "Error: wrong location on shape." |
17 | } |
18 | if {[lindex $props 12] != "75"} { |
19 | puts "Error: wrong location on shape." |
20 | } |
21 | if {[lindex $props 15] != "60"} { |
22 | puts "Error: wrong location on shape." |
23 | } |
24 | |
25 | # Check structure |
26 | set top_level [XGetTopLevelShapes DD] |
27 | if {$top_level != "0:1:1:1 0:1:1:2 0:1:1:3 0:1:1:4 "} { |
28 | puts "Error: wrong structure of document." |
29 | } |
30 | set nb [XNbComponents DD 0:1:1:1] |
31 | if {$nb != "1"} { |
32 | puts "Error: wrong structure of document." |
33 | } |
34 | set nb [XNbComponents DD 0:1:1:2] |
35 | if {$nb != "3"} { |
36 | puts "Error: wrong structure of document." |
37 | } |
38 | |
39 | # Check colors |
ba00aab7 |
40 | if {[XGetShapeColor DD 0:1:1:3 surf] != "RED"} { puts "Error: wrong color." } |
41 | if {[XGetShapeColor DD 0:1:1:4 surf] != "DARKGOLDENROD1"} { puts "Error: wrong color." } |
87efa821 |
42 | |
43 | Close D |
44 | Close DD |
45 | file delete $imagedir/${casename}.stp |