460f4f69 |
1 | puts "================" |
2 | puts "OCC25662" |
3 | puts "================" |
4 | puts "" |
5 | ####################################################################### |
6 | # Project command produce wrong 2dcurve |
7 | ####################################################################### |
8 | |
9 | restore [locate_data_file bug25662_c3d.draw] c3d |
10 | restore [locate_data_file bug25662_surf.draw] surf |
11 | |
12 | project c2d c3d surf |
13 | |
14 | set log [dump c2d] |
15 | |
16 | regexp {Degree +([-0-9.+eE]+), +([-0-9.+eE]+) Poles, +([-0-9.+eE]+)} ${log} full Degree Poles KnotsPoles |
17 | puts "Degree=${Degree}" |
18 | puts "Poles=${Poles}" |
19 | puts "KnotsPoles=${KnotsPoles}" |
20 | puts "" |
21 | |
6b0e8bd1 |
22 | set tol_abs 1.e-4 |
460f4f69 |
23 | set tol_rel 0.01 |
24 | set V_i 0 |
25 | |
26 | for {set i 1} {${i} <= ${Poles}} {incr i} { |
27 | set V_i_1 ${V_i} |
28 | set exp_string " +${i} : +(\[-0-9.+eE\]+), +(\[-0-9.+eE\]+)" |
29 | regexp ${exp_string} ${log} full U_i V_i |
30 | #puts "i=${i} U_i=${U_i} V_i=${V_i}" |
31 | if { ${i} == 1 } { |
32 | # First pole |
33 | puts "V_first=${V_i}" |
34 | set expected_V_first 36.9997986855584 |
35 | checkreal "V_first" ${V_i} ${expected_V_first} ${tol_abs} ${tol_rel} |
36 | } |
37 | if { ${i} == ${Poles} } { |
38 | # Last pole |
39 | puts "V_last=${V_i}" |
40 | set expected_V_last 55.0007653583147 |
41 | checkreal "V_last" ${V_i} ${expected_V_last} ${tol_abs} ${tol_rel} |
42 | } |
43 | if { ${i} > 1 } { |
44 | #puts "i=${i} U_i=${U_i} V_i=${V_i} V_i_1=${V_i_1}" |
6b0e8bd1 |
45 | if { ${V_i_1} - ${V_i} > ${tol_abs} } { |
460f4f69 |
46 | puts "Error: Bad value of V in string: ${i} :${U_i}, ${V_i}" |
47 | } |
48 | } |
49 | } |