1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-07 18:30:55 +03:00
apn 1704c57631 Update test cases database
- bugs modalg_5 bug23954 -      Added test case for issue 23954
- bugs modalg_1 bug60776_1 -  Corrected square of shape and deleted appropriate TODO
- bugs moddata_1 bug13 -          Added check for the curve length obtained as a result of intersection
- feat featprism S2 -                     Corrected square of shape and deleted appropriate TODO
2014-03-20 14:22:54 +04:00

58 lines
1.8 KiB
Plaintext
Executable File

puts "================"
puts "OCC13"
puts "================"
puts ""
##################################################
## It is impossible to intersect two surfaces
##################################################
restore [locate_data_file OCC13-1.draw] su1
############### checkshape su1 # is not a topological shape
restore [locate_data_file OCC13-2.draw] su2
############### checkshape su2 # is not a topological shape
#Try to intersect two surfaces with tolerance 0.1
#note that distance between shapes is about 0.005942345501409
catch {intersect res su1 su2 0.1 } result
set nom 0
set j 1
repeat 10 {
set che [whatis res_$j]
set che1 [whatis res_$j]
set err [lindex $che [expr [llength $che] - 1]]
set err1 [lindex $che1 [expr [llength $che1] - 2]]
if { $err != "curve" && $err1 != "3d"} {
break
} else {
set nom [expr $nom + 1]
if { $j == 1 } {
set info [length res_$j]
regexp {The length res_1 is+ +([-0-9.+eE]+)} $info full ll
set lcheck_1 5.6627572343058755e-05
if { [expr 1.*abs($lcheck_1 - $ll)/$lcheck_1] > 0.01 } {
puts "Error : The lenght of result shape is $ll"
} else {
puts "OK : The length of result shape is ok"
}
}
if { $j == 2 } {
set info [length res_$j]
regexp {The length res_2 is+ +([-0-9.+eE]+)} $info full ll
set lcheck_2 5.5763870549528719e-05
if { [expr 1.*abs($lcheck_2 - $ll)/$lcheck_2] > 0.01 } {
puts "Error : The lenght of result shape is $ll"
} else {
puts "OK : The length of result shape is ok"
}
}
incr j }
}
if { $nom == 0} {
puts "Error : Intersection was made WRONGLY"
}