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 CMP_TOL [checkmaxtol f]
47 puts "CMP_TOL=${CMP_TOL}"
49 set good_dist 9.8455689542838467e-14
50 set good_uproj 0.66864242394263962
51 set good_vproj 0.53857983853386682
52 set good_proj1 336.79267755053786
53 set good_proj2 -256.45869438720723
55 if { [expr abs(${dist} - ${good_dist}) ] > ${CMP_TOL} } {
56 puts "Error: invalid dist"
58 if { [expr abs(${uproj} - ${good_uproj}) ] > ${CMP_TOL} } {
59 puts "Error: invalid uproj"
61 if { [expr abs(${vproj} - ${good_vproj}) ] > ${CMP_TOL} } {
62 puts "Error: invalid vproj"
64 if { [expr abs(${proj1} - ${good_proj1}) ] > ${CMP_TOL} } {
65 puts "Error: invalid proj1"
67 if { [expr abs(${proj2} - ${good_proj2}) ] > ${CMP_TOL} } {
68 puts "Error: invalid proj2"
76 #the distance value is : 3.99072821948773e-08
78 regexp {([-0-9.+eE]+)$} [dump d_val] full dist
79 regexp { +Vertex +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} [ maxtolerance d ] full toler
80 set good_dist 3.99072821948773e-08
81 if { [expr abs( ${dist} - ${good_dist} )] > ${toler} } {
82 puts "Error : the distanse is ${dist}. It is bad value"