2f589084587ee6d19b162adaa55c77a7b25d8c2c
[occt.git] / tests / bugs / moddata_1 / bug13
1 puts "================"
2 puts "OCC13"
3 puts "================"
4 puts ""
5 ##################################################
6 ## It is impossible to intersect two surfaces
7 ##################################################
8
9 restore [locate_data_file OCC13-1.draw] su1 
10 ############### checkshape su1 # is not a topological shape
11 restore [locate_data_file OCC13-2.draw] su2
12 ############### checkshape su2 # is not a topological shape
13
14 #Try to intersect two surfaces with tolerance 0.1
15 #note that distance between shapes is about 0.005942345501409
16
17 catch {intersect res su1 su2 0.1 } result
18 set nom 0
19   set j 1
20    repeat 10 {
21     set che [whatis res_$j]
22      set che1 [whatis res_$j]
23       set err [lindex $che [expr [llength $che] - 1]]
24        set err1 [lindex $che1 [expr [llength $che1] - 2]]
25         if { $err != "curve" && $err1 != "3d"} {
26           break
27         } else {
28           set nom [expr $nom + 1]
29           
30           #Check, if curve has non-zero length
31           set info [length res_$j]
32           regexp {The length res_1 is+ +([-0-9.+eE]+)} $info full ll
33           if {${ll} < 1.0e-7} {
34             puts "Error : res_$j has null-length"
35           }
36           
37           incr j
38         }
39    }
40 if { $nom == 0} {
41   puts "Error : Intersection was made WRONGLY"
42 }