0027322: geom/revolution_00/A1: Incorrect pcurve creation
[occt.git] / tests / bugs / modalg_5 / bug25292_31
1 puts "================"
2 puts "OCC25292"
3 puts "================"
4 puts ""
5 #######################################################################
6 # Face/Face intersection algorithm gives different results for different order of the arguments
7 #######################################################################
8
9 puts "##############################"
10 puts "#!!!Search \"Attention\" keyword on this web-page for additional checking!!!"
11 puts "##############################"
12 puts ""
13 puts ""
14
15 # bopcurves command
16
17 restore [locate_data_file bug25292_f1.brep] f1
18 restore [locate_data_file bug25292_f2.brep] f2
19
20 #############################
21 set log [bopcurves f1 f2 -2d]
22 #############################
23
24 regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} ${log} full Toler NbCurv
25
26 #This value must be equal to the analogical value in bug25292_31 and bug25292_32 of "bugs modalg_5" testgrid. 
27 set MaxTol 1.3e-7
28
29 #This value must be equal to the analogical value in bug25292_31 and bug25292_32 of "bugs modalg_5" testgrid. 
30 set GoodNbCurv 1
31
32 if {${Toler} > ${MaxTol}} {
33   puts "Error: Tolerance is too big!"
34 }
35 if {${NbCurv} != ${GoodNbCurv}} {
36   puts "Error: Curve Number is bad!!"
37 }
38
39 #-------------
40
41 mksurface s1 f1
42 mksurface s2 f2
43
44 for {set i 1} {$i <= ${NbCurv}} {incr i} {
45   set log [dump c_$i]
46   
47   regexp {Degree +([-0-9.+eE]+), +([-0-9.+eE]+) Poles, +([-0-9.+eE]+)} ${log} full Degree Poles KnotsPoles
48   puts "Degree=${Degree}"
49   puts "Poles=${Poles}"
50   puts "KnotsPoles=${KnotsPoles}"
51   puts ""
52
53   set Knot 1
54   set exp_string "Knots :\n\n +${Knot} :  +(\[-0-9.+eE\]+) +(\[-0-9.+eE\]+)"
55   regexp ${exp_string} ${log} full U1 Mult1
56
57   set Knot ${KnotsPoles}
58   set exp_string " +${Knot} :  +(\[-0-9.+eE\]+) +(\[-0-9.+eE\]+)"
59   regexp ${exp_string} ${log} full U2 Mult2
60
61   puts "U1=${U1}"
62   puts "U2=${U2}"
63   
64   if {[expr {$U2 - $U1}] < 1.0e-20} {
65     puts "Error: Wrong curve's range!"
66   }
67
68   xdistcs c_$i s1 ${U1} ${U2} 10 1e-7 1e-8
69   xdistcs c_$i s2 ${U1} ${U2} 10 1e-7 1e-8
70 }
71
72 smallview
73 fit
74 checkview -screenshot -2d -path ${imagedir}/${test_image}.png