1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00
oan c764e804ba 0024945: Extrema_ExtPElC::Perform does not consider angular tolerance when calculates angle between two vectors
Consider angular tolerance during calculation of angle between two vectors for protection against deviations that are significantly less than tolerance.
Simplified code to reduce number of comparison
Added QA command OCC24945 and test case bugs/moddata_3/bug24945
2014-06-05 14:17:23 +04:00

28 lines
1.1 KiB
Plaintext

puts "============"
puts "OCC24945"
puts "============"
puts ""
##########################################################################################################
# Extrema_ExtPElC::Perform does not consider angular tolerance when calculates angle between two vectors
##########################################################################################################
pload QAcommands
set info [OCC24945]
regexp {Projected point: +X += +([-0-9.+eE]+); +Y += +([-0-9.+eE]+); +Z += +([-0-9.+eE]+)} $info full aX aY aZ
regexp {Parameters on cylinder: +U += +([-0-9.+eE]+); +V += +([-0-9.+eE]+)} $info full aU aV
set expected_X -1725.97
set expected_Y 843.26
set expected_Z 2.1137e-013
set expected_U 6.2832
set expected_V 1260.6
set tol_abs_dist 1.0e-12
set tol_rel_dist 0.1
checkreal "Point X" ${aX} ${expected_X} ${tol_abs_dist} ${tol_rel_dist}
checkreal "Point Y" ${aY} ${expected_Y} ${tol_abs_dist} ${tol_rel_dist}
checkreal "Point Z" ${aZ} ${expected_Z} ${tol_abs_dist} ${tol_rel_dist}
checkreal "Point U" ${aU} ${expected_U} ${tol_abs_dist} ${tol_rel_dist}
checkreal "Point V" ${aV} ${expected_V} ${tol_abs_dist} ${tol_rel_dist}