0e94a94e |
1 | |
2 | puts "================" |
3 | puts "OCC13" |
4 | puts "================" |
5 | puts "" |
6 | ################################################## |
7 | ## It is impossible to intersect two surfaces |
8 | ################################################## |
9 | |
10 | restore [locate_data_file OCC13-1.draw] su1 |
11 | ############### checkshape su1 # is not a topological shape |
12 | restore [locate_data_file OCC13-2.draw] su2 |
13 | ############### checkshape su2 # is not a topological shape |
14 | |
15 | #Try to intersect two surfaces with tolerance 0.1 |
16 | #note that distance between shapes is about 0.005942345501409 |
17 | |
18 | catch {intersect res su1 su2 0.1 } result |
19 | set nom 0 |
20 | set j 1 |
21 | repeat 10 { |
22 | set che [whatis res_$j] |
23 | set che1 [whatis res_$j] |
24 | set err [lindex $che [expr [llength $che] - 1]] |
25 | set err1 [lindex $che1 [expr [llength $che1] - 2]] |
26 | |
27 | if { $err != "curve" && $err1 != "3d"} { |
28 | break |
29 | } else { |
30 | set nom [expr $nom + 1] |
31 | } |
32 | incr j} |
33 | if { $nom == 0} { |
34 | puts "Error : Intersection was made WRONGLY" |
35 | } |
36 | |
37 | |