1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-08 18:40:55 +03:00
occt/tests/bugs/modalg_1/bug10160_8
ski 58cf74e0c0 0025945: Make stable checking of shape global properties in tests
- Added function checkprops, set default tolerance parameter to 1.0e-4
- Using "area" instead of "square".
- Options "-equal\notequal" isn't used together with "-s" in blend and offset test cases.
- Correct regressions/differences/improvements and CPU problem (set props tolerance to 0.1)
- Corrected test cases to use checkprops proc.
- Correct image difference
- Updated TODOs in test cases.
- Updated test cases to get correct images of result shape
2015-12-10 16:56:03 +03:00

48 lines
1.4 KiB
Plaintext
Executable File

puts "TODO OCC11111 ALL: Error : is WRONG because number of "
puts "============"
puts "OCC10160"
puts "============"
puts ""
#######################################################################
# BOP perfomance improvemen
#######################################################################
set BugNumber OCC10160
restore [locate_data_file OCC10160-1.brep] b1
restore [locate_data_file OCC10160-3.brep] b2
set NbTests 3
puts "Prepare boolean operation ..."
dchrono h0 reset; dchrono h0 start
bop b1 b2
dchrono h0 stop; set CPU_time0_List [dchrono h0 show]
regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time0_List full CPU_user_time0
puts "CPU_user_time0=${CPU_user_time0}"
puts "Start boolean operation ..."
dchrono h reset; dchrono h start
#
# BOOLEAN OPERATION ----- START
#
for {set i 1} {$i <= ${NbTests}} {incr i} {
boptuc result
}
#
# BOOLEAN OPERATION ----- FINISH
#
dchrono h stop; set CPU_time_List [dchrono h show]
regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time_List full CPU_user_time
puts "Finish boolean operation ..."
puts "CPU_user_time=${CPU_user_time}"
set CPU_user_time [expr ${CPU_user_time} / ${NbTests}]
puts "CPU_user_time=${CPU_user_time}"
checkprops result -s 6.87093e+06
checkshape result
# Analysis of "nbshapes res"
checknbshapes result -vertex 113 -edge 166 -wire 59 -face 57 -shell 1 -solid 1 -compsolid 0 -compound 1 -shape 398
set 2dviewer 0