1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-05 18:16:23 +03:00
ski a8676008f7 Adding of testing cases from subgroups 937 940 and 941 of CHL group
Splitting of subgroups bugs/modalg and bugs/moddata to optimise time of testing
Correction of end file in group v3d
Small correction of test case
2013-02-08 15:16:15 +04:00

46 lines
1.1 KiB
Plaintext
Executable File

puts "TODO ?OCC12345 ALL: OCC12522: Faulty"
puts "========"
puts "OCC12522"
puts "========"
puts ""
###########################################################
# Extrema problems. Case: one of the Extrema arguments is an infinite face or an infinite edge.
###########################################################
proc GetPercent {Value GoodValue} {
set Percent 0.
if {${GoodValue} != 0.} {
set Percent [expr abs(${Value} - ${GoodValue}) / abs(double(${GoodValue})) * 100.]
} elseif {${Value} != 0.} {
set Percent [expr abs(${GoodValue} - ${Value}) / abs(double(${Value})) * 100.]
} else {
set Percent 0.
}
return ${Percent}
}
set BugNumber OCC12522
restore [locate_data_file OCC12522.brep] arc1
explode arc1 e
mkcurve curve1 arc1_1
plane plane1 6400 -4000 -160 0 0 1 1 0 0
extrema curve1 plane1
set percent_max 0.1
set good_length 8.3705138910905177
set ext_1_length [lindex [length ext_1] 4]
set length_percent [GetPercent ${ext_1_length} ${good_length}]
puts "length_percent = ${length_percent}"
if {${length_percent} > ${percent_max}} {
puts "${BugNumber}: Faulty"
} else {
puts "${BugNumber}: OK"
}