0031092: Foundation Classes - incorrect last output value for Infinite progress indicator
[occt.git] / tests / bugs / fclasses / bug26022
CommitLineData
91806b90 1puts "========"
2puts "OCC26022"
3puts "========"
4puts ""
5##############################################
6# Extrema_ExtCC gives not precise solution
7##############################################
8
9restore [locate_data_file bug26022_splitnoproblem671_notria.brep] a
10
11explode a
12explode a_2 e
13subshape a_2 e 2
14mkcurve c1 a_1
15mkcurve c2 a_2_2
16
17extrema c1 c2 1
18
19cvalue c1 prm_1_1 x1 y1 z1
20bounds c1 u1 u2
21cvalue c1 u2 x2 y2 z2
22
23regexp {is ([\d.\-e]+)} [length ext_1] str dist
24set dist_to_end [dval sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)+(z1-z2)*(z1-z2))]
25set parametric_dist_to_end [dval u2-prm_1_1]
26
27puts "dist of solution $dist"
28puts "parametric dist to end of curve $parametric_dist_to_end"
29puts "dist to end of curve $dist_to_end"
30
31set tol_abs 4.0e-12
32set tol_rel 1.0e-2
33
34set expected_dist 0.0
35set expected_parametric_dist_to_end 0.0
36set expected_dist_to_end 0.0
37
38checkreal "dist of solution" ${dist} ${expected_dist} ${tol_abs} ${tol_rel}
39checkreal "parametric dist to end of curve" ${parametric_dist_to_end} ${expected_parametric_dist_to_end} ${tol_abs} ${tol_rel}
40checkreal "dist to end of curve" ${dist_to_end} ${expected_dist_to_end} ${tol_abs} ${tol_rel}