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