1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00
occt/tests/bugs/modalg_5/bug24751_4
ski 5747059b21 0026833: Create command checkview containing all viewer types
Created command checkview for displaying shapes.
2016-02-05 11:14:37 +03:00

60 lines
1.3 KiB
Plaintext

puts "========="
puts "OCC24751"
puts "========="
puts ""
###########################################################
# Performance improvements in the Edge/Edge intersection algorithm
###########################################################
pload QAcommands
if { [regexp {Debug mode} [dversion]] } {
if { [regexp {Windows} [dversion]] } {
set max_time 550
} else {
set max_time 550
}
} else {
if { [regexp {Windows} [dversion]] } {
set max_time 130
} else {
set max_time 150
}
}
if { [regexp {Mac OS X} [dversion]] } {
set max_time 260
}
dchrono h reset
dchrono h start
restore [locate_data_file bug24696_cx_e1200_nurbs.brep] cx
###------------------####
trotate cx 0 0 0 0 1 1 90
###------------------####
bclearobjects
bcleartools
set edges [explode cx e]
set nbe [llength $edges]
for {set i 1} {$i <= $nbe} {incr i} {baddobjects cx_$i}
bfillds
bbuild result
dchrono h stop
set q [dchrono h show]
regexp {CPU user time: ([-0-9.+eE]+) seconds} $q full z
puts "$z"
if { $z > ${max_time} } {
puts "Elapsed time is more than ${max_time} seconds - Faulty"
} else {
puts "Elapsed time is less than ${max_time} seconds - OK"
}
checkview -display result -2d -path ${imagedir}/${test_image}.png