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