Correction of testing case for issue 24374
[occt.git] / tests / bugs / moddata_2 / bug9303_1
1 puts "============"
2 puts "OCC9303"
3 puts "============"
4 puts ""
5 ######################################################
6 # Intersection curve surface doesn't take account of bounds of the surface
7 ######################################################
8
9 set BugNumber OCC9303
10
11 cone c 0 0 0 30 0
12 trimv nc c 20 30
13
14 smallview +X+Z
15 donly nc
16 fit
17
18 line ll 0 0 10 1 0 0
19
20 decho off
21 if [catch {intersect res ll nc} result] {
22    set mistake 1
23 } else {
24    set  mistake 0
25 }
26 decho on
27
28 if { $mistake == 0} {                                                                           
29    puts "${BugNumber} OK : intersection was finished"                 
30    puts ""
31    set nom 0
32    set j 1
33    repeat 2 {
34      set che [whatis res_$j]
35      set err [lindex $che [expr [llength $che] - 1]]
36      if { $err != "point"} {
37         break
38      } else {
39         set nom [expr $nom + 1]
40      }
41      incr j
42    }
43    if { $nom != 0 } {
44       puts [format "Faulty ${BugNumber}: Intersection was made WRONGLY: %s points" $nom]
45    } else {
46       puts [format "${BugNumber} OK : Intersection command works properly: %s points" $nom]
47    }
48 } else {
49    puts "Faulty ${BugNumber} : intersection does not finished"
50 }
51