0024138: Exception during projection of the point on the face
[occt.git] / tests / bugs / moddata_3 / bug24138
1 puts "================"
2 puts "OCC24138"
3 puts "================"
4 puts ""
5 #######################################################################
6 # Exception during projection of the point on the face
7 #######################################################################
8
9 ellipse w 0 0 0 10 5
10 mkedge w w
11 wire w w
12 mkplane w w
13 prism s w 2 0 30
14 explode s f
15 copy s_1 f
16 point p 0.753071156928785 4.98580193823337 0
17
18 set proj_fp [projponf f p -t]
19 regexp {proj dist = ([-0-9.+eE]+) uvproj = \(([-0-9.+eE]+) ([-0-9.+eE]+)\); pproj = \(([-0-9.+eE]+) ([-0-9.+eE]+) ([-0-9.+eE]+)\)} ${proj_fp} full dist uproj vproj proj1 proj2
20
21 puts "dist=${dist}"
22 puts "uproj=${uproj}"
23 puts "vproj=${vproj}"
24 puts "proj1=${proj1}"
25 puts "proj2=${proj2}"
26
27 set tolmax_f [tolmax f]
28 regexp {max tol = ([-0-9.+eE]+)} ${tolmax_f} full CMP_TOL
29
30 puts "CMP_TOL=${CMP_TOL}"
31
32 set good_dist 9.16061678111512e-10
33 set good_uproj 1.4954178490327235
34 set good_vproj -2.3095450102606156e-12
35 set good_proj1 0.75307115689421944
36 set good_proj2 4.9858019373179632
37
38 if { [expr abs(${dist} - ${good_dist}) ] > ${CMP_TOL} } {
39    puts "Error: invalid dist"
40 }
41 if { [expr abs(${uproj} - ${good_uproj}) ] > ${CMP_TOL} } {
42    puts "Error: invalid uproj"
43 }
44 if { [expr abs(${vproj} - ${good_vproj}) ] > ${CMP_TOL} } {
45    puts "Error: invalid vproj"
46 }
47 if { [expr abs(${proj1} - ${good_proj1}) ] > ${CMP_TOL} } {
48    puts "Error: invalid proj1"
49 }
50 if { [expr abs(${proj2} - ${good_proj2}) ] > ${CMP_TOL} } {
51    puts "Error: invalid proj2"
52 }