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

77 lines
1.8 KiB
Plaintext
Executable File

puts "========================"
puts "OCC14782"
puts "========================"
puts ""
#######################################################################
# Method segment works wrongly for periodical BSpline curve
#######################################################################
set BugNumber OCC14782
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}
}
restore [locate_data_file OCC14782.draw] res
bounds res t1 t2
set bounds_list [dump res]
puts ""
if { [llength ${bounds_list}] < 7 } {
puts "Bad bounds_list"
puts "Faulty ${BugNumber}"
} else {
set periodic_type [lindex ${bounds_list} 6]
puts "periodic_type=${periodic_type}"
if { ${periodic_type} != "periodic" } {
puts "1. Faulty ${BugNumber}"
} else {
puts "1. OK ${BugNumber}"
}
}
set ll1 [lindex [length res] end]
puts "length1=${ll1}"
segment res t3 t4
set segment_list [dump res]
puts ""
if { [llength ${segment_list}] < 7 } {
puts "Bad segment_list"
puts "Faulty ${BugNumber}"
} else {
set periodic_type [lindex ${segment_list} 6]
puts "periodic_type=${periodic_type}"
if { ${periodic_type} != "periodic" } {
puts "2. OK ${BugNumber}"
} else {
puts "2. Faulty ${BugNumber}"
}
}
set ll2 [lindex [length res] end]
puts "length2=${ll2}"
set percent_max 0.1
set length_percent [GetPercent ${ll1} ${ll2}]
puts "length_percent = ${length_percent}"
puts ""
if { ${length_percent} > ${percent_max} } {
puts "3. Faulty ${BugNumber}"
} else {
puts "3. OK ${BugNumber}"
}