0030315: Data Exchange - Crash reading views during STEP import.
[occt.git] / tests / bugs / modalg_7 / bug29994
CommitLineData
6487fb1c 1puts "========"
2puts "0029994: Misprint in IntWalk_PWalking::Perform(...) method"
3puts "========"
4puts ""
5
6foreach a [directory res*] {unset $a}
7
8torus s1 185.793144150183 -13 70.9931441501827 0 -1 0 0 0 -1 27.0094480547676 0.25
9restore [locate_data_file bug29994_s2.draw] s2
10
11intersect res s1 s2 1.0e-4
12
13if { [info exists res] } {
14 #Only variable "res" exists
15 renamevar res res_1
16}
17
18bclearobjects
19bcleartools
20
21set ic 1
22set AllowRepeat 1
23while { $AllowRepeat != 0 } {
24 if { ![info exists res_$ic] } {
25 set AllowRepeat 0
26 } else {
27 bounds res_$ic U1 U2
28
29 if {[dval U2-U1] < 1.0e-9} {
30 puts "Error: Wrong curve's range!"
31 }
32
33 xdistcs res_$ic s1 U1 U2 100 2.0e-7
34 xdistcs res_$ic s2 U1 U2 100 2.0e-7
35
36 mkedge ee res_$ic
37 baddobjects ee
38 incr ic
39 }
40}
41
42incr ic -1
43
44if { $ic == 1 } {
45 puts "OK: good number of curves!"
46 checklength res_1 -l 0.70541045554962345 -eps 1.0e-3
47} else {
48 puts "Error: Incorrect number of curves in intersection result!"
49 bfillds
50 bbuild result
51
52 # Check gaps between edges in result
53 checksection result -r 2
54 checkmaxtol result -min_tol 2.0e-7
55 checknbshapes result -edge 1 -vertex 2
56}
57
58smallview
59don res_*
60fit
61disp s1 s2
62
63checkview -screenshot -2d -path ${imagedir}/${test_image}.png