1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-09 18:50:54 +03:00
occt/tests/bugs/modalg_1/bug19793_2
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

71 lines
1.9 KiB
Plaintext
Executable File

puts "============"
puts "OCC19793"
puts "============"
puts ""
#######################################################################
# Fuse problem of symetrical shapes. Appendix for NPAL19789
#######################################################################
cpulimit 2500
set BugNumber OCC19793
puts "Load first shape ..."
restore [locate_data_file bug19793_new_shape.brep] b1
puts "Load second shape ..."
restore [locate_data_file bug19793_shape.brep] b2
puts "Prepare boolean operation ..."
dchrono perf_h reset
dchrono perf_h start
bop b1 b2
dchrono perf_h stop
puts "Start boolean operation ..."
bopsection result
puts "Finish boolean operation ..."
checkprops result -l 17730.1
checkshape result
checksection result
checknbshapes result -vertex 68 -edge 70 -wire 0 -face 0 -shell 0 -solid 0 -compsolid 0 -compound 1 -shape 139
# OCC23753 processing
# Performance verification of bop operation
set chrono_info [dchrono perf_h show]
regexp {CPU user time: ([-0-9.+eE]+) seconds} $chrono_info full CPU_time
if { [regexp {Debug mode} [dversion]] } {
if { [regexp {Windows} [dversion]] } {
puts "Checking WINDOWS performance..."
if {$CPU_time > 1000.} {
puts "ERROR: OCC23753 is reproduced."
puts " Low performance: $CPU_time"
}
} else {
puts "Checking LINUX performance..."
if {$CPU_time > 2500.} {
puts "ERROR: OCC23753 is reproduced."
puts " Low performance: $CPU_time"
}
}
} else {
if { [regexp {Windows} [dversion]] } {
puts "Checking WINDOWS performance..."
# Initial CPU_time is 92-94 seconds for Windows
if {$CPU_time > 300.} {
puts "ERROR: OCC23753 is reproduced."
puts " Low performance: $CPU_time"
}
} else {
puts "Checking LINUX performance..."
# Initial CPU_time is 287-289 seconds for Linux
if {$CPU_time > 350.} {
puts "ERROR: OCC23753 is reproduced."
puts " Low performance: $CPU_time"
}
}
}
set 2dviewer 0