0028493: [Regression vs 7.0.0] Intersection algorithm produces curve with loop
[occt.git] / tests / lowalgos / intss / bug29807_i5001
CommitLineData
3306fdd9 1puts "========"
2puts "0029807: Impossible to cut cone from prism"
3puts "========"
4puts ""
5
6puts "TODO OCC29883 ALL: Error in res_2: T=0"
7puts "TODO OCC29883 ALL: Error: 0 vertices are expected but 2 are found"
8puts "TODO OCC29883 ALL: Error : is WRONG because number of VERTEX entities in shape \"result\" is 3"
9
10foreach a [directory res*] {unset $a}
11
12binrestore [locate_data_file bug29807_f1.bin] f1
13binrestore [locate_data_file bug29807_f2.bin] f2
14
15mksurface s1 f1
16mksurface s2 f2
17
18trim s1 s1
19trim s2 s2
20
21intersect res s1 s2 1.0e-4
22
23set che [whatis res]
24set ind [string first "3d curve" $che]
25if {${ind} >= 0} {
26 #Only variable "res" exists
27 renamevar res res_1
28}
29
30bclearobjects
31bcleartools
32
33set ic 1
34set AllowRepeat 1
35while { $AllowRepeat != 0 } {
36 set che [whatis res_$ic]
37 set ind [string first "3d curve" $che]
38 if {${ind} < 0} {
39 set AllowRepeat 0
40 } else {
41
42 bounds res_$ic U1 U2
43
44 if {[dval U2-U1] < 1.0e-20} {
45 puts "Error: Wrong curve's range!"
46 }
47
48 xdistcs res_$ic s1 U1 U2 100 2.0e-7
49 xdistcs res_$ic s2 U1 U2 100 2.0e-7
50
51 mkedge ee res_$ic
52 baddobjects ee
53 incr ic
54 }
55}
56
57bfillds
58bbuild result
59
60smallview
61don result*
62fit
63
64# Check gaps between edges in ce
65checksection result -r 0
66checkmaxtol result -min_tol 2.0e-7
67
68checknbshapes result -edge 2 -vertex 2
69
70checkview -screenshot -2d -path ${imagedir}/${test_image}.png