0025982: Wrong result obtained by General Fuse operator.
[occt.git] / tests / bugs / modalg_5 / bug25292_32
1 puts "TODO OCC25597 ALL: Error: Tolerance is too big!"
2 puts "================"
3 puts "OCC25292"
4 puts "================"
5 puts ""
6 #######################################################################
7 # Face/Face intersection algorithm gives different results for different order of the arguments
8 #######################################################################
9
10 puts "##############################"
11 puts "#!!!Search \"Attention\" keyword on this web-page for additional checking!!!"
12 puts "##############################"
13 puts ""
14 puts ""
15
16 # bopcurves command
17
18 restore [locate_data_file bug25292_f1.brep] f1
19 restore [locate_data_file bug25292_f2.brep] f2
20
21 #############################
22 set log [bopcurves f2 f1 -2d]
23 #############################
24
25 regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} ${log} full Toler NbCurv
26
27 #This value must be equal to the analogical value in bug25292_31 and bug25292_32 of "bugs modalg_5" testgrid. 
28 set MaxTol 1.0e-8
29
30 #This value must be equal to the analogical value in bug25292_31 and bug25292_32 of "bugs modalg_5" testgrid. 
31 set GoodNbCurv 1
32
33 if {${Toler} > ${MaxTol}} {
34   puts "Error: Tolerance is too big!"
35 }
36 if {${NbCurv} != ${GoodNbCurv}} {
37   puts "Error: Curve Number is bad!!"
38 }
39
40 #-------------
41
42 mksurface s1 f1
43 mksurface s2 f2
44
45 for {set i 1} {$i <= ${NbCurv}} {incr i} {
46   set log [dump c_$i]
47   
48   regexp {Degree +([-0-9.+eE]+), +([-0-9.+eE]+) Poles, +([-0-9.+eE]+)} ${log} full Degree Poles KnotsPoles
49   puts "Degree=${Degree}"
50   puts "Poles=${Poles}"
51   puts "KnotsPoles=${KnotsPoles}"
52   puts ""
53
54   set Knot 1
55   set exp_string "Knots :\n\n +${Knot} :  +(\[-0-9.+eE\]+) +(\[-0-9.+eE\]+)"
56   regexp ${exp_string} ${log} full U1 Mult1
57
58   set Knot ${KnotsPoles}
59   set exp_string " +${Knot} :  +(\[-0-9.+eE\]+) +(\[-0-9.+eE\]+)"
60   regexp ${exp_string} ${log} full U2 Mult2
61
62   puts "U1=${U1}"
63   puts "U2=${U2}"
64   
65   if {[expr {$U2 - $U1}] < 1.0e-20} {
66     puts "Error: Wrong curve's range!"
67   }
68
69   dlog reset
70   dlog on
71   xdistcs c_$i s1 ${U1} ${U2} 10
72   set Log2 [dlog get]
73   set List2 [split ${Log2} {TD= \t\n}]
74   set Tolerance 1.0e-7
75   set Limit_Tol 1.0e-8
76   set D_good 0.
77   checkList ${List2} ${Tolerance} ${D_good} ${Limit_Tol}
78
79   dlog reset
80   dlog on
81   xdistcs c_$i s2 ${U1} ${U2} 10
82   set Log2 [dlog get]
83   set List2 [split ${Log2} {TD= \t\n}]
84   set Tolerance 1.0e-7
85   set Limit_Tol 1.0e-8
86   set D_good 0.
87   checkList ${List2} ${Tolerance} ${D_good} ${Limit_Tol}
88 }
89
90 smallview
91 fit
92 set only_screen_axo 1