0025624: Visualization - selection is incorrect in perspective mode in a specific...
[occt.git] / tests / bugs / moddata_3 / bug25782_2
1 puts "========"
2 puts "OCC25782"
3 puts "========"
4 puts ""
5 ######################################################
6 # The result of intersection between two cylinders is incorrect
7 ######################################################
8
9 set GoodNbCurv 2
10
11 cylinder s1 0 0 0 12 35 47 5
12 cylinder s2 3 2 8 12 35 47 4
13
14 set bug_info [intersect res s1 s2]
15
16 set che [whatis res]
17 set ind [string first "3d curve" $che]
18 if {${ind} >= 0} {
19   #Only variable "res" exists
20   
21   copy res res_1
22 }
23
24 if {[llength ${bug_info}] != $GoodNbCurv} {
25   puts "Error: The result of intersection between two cylinders is incorrect"
26 }
27
28 set Tolerance 1.e-7
29 set D_good 0.
30 set Limit_Tol 1.0e-7
31
32 set ic 1
33 set AllowRepeate 1
34 while { $AllowRepeate != 0 } {
35   set che [whatis res_$ic]
36   set ind [string first "3d curve" $che]
37   if {${ind} < 0} {
38     set AllowRepeate 0
39   } else {
40     if { [regexp {\*\*\nLine} [dump res_$ic]] } {
41       #puts "OK : Correct intersection"
42     } else {
43       puts "Error : Bad intersection"
44     }
45   
46     dlog reset
47     dlog on
48     xdistcs res_$ic s1 0 100 10
49     set Log1 [dlog get]
50     set List1 [split ${Log1} {TD= \t\n}]
51     set Tolerance 1.0e-7
52     set Limit_Tol 1.0e-7
53     set D_good 0.
54     checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
55     
56     dlog reset
57     dlog on
58     xdistcs res_$ic s2 0 100 10
59     set Log1 [dlog get]
60     set List1 [split ${Log1} {TD= \t\n}]
61     set Tolerance 1.0e-7
62     set Limit_Tol 1.0e-7
63     set D_good 0.
64     checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
65     
66     incr ic
67   }
68 }