b8bf9595 |
1 | puts "==========" |
2 | puts "OCC29338" |
3 | puts "==========" |
4 | puts "" |
5 | ######################################################### |
6 | # Add Planes for Tolerance zones in Geometric tolerances |
7 | ######################################################### |
8 | pload ALL |
9 | |
10 | box b 1 1 1 |
11 | XNewDoc D |
12 | XAddShape D b |
13 | explode b f |
14 | XAddGeomTolerance D b_1 |
15 | plane p 1 2 3 0 1 0 |
16 | XSetGDTAffectedPlane D 0:1:4:1 p 2 |
17 | SaveAs D ${imagedir}/bug29338.xbf |
18 | Close D |
19 | XOpen ${imagedir}/bug29338.xbf DD |
20 | set type [XGetGDTAffectedPlane DD 0:1:4:1 plane] |
21 | if {[lindex $type 0] != "orientation"} { |
22 | puts "Error: wrong affected plane type" |
23 | } |
24 | |
25 | set res [dump plane] |
26 | set check [split $res {:, }] |
27 | if {[lindex $check 8] != 1} { |
28 | puts "Error: wrong affected plane" |
29 | } |
30 | if {[lindex $check 10] != 2} { |
31 | puts "Error: wrong affected plane" |
32 | } |
33 | if {[lindex $check 12] != 3} { |
34 | puts "Error: wrong affected plane" |
35 | } |
36 | if {[lindex $check 19] != 0} { |
37 | puts "Error: wrong affected plane" |
38 | } |
39 | if {[lindex $check 21] != 1} { |
40 | puts "Error: wrong affected plane" |
41 | } |
42 | if {[lindex $check 23] != 0} { |
43 | puts "Error: wrong affected plane" |
44 | } |
45 | Close DD |
46 | file delete ${imagedir}/bug29338.xbf |