0028493: [Regression vs 7.0.0] Intersection algorithm produces curve with loop
[occt.git] / tests / lowalgos / intss / bug25782_2
CommitLineData
b70d2b09 1puts "========"
2puts "OCC25782"
3puts "========"
4puts ""
5######################################################
6# The result of intersection between two cylinders is incorrect
7######################################################
8
9set GoodNbCurv 2
10
11cylinder s1 0 0 0 12 35 47 5
12cylinder s2 3 2 8 12 35 47 4
13
14set bug_info [intersect res s1 s2]
15
16set che [whatis res]
17set ind [string first "3d curve" $che]
18if {${ind} >= 0} {
19 #Only variable "res" exists
20
21 copy res res_1
22}
23
24if {[llength ${bug_info}] != $GoodNbCurv} {
25 puts "Error: The result of intersection between two cylinders is incorrect"
26}
27
28set Tolerance 1.e-7
29set D_good 0.
30set Limit_Tol 1.0e-7
31
32set ic 1
33set AllowRepeate 1
34while { $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
6d368502 46 xdistcs res_$ic s1 0 100 10 1e-7
47 xdistcs res_$ic s2 0 100 10 1e-7
b70d2b09 48
49 incr ic
50 }
51}