74f5f8df |
1 | puts "============" |
2 | puts "OCC24303" |
3 | puts "============" |
4 | puts "" |
5 | ############################### |
6 | ## Precision degradation for Geom2dGcc_Circ2d2TanRad in OCCT6.6.0. |
7 | ############################### |
8 | |
9 | pload QAcommands |
10 | |
11 | set status 0 |
12 | |
13 | set info1 [OCC24303 4] |
14 | regexp {Solutions +([-0-9.+eE]+)} ${info1} full Solution |
15 | regexp {Distance += +([-0-9.+eE]+)} ${info1} full Distance |
16 | |
17 | if { [info exists Sol4] } { |
18 | set info2 [dump Sol4] |
19 | regexp {Center +:([-0-9.+eE]+), +([-0-9.+eE]+)} ${info2} full CenterX CenterY |
20 | regexp {XAxis +:([-0-9.+eE]+), +([-0-9.+eE]+)} ${info2} full XAxisX XAxisY |
21 | regexp {YAxis +:([-0-9.+eE]+), +([-0-9.+eE]+)} ${info2} full YAxisX YAxisY |
22 | regexp {Radius +:([-0-9.+eE]+)} ${info2} full Radius |
23 | set good_CenterX 5 |
24 | set good_CenterY 0 |
25 | set good_XAxisX 1 |
26 | set good_XAxisY 0 |
27 | set good_YAxisX 0 |
28 | set good_YAxisY 1 |
29 | set good_Radius 3 |
30 | if { ${CenterX} != ${good_CenterX} } { |
31 | puts "Faulty : Bad CenterX" |
32 | set status 1 |
33 | } |
34 | if { ${CenterY} != ${good_CenterY} } { |
35 | puts "Faulty : Bad CenterY" |
36 | set status 1 |
37 | } |
38 | if { ${XAxisX} != ${good_XAxisX} } { |
39 | puts "Faulty : Bad XAxisX" |
40 | set status 1 |
41 | } |
42 | if { ${XAxisY} != ${good_XAxisY} } { |
43 | puts "Faulty : Bad XAxisY" |
44 | set status 1 |
45 | } |
46 | if { ${YAxisX} != ${good_YAxisX} } { |
47 | puts "Faulty : Bad YAxisX" |
48 | set status 1 |
49 | } |
50 | if { ${YAxisY} != ${good_YAxisY} } { |
51 | puts "Faulty : Bad YAxisY" |
52 | set status 1 |
53 | } |
54 | if { ${Radius} != ${good_Radius} } { |
55 | puts "Faulty : Bad Radius" |
56 | set status 1 |
57 | } |
58 | } else { |
59 | puts "Faulty : Bad solution" |
60 | set status 1 |
61 | } |
62 | |
63 | if { ${status} != 0 } { |
64 | puts "Faulty : solution is wrong" |
65 | } else { |
66 | puts "OK : solution is correct" |
67 | } |