1 puts "================"
3 puts "================"
5 #######################################################################
6 # Wrong result done by projection algorithm
7 #######################################################################
9 restore [locate_data_file bug25223_surface] s
10 restore [locate_data_file bug25223_curve] c
15 #Parameters : 2.50050886855066 2.71802559491834
16 regexp {Parameters : ([-0-9.+eE]+) ([-0-9.+eE]+)} [dump c] full a1 a2
17 set good_a1 2.50050886855066
18 set good_a2 2.71802559491834
20 if { [expr abs(${a1} - ${good_a1}) ] > ${c_tol} } {
21 puts "Error: invalid a1 parameter"
23 if { [expr abs(${a2} - ${good_a2}) ] > ${c_tol} } {
24 puts "Error: invalid a2 parameter"
34 set proj_fp [projponf f p1]
35 #proj dist = 9.8455689542838467e-014
37 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
45 set tolmax_f [tolmax f]
46 regexp {max tol = ([-0-9.+eE]+)} ${tolmax_f} full CMP_TOL
48 puts "CMP_TOL=${CMP_TOL}"
50 set good_dist 9.8455689542838467e-14
51 set good_uproj 0.66864242394263962
52 set good_vproj 0.53857983853386682
53 set good_proj1 336.79267755053786
54 set good_proj2 -256.45869438720723
56 if { [expr abs(${dist} - ${good_dist}) ] > ${CMP_TOL} } {
57 puts "Error: invalid dist"
59 if { [expr abs(${uproj} - ${good_uproj}) ] > ${CMP_TOL} } {
60 puts "Error: invalid uproj"
62 if { [expr abs(${vproj} - ${good_vproj}) ] > ${CMP_TOL} } {
63 puts "Error: invalid vproj"
65 if { [expr abs(${proj1} - ${good_proj1}) ] > ${CMP_TOL} } {
66 puts "Error: invalid proj1"
68 if { [expr abs(${proj2} - ${good_proj2}) ] > ${CMP_TOL} } {
69 puts "Error: invalid proj2"
77 #the distance value is : 3.99072821948773e-08
79 regexp {([-0-9.+eE]+)$} [dump d_val] full dist
80 regexp { +Vertex +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} [ maxtolerance d ] full toler
81 set good_dist 3.99072821948773e-08
82 if { [expr abs( ${dist} - ${good_dist} )] > ${toler} } {
83 puts "Error : the distanse is ${dist}. It is bad value"