0030694: Data Exchange - support non-standard GB2312-encoded STEP files
[occt.git] / tests / bugs / step / bug28449
1 puts "========"
2 puts "OCC28449"
3 puts "========"
4 puts ""
5 #################################################
6 # Wrong orientation of Annotation Plane in GD&T
7 #################################################
8
9 ReadStep Doc [locate_data_file bug26689_nist_ctc_01_asme1_ap242.stp]
10
11 set pos [XGetGDTPosition Doc 0:1:4:1]
12 regexp {normal: +([-0-9.+eE]+) ([-0-9.+eE]+) ([-0-9.+eE]+)} $pos full pos_x pos_y pos_z
13 regexp {x_direction: +([-0-9.+eE]+) ([-0-9.+eE]+) ([-0-9.+eE]+)} $pos full dir_x dir_y dir_z
14 set isOK 1
15 set prec 1e-7
16
17 if {[expr abs($pos_x)] > $prec || [expr abs($pos_y + 1)] > $prec || [expr abs($pos_z)] > $prec} {
18   set isOK 0
19 }
20 if {[expr abs($dir_x - 1)] > $prec || [expr abs($dir_y)] > $prec || [expr abs($dir_z)] > $prec} {
21   set isOK 0
22 }
23
24 if {$isOK == 0} {
25   puts "Error: wrong Annotation plane"
26 }