Restoring test cases removed by last commit.
[occt.git] / tests / bugs / moddata / bug106
CommitLineData
0e94a94e 1
2puts "================"
3puts "BUC61032"
4puts "OCC106"
5puts "================"
6puts ""
7
8restore [locate_data_file OCC106-1.draw] sh1
9#### checkshape sh1 # - not a topological shape
10restore [locate_data_file OCC106-2.draw] sh2
11#### checkshape sh2 # - not a topological shape
12
13trimv s1 sh1 -1000 1000
14trimv s2 sh2 -1000 1000
15
16if [catch {intersect res s1 s2} result] {
17set mistake 1
18} else {
19set mistake 0
20}
21
22if { $mistake == 0 } {
23 puts ""
24 set nom 0
25 set j 1
26 repeat 10 {
27 set che [whatis res_$j]
28 set che1 [whatis res_$j]
29 set err [lindex $che [expr [llength $che] - 1]]
30 set err1 [lindex $che1 [expr [llength $che1] - 2]]
31
32 if { $err != "curve" && $err1 != "3d"} {
33 break
34 } else {
35 set nom [expr $nom + 1]
36 }
37 incr j}
38 if { $nom == 0} {
39 puts "1) Faulty OCC106: Intersection was made WRONGLY"
40} else {
41 puts [format "1) OCC106 OK : Intersection command works properly: %s curves" $nom]
42 puts ""
43}
44} else {
45 puts "1) Faulty OCC106: Intersection was made WRONGLY"
46}
47
48if [catch {intersect rrs sh1 sh2} result] {
49set mistake 1
50} else {
51set mistake 0
52}
53
54if { $mistake == 0 } {
55 puts ""
56 set nom 0
57 set j 1
58 repeat 10 {
59 set che [whatis rrs_$j]
60 set che1 [whatis rrs_$j]
61 set err [lindex $che [expr [llength $che] - 1]]
62 set err1 [lindex $che1 [expr [llength $che1] - 2]]
63
64 if { $err != "curve" && $err1 != "3d"} {
65 break
66 } else {
67 set nom [expr $nom + 1]
68 }
69 incr j}
70 if { $nom == 0} {
71 puts "2) Faulty OCC106: Intersection was made WRONGLY"
72} else {
73 puts [format "2) OCC106 OK : Intersection command works properly: %s curves" $nom]
74}
75} else {
76 puts "2) Faulty OCC106: Intersection was made WRONGLY"
77}
78