a41b690111a7a716163598cf87bb881e61674d5a
[occt.git] / tests / bugs / modalg_5 / bug25697_2
1 puts "=========="
2 puts "OCC25697"
3 puts "=========="
4 puts ""
5 ########################################################################################
6 # Regression : Section obtained after command "bsection" in Test Harness is incorrect.
7 ########################################################################################
8
9 restore [locate_data_file bug25697_shell_for_seam.brep] b1
10 restore [locate_data_file bug25697_prism.brep] b2
11 explode b1 f
12 copy b1_1 b1
13 explode b2 f
14 copy b2_1 b2
15
16 #################################
17 set log [bopcurves b1 b2 -2d1]
18 #################################
19
20 regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} ${log} full Toler NbCurv
21
22 set MaxTol 1.e-7
23 set GoodNbCurv 3
24
25 if { ${Toler} > ${MaxTol} } {
26   puts "Error: Tolerance is too big!"
27 }
28
29 if { ${NbCurv} != ${GoodNbCurv} } {
30   puts "Error: Curve Number is bad!"
31 }
32
33 #---------------
34 mksurface s1 b1
35 mksurface s2 b2
36
37 for {set i 1} {$i <= ${NbCurv}} {incr i} {
38   bounds c_$i u1 u2
39   dump u1 u2
40   dlog reset
41   dlog on
42   xdistcs c_$i s1 u1 u2 10
43   set Log2 [dlog get]
44   set List2 [split ${Log2} {TD= \t\n}]
45   set Tolerance 1.0e-7
46   set Limit_Tol 1.0e-7
47   set D_good 0.
48   checkList ${List2} ${Tolerance} ${D_good} ${Limit_Tol}
49
50   dlog reset
51   dlog on
52   xdistcs c_$i s2 u1 u2 10
53   set Log2 [dlog get]
54   set List2 [split ${Log2} {TD= \t\n}]
55   set Tolerance 1.0e-7
56   set Limit_Tol 1.0e-7
57   set D_good 0.
58   checkList ${List2} ${Tolerance} ${D_good} ${Limit_Tol}
59 }
60
61 smallview
62 fit
63 set only_screen_axo 1