0026622: Tests - Avoid using dlog and decho commands in test scripts
[occt.git] / tests / bugs / modalg_5 / bug24650
1 puts "==========="
2 puts "OCC24650"
3 puts "==========="
4 puts ""
5 ##############################################################
6 # Wrong intersection curves obtained for a surface of revolution and a plane.
7 ##############################################################
8
9 set GoodNbCurv 1
10
11 restore [locate_data_file bug24650_fz1365.brep] b1
12 restore [locate_data_file bug24650_fz2495.brep] b2
13
14 mksurface sb1 b1
15 mksurface sb2 b2
16 trimu sb1tu sb1 0.242 0.291
17
18 clear
19
20 set N [intersect res sb1tu sb2]
21
22 set che [whatis res]
23 set ind [string first "3d curve" $che]
24 if {${ind} >= 0} {
25   #Only variable "res" exists
26   renamevar res res_1
27 }
28
29
30 set ic 1
31 set AllowRepeate 1
32 while { $AllowRepeate != 0 } {
33   set che [whatis res_$ic]
34   set ind [string first "3d curve" $che]
35   if {${ind} < 0} {
36     set AllowRepeate 0
37   } else {
38     display res_$ic
39     
40     bounds res_$ic U1 U2
41     
42     dval U1
43     dval U2
44     
45     if {[dval U2-U1] < 1.0e-20} {
46       puts "Error: Wrong curve's range!"
47     }
48     
49     xdistcs res_$ic sb1tu U1 U2 10 1e-7    
50     xdistcs res_$ic sb2 U1 U2 10 1e-7
51     
52     incr ic
53   }
54 }
55
56 if {[expr {$ic - 1}] == $GoodNbCurv} {
57   puts "OK: Curve Number is good!"
58 } else {
59   puts "Error: Curve Number is bad!"
60 }
61
62 smallview
63 fit
64 set only_screen_axo 1