0031939: Coding - correction of spelling errors in comments [part 7]
[occt.git] / tests / lowalgos / intss / bug333
CommitLineData
a87752f3 1puts "================"
e121dd4d 2puts "OCC333: Superimposed curves during intersection two surfaces "
a87752f3 3puts "================"
4puts ""
e121dd4d 5
6set GoodNbCurv 14
7
8restore [locate_data_file OCC333a.draw] s1
9restore [locate_data_file OCC333b.draw] s2
10
11intersect result s1 s2
12
13set che [whatis result]
14set ind [string first "3d curve" $che]
15if {${ind} >= 0} {
16 #Only variable "result" exists
17 renamevar result result_1
18}
19
20set ic 1
21set AllowRepeate 1
22while { $AllowRepeate != 0 } {
23 set che [whatis result_$ic]
24 set ind [string first "3d curve" $che]
25 if {${ind} < 0} {
26 set AllowRepeate 0
27 } else {
28 display result_$ic
29
30 bounds result_$ic U1 U2
31
32 dump U1 U2
33
34 if {[dval U2-U1] < 1.0e-9} {
35 puts "Error: Wrong curve's range!"
a87752f3 36 }
e121dd4d 37
38 xdistcs result_$ic s1 U1 U2 10 2.0e-7
39 xdistcs result_$ic s2 U1 U2 10 2.0e-7
40
41 for { set ip [expr $ic-1] } { $ip > 0 } { incr ip -1 } {
42 mkedge e1 result_$ic
43 mkedge e2 result_$ip
44
45 set coe [checkoverlapedges e1 e2 5.0e-5]
46
47 puts "result_$ic <-> result_$ip: $coe"
7b5e532f 48 if { [regexp "Edges are not overlapped" $coe] != 1 } {
49 puts "Error: result_$ic and result_$ip are overlapped"
e121dd4d 50 }
51 }
52
53 incr ic
54 }
a87752f3 55}
56
e121dd4d 57incr ic -1
58
59if {$ic == $GoodNbCurv} {
60 puts "OK: Number of curves is good!"
61} else {
62 puts "Error: $GoodNbCurv curves are expected but $ic ones are found!"
63}
64
65smallview
66don result*
67fit
68clear
69don s1 s2 result*
70
71checkview -screenshot -2d -path ${imagedir}/${test_image}.png