0e94a94e |
1 | |
2 | puts "================" |
3 | puts "OCC130" |
4 | puts "================" |
5 | puts "" |
6 | ###################################################### |
7 | ## Draw Environment: No intersection found between a specific surface and a line |
8 | ###################################################### |
9 | |
10 | restore [locate_data_file OCC130.brep] sh |
11 | puts [checkshape sh] |
12 | |
13 | line l -120 -100 400 0 0 1 |
14 | mksurface surf sh |
15 | ############## checkshape surf # - not a topological shape |
16 | |
17 | |
18 | if [catch {intersect res l surf } result] { |
19 | set mistake 1 |
20 | } else { |
21 | set mistake 0 |
22 | } |
23 | |
24 | if { $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 | |