Integration part of tests of grid chl
[occt.git] / tests / bugs / moddata / bug106
1
2 puts "================"
3 puts "BUC61032"
4 puts "OCC106"
5 puts "================"
6 puts ""
7
8 restore [locate_data_file OCC106-1.draw] sh1 
9 ####          checkshape sh1 # - not a topological shape
10 restore [locate_data_file OCC106-2.draw] sh2
11 ####          checkshape sh2 # - not a topological shape
12
13 trimv s1 sh1 -1000 1000
14 trimv s2 sh2 -1000 1000
15
16 if [catch {intersect res s1 s2} result] {
17 set mistake 1
18 } else {
19 set  mistake 0
20 }
21
22 if { $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
48 if [catch {intersect rrs sh1 sh2} result] {
49 set mistake 1
50 } else {
51 set  mistake 0
52 }
53
54 if { $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