1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-04 18:06:22 +03:00
occt/tests/bugs/modalg_5/bug24751_2
2014-05-23 12:38:03 +04:00

60 lines
1.2 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 300
} else {
set max_time 400
}
} else {
if { [regexp {Windows} [dversion]] } {
set max_time 100
} else {
set max_time 120
}
}
if { [regexp {Mac OS X} [dversion]] } {
set max_time 440
}
dchrono h reset
dchrono h start
restore [locate_data_file bug24696_cx_e1200_nurbs.brep] cx
###------------------####
trotate cx 0 0 0 0 1 1 45
###------------------####
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"
}
set 2dviewer 1