Restoring test cases removed by last commit.
[occt.git] / tests / bugs / moddata / bug130
CommitLineData
0e94a94e 1
2puts "================"
3puts "OCC130"
4puts "================"
5puts ""
6######################################################
7## Draw Environment: No intersection found between a specific surface and a line
8######################################################
9
10restore [locate_data_file OCC130.brep] sh
11puts [checkshape sh]
12
13line l -120 -100 400 0 0 1
14mksurface surf sh
15############## checkshape surf # - not a topological shape
16
17
18if [catch {intersect res l surf } result] {
19set mistake 1
20} else {
21set mistake 0
22}
23
24if { $mistake == 0} {
25 puts "OCC130 OK : intersection found between a specific surface and a line"
26 puts ""
27 set nom 0
28 set j 1
29 repeat 10 {
30 set che [whatis res_$j]
31 set err [lindex $che [expr [llength $che] - 1]]
32
33 if { $err != "point"} {
34 break
35 } else {
36 set nom [expr $nom + 1]
37 }
38 incr j}
39 if { $nom != 2 && $nom != 0} {
40 puts [format "Faulty OCC130: Intersection was made WRONGLY: %s points" $nom]
41} else {
42 puts [format "OCC130 OK : Intersection command works properly: %s points" $nom]
43}
44
45} else {
46 puts "Faulty OCC130 : NO intersection found between a specific surface and a line"
47}
48