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 | |
94f71cad |
13 | set info1 [OCC24303 5] |
74f5f8df |
14 | regexp {Solutions +([-0-9.+eE]+)} ${info1} full Solution |
15 | regexp {Distance += +([-0-9.+eE]+)} ${info1} full Distance |
16 | |
94f71cad |
17 | if { [info exists Sol5] } { |
18 | set info2 [dump Sol5] |
74f5f8df |
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 |
1d19db8d |
30 | |
31 | set SQDistCC [expr ($CenterX-$good_CenterX)*($CenterX-$good_CenterX)+($CenterY-$good_CenterY)*($CenterY-$good_CenterY)] |
32 | |
33 | if { ${SQDistCC} > 1.0e-14 } { |
34 | puts "Faulty : Bad Center of the circle" |
74f5f8df |
35 | set status 1 |
36 | } |
37 | if { ${XAxisX} != ${good_XAxisX} } { |
38 | puts "Faulty : Bad XAxisX" |
1d19db8d |
39 | set status 2 |
74f5f8df |
40 | } |
41 | if { ${XAxisY} != ${good_XAxisY} } { |
42 | puts "Faulty : Bad XAxisY" |
1d19db8d |
43 | set status 3 |
74f5f8df |
44 | } |
45 | if { ${YAxisX} != ${good_YAxisX} } { |
46 | puts "Faulty : Bad YAxisX" |
1d19db8d |
47 | set status 4 |
74f5f8df |
48 | } |
49 | if { ${YAxisY} != ${good_YAxisY} } { |
50 | puts "Faulty : Bad YAxisY" |
1d19db8d |
51 | set status 5 |
74f5f8df |
52 | } |
53 | if { ${Radius} != ${good_Radius} } { |
54 | puts "Faulty : Bad Radius" |
1d19db8d |
55 | set status 6 |
74f5f8df |
56 | } |
57 | } else { |
58 | puts "Faulty : Bad solution" |
1d19db8d |
59 | set status 7 |
74f5f8df |
60 | } |
61 | |
62 | if { ${status} != 0 } { |
1d19db8d |
63 | puts "Faulty : solution is wrong. Status = ${status}" |
74f5f8df |
64 | } else { |
65 | puts "OK : solution is correct" |
66 | } |