0025138: SIGSEGV when sweeping along helix
[occt.git] / tests / bugs / moddata_3 / bug25662
CommitLineData
460f4f69 1puts "================"
2puts "OCC25662"
3puts "================"
4puts ""
5#######################################################################
6# Project command produce wrong 2dcurve
7#######################################################################
8
9restore [locate_data_file bug25662_c3d.draw] c3d
10restore [locate_data_file bug25662_surf.draw] surf
11
12project c2d c3d surf
13
14set log [dump c2d]
15
16regexp {Degree +([-0-9.+eE]+), +([-0-9.+eE]+) Poles, +([-0-9.+eE]+)} ${log} full Degree Poles KnotsPoles
17puts "Degree=${Degree}"
18puts "Poles=${Poles}"
19puts "KnotsPoles=${KnotsPoles}"
20puts ""
21
6b0e8bd1 22set tol_abs 1.e-4
460f4f69 23set tol_rel 0.01
24set V_i 0
25
26for {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}